diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2018-06-21 22:58:42 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-06-22 09:00:34 +0200 |
commit | ca85aab95397ae918088f8ba2195eb4eb996c739 (patch) | |
tree | 53c83f5d50354f163eeab5dd11c8ba109be9e291 /source/a/pkgtools/scripts/upgradepkg | |
parent | b893b1174dfcd0fdc84aa597eee76b797d6d7b11 (diff) | |
download | current-ca85aab95397ae918088f8ba2195eb4eb996c739.tar.gz |
Thu Jun 21 22:58:42 UTC 201820180621225842
a/pkgtools-15.0-noarch-20.txz: Rebuilt.
Move pkgtools database to /var/lib/pkgtools/.
Move removed logs to /var/log/pkgtools/.
a/sysvinit-2.90-x86_64-1.txz: Upgraded.
ap/cups-filters-1.20.3-x86_64-3.txz: Rebuilt.
Recompiled against poppler-0.66.0.
kde/calligra-2.9.11-x86_64-22.txz: Rebuilt.
Recompiled against poppler-0.66.0.
l/dbus-python-1.2.8-x86_64-1.txz: Upgraded.
l/gc-7.6.6-x86_64-1.txz: Upgraded.
l/harfbuzz-1.8.1-x86_64-1.txz: Upgraded.
l/poppler-0.66.0-x86_64-1.txz: Upgraded.
Shared library .so-version bump.
l/pulseaudio-12.0-x86_64-1.txz: Upgraded.
n/dhcpcd-7.0.6-x86_64-1.txz: Upgraded.
n/php-7.2.7-x86_64-1.txz: Upgraded.
Added support for libedit.
t/texlive-2017.171108-x86_64-7.txz: Rebuilt.
Recompiled against poppler-0.66.0.
x/libwacom-0.30-x86_64-1.txz: Upgraded.
xfce/exo-0.12.2-x86_64-1.txz: Upgraded.
xfce/tumbler-0.2.1-x86_64-4.txz: Rebuilt.
Recompiled against poppler-0.66.0.
xfce/xfce4-settings-4.12.4-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/a/pkgtools/scripts/upgradepkg')
-rw-r--r-- | source/a/pkgtools/scripts/upgradepkg | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/source/a/pkgtools/scripts/upgradepkg b/source/a/pkgtools/scripts/upgradepkg index 3ee3c658..f53d21d9 100644 --- a/source/a/pkgtools/scripts/upgradepkg +++ b/source/a/pkgtools/scripts/upgradepkg @@ -22,6 +22,9 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +# Mon Jun 4 21:17:58 UTC 2018 +# Use /var/lib/pkgtools, not /var/log. +# # Thu May 24 20:23:55 UTC 2018 # Added --terselength option to set the line length in --terse mode. # Use a lockfile to prevent output collisions in --terse mode. @@ -83,8 +86,11 @@ For more details see upgradepkg(8). EOF } +# Set the prefix for the package database directories (packages, scripts). +ADM_DIR="$ROOT/var/lib/pkgtools" + # Make sure there's a proper temp directory: -TMP=$ROOT/var/log/setup/tmp +TMP=$ADM_DIR/setup/tmp # If the $TMP directory doesn't exist, create it: if [ ! -d $TMP ]; then mkdir -p $TMP @@ -204,7 +210,7 @@ for ARG; do # Simple package integrity check: if ! [ -f "$NEW" ]; then ERRCODE=4 - echo "Cannot install $NEW: file not found" + echo "Cannot install $NEW: file not found" continue; fi @@ -226,9 +232,9 @@ for ARG; do # Check and fix the old package name: SHORT="$(package_name $OLD)" - if [ ! -r $ROOT/var/log/packages/$OLD ]; then - if ls $ROOT/var/log/packages/$SHORT* 1> /dev/null 2> /dev/null ; then - for installed_package in $ROOT/var/log/packages/$SHORT* ; do + if [ ! -r $ADM_DIR/packages/$OLD ]; then + if ls $ADM_DIR/packages/$SHORT* 1> /dev/null 2> /dev/null ; then + for installed_package in $ADM_DIR/packages/$SHORT* ; do if [ "$(package_name $installed_package)" = "$SHORT" ]; then # found one OLD="${installed_package##*/}" break @@ -240,14 +246,14 @@ for ARG; do # Test to see if both the old and new packages are where we expect them # to be - skip to the next package (or package pair) if anything's wrong: - if [ ! -r $ROOT/var/log/packages/$OLD ]; then + if [ ! -r $ADM_DIR/packages/$OLD ]; then if [ ! "$INSTALL_NEW" = "yes" ]; then if [ "$DRY_RUN" = "true" ]; then echo "$OLD would not be upgraded (no installed package named $SHORT)." else ! [ $TERSE ] && echo echo "Error: there is no installed package named $OLD." - ! [ $TERSE ] && echo " (looking for $ROOT/var/log/packages/$OLD)" + ! [ $TERSE ] && echo " (looking for $ADM_DIR/packages/$OLD)" ! [ $TERSE ] && echo fi ERRCODE=1 @@ -317,7 +323,7 @@ EOF SHORT="$(package_name $OLD)" if [ "$DRY_RUN" = "true" ]; then echo -n "$NEW would upgrade: " - for installed_package in $ROOT/var/log/packages/$SHORT* ; do + for installed_package in $ADM_DIR/packages/$SHORT* ; do if [ "$(package_name $installed_package)" = "$SHORT" ]; then echo -n "$(pkgbase $installed_package)" fi @@ -325,12 +331,12 @@ EOF echo continue fi - for installed_package in $ROOT/var/log/packages/$SHORT* ; do + for installed_package in $ADM_DIR/packages/$SHORT* ; do if [ "$(package_name $installed_package)" = "$SHORT" ]; then mv $installed_package ${installed_package}-upgraded-$TIMESTAMP fi done - for installed_script in $ROOT/var/log/scripts/$SHORT* ; do + for installed_script in $ADM_DIR/scripts/$SHORT* ; do if [ "$(package_name $installed_script)" = "$SHORT" ]; then if [ -r $installed_script ]; then mv $installed_script ${installed_script}-upgraded-$TIMESTAMP @@ -385,7 +391,7 @@ EOF fi # Now, the leftovers from the old package(s) can go. Pretty simple, huh? :) ( flock 9 || exit 11 - for rempkg in "$ROOT/var/log/packages/"*"-$TIMESTAMP"; do + for rempkg in "$ADM_DIR/packages/"*"-$TIMESTAMP"; do if [ "$VERBOSE" = "verbose" ]; then /sbin/removepkg "${rempkg##*/}" elif ! [ $TERSE ]; then |