diff options
Diffstat (limited to 'source/a')
-rw-r--r-- | source/a/pkgtools/manpages/upgradepkg.8 | 12 | ||||
-rwxr-xr-x | source/a/pkgtools/pkgtools.SlackBuild | 2 | ||||
-rw-r--r-- | source/a/pkgtools/scripts/upgradepkg | 49 |
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 |