summaryrefslogtreecommitdiff
path: root/source/a/pkgtools
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2018-06-08 20:37:06 +0000
committerEric Hameleers <alien@slackware.com>2018-06-09 01:06:22 +0200
commit8f0b1c57c99036007acd8a798ee81d938df67b98 (patch)
treea197ae6ab97d526c7216cfd3a4dfd921bb0b2696 /source/a/pkgtools
parent6e00c56127b4fa2328e596ac18647fb7f27b674d (diff)
downloadcurrent-8f0b1c57c99036007acd8a798ee81d938df67b98.tar.gz
Fri Jun 8 20:37:06 UTC 201820180608203706
a/glibc-solibs-2.27-x86_64-3.txz: Rebuilt. a/pkgtools-15.0-noarch-16.txz: Rebuilt. upgradepkg: clean up --help output and add options upgradepkg: accept -help option (not just --help) upgradepkg: don't omit error messages in --terse mode upgradepkg: only print missing new package in old%new mode upgradepkg.8: move information about config file handling from BUGS to the DESCRIPTION section Thanks to Xsane. ap/vim-8.1.0039-x86_64-1.txz: Upgraded. l/glibc-2.27-x86_64-3.txz: Rebuilt. When installing the package, remove old versions of the glibc shared libraries. In addition to eliminating residue on the system from old package versions, this change will make it possible in the future to revert to older glibc packages using upgradepkg. l/glibc-i18n-2.27-x86_64-3.txz: Rebuilt. l/glibc-profile-2.27-x86_64-3.txz: Rebuilt. n/gnupg2-2.2.8-x86_64-1.txz: Upgraded. Sanitize the diagnostic output of the original file name in verbose mode. By using a made up file name in the message it was possible to fake status messages. Using this technique it was for example possible to fake the verification status of a signed mail. For more information, see: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-12020 (* Security fix *) xap/vim-gvim-8.1.0039-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/a/pkgtools')
-rw-r--r--source/a/pkgtools/manpages/upgradepkg.812
-rwxr-xr-xsource/a/pkgtools/pkgtools.SlackBuild2
-rw-r--r--source/a/pkgtools/scripts/upgradepkg49
3 files changed, 30 insertions, 33 deletions
diff --git a/source/a/pkgtools/manpages/upgradepkg.8 b/source/a/pkgtools/manpages/upgradepkg.8
index af526648..757d6003 100644
--- a/source/a/pkgtools/manpages/upgradepkg.8
+++ b/source/a/pkgtools/manpages/upgradepkg.8
@@ -66,7 +66,12 @@ If the old and new packages have the same name, a single argument is all that
is required. If the packages have different names, supply the name of the
old package followed by a percent symbol (%), then the name of the new package.
Do not add any extra whitespace between pairs of old/new package names.
-
+.P
+Before upgrading a package, save any configuration files (such as in /etc)
+that you wish to keep. Sometimes these will be preserved, but it depends on
+the package structure. If you want to force new versions of the config files
+to be installed, remove the old ones manually prior to running upgradepkg.
+.P
If upgradepkg finds more than one installed package matching the old package's
name, it will remove them all.
.TP
@@ -101,11 +106,6 @@ Maximum line length of --terse mode output. Default is the number of terminal co
.TP
.B \--verbose
Show all the gory details of the upgrade.
-.SH BUGS
-Before upgrading a package, save any configuration files (such as in /etc)
-that you wish to keep. Sometimes these will be preserved, but it depends on
-the package structure. If you want to force new versions of the config files
-to be installed, remove the old ones manually prior to running upgradepkg.
.SH AUTHOR
Patrick J. Volkerding <volkerdi@slackware.com>
.SH "SEE ALSO"
diff --git a/source/a/pkgtools/pkgtools.SlackBuild b/source/a/pkgtools/pkgtools.SlackBuild
index 15e0fb1b..f0cc6da4 100755
--- a/source/a/pkgtools/pkgtools.SlackBuild
+++ b/source/a/pkgtools/pkgtools.SlackBuild
@@ -30,7 +30,7 @@ PKGNAM=pkgtools
# *** UPDATE THESE WITH EACH BUILD:
VERSION=15.0
ARCH=${ARCH:-noarch}
-BUILD=${BUILD:-15}
+BUILD=${BUILD:-16}
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
diff --git a/source/a/pkgtools/scripts/upgradepkg b/source/a/pkgtools/scripts/upgradepkg
index 1acae7d6..500a970a 100644
--- a/source/a/pkgtools/scripts/upgradepkg
+++ b/source/a/pkgtools/scripts/upgradepkg
@@ -62,27 +62,24 @@ pkgbase() {
usage() {
cat << EOF
-Usage: upgradepkg newpackage [newpackage2 ... ]
- upgradepkg oldpackage%newpackage [oldpackage2%newpackage2 ... ]
-
-Upgradepkg upgrades a Slackware package (.tgz, .tbz, .tlz, .txz) from an
-older version to a newer one. It does this by INSTALLING the new package
-onto the system, and then REMOVING any files from the old package that
-aren't in the new package. If the old and new packages have the same
-name, a single argument is all that is required. If the packages have
-different names, supply the name of the old package followed by a percent
-symbol (%), then the name of the new package. Do not add any extra
-whitespace between pairs of old/new package names.
-
-Before upgrading a package, save any configuration files (such as in /etc)
-that you wish to keep. Sometimes these will be preserved, but it depends
-on the package. If you want to force new versions of the config files
-to be installed, remove the old ones manually prior to running upgradepkg.
-
-To upgrade in a directory other than / (such as /mnt):
-
- ROOT=/mnt upgradepkg package.tgz (or .tbz, .tlz, .txz)
-
+Usage: upgradepkg [options] <newpackage> ...
+ upgradepkg [options] <oldpackage%newpackage> ...
+
+Upgrade, install, or reinstall Slackware packages (.tgz, .tbz, .tlz, .txz).
+
+To operate on an alternate directory, such as /mnt:
+ ROOT=/mnt upgradepkg package.txz
+
+Options:
+ --dry-run only display what would be done
+ --install-new install new packages also
+ --reinstall upgrade packages of the same version
+ --terse display a single line for each package operation
+ --terselength <length> maximum line length of terse output
+ --verbose display all the gory details of the upgrade
+ --help display this help
+
+For more details see upgradepkg(8).
EOF
}
@@ -106,7 +103,7 @@ else
fi
# --help or no args?
-if [ "$1" = "" -o "$1" = "--help" -o "$1" = "-?" ]; then
+if [ "$1" = "" -o "$1" = "-help" -o "$1" = "--help" -o "$1" = "-?" ]; then
usage;
exit 1;
fi
@@ -208,7 +205,7 @@ for ARG; do
# Simple package integrity check:
if ! [ -f "$NEW" ]; then
ERRCODE=4
- ! [ $TERSE ] && echo "Cannot install $ARG: file not found"
+ echo "Cannot install $NEW: file not found"
continue;
fi
@@ -224,7 +221,7 @@ for ARG; do
# Make sure the extension is valid:
if [ "$NNAME" = "$NEW" ]; then
# We won't throw an ERRCODE for this, but the package is skipped:
- ! [ $TERSE ] && echo "Cannot install $OLD: invalid package extension"
+ echo "Cannot install $OLD: invalid package extension"
continue;
fi
@@ -250,7 +247,7 @@ for ARG; do
echo "$OLD would not be upgraded (no installed package named $SHORT)."
else
! [ $TERSE ] && echo
- ! [ $TERSE ] && echo "Error: there is no installed package named $OLD."
+ echo "Error: there is no installed package named $OLD."
! [ $TERSE ] && echo " (looking for $ROOT/var/log/packages/$OLD)"
! [ $TERSE ] && echo
fi
@@ -286,7 +283,7 @@ EOF
echo "$NEW incoming package not found (command line)."
else
! [ $TERSE ] && echo
- ! [ $TERSE ] && echo "Error: incoming package $INCOMINGDIR/$NNAME not found."
+ echo "Error: incoming package $INCOMINGDIR/$NNAME not found."
! [ $TERSE ] && echo
fi
ERRCODE=1