aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md7
-rw-r--r--src/cpt-lib.in12
2 files changed, 13 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4e5b17d..9bf9e89 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,13 @@ UNRELEASED
- Added fossil support
+6.0.4 - 2021-05-12
+--------------------------------------------------------------------------------
+
+### Fixed
+- Fixed the declaration place of the `$pid` variable
+
+
6.0.3 - 2021-05-10
--------------------------------------------------------------------------------
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 714e4a0..328149e 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -2050,6 +2050,12 @@ create_cache() {
eval set -- "$REST"
}
+ # The PID of the current shell process is used to isolate directories
+ # to each specific CPT instance. This allows multiple package manager
+ # instances to be run at once. Store the value in another variable so
+ # that it doesn't change beneath us.
+ pid=${CPT_PID:-$$}
+
# Create the cache directories for CPT and set the variables which point
# to them. This is seperate from temporary directories created in
# create_cache(). That's because we need these variables set on most
@@ -2069,12 +2075,6 @@ create_cache() {
# Set the location to the repository and package database.
pkg_db=var/db/cpt/installed
- # The PID of the current shell process is used to isolate directories
- # to each specific CPT instance. This allows multiple package manager
- # instances to be run at once. Store the value in another variable so
- # that it doesn't change beneath us.
- pid=${CPT_PID:-$$}
-
# Force the C locale to speed up things like 'grep' which disable unicode
# etc when this is set. We don't need unicode and a speed up is always
# welcome.