UPGRADEPKG(8)

NAME
upgradepkg - upgrade Zenwalk and Slackware packages.

SYNOPSIS
upgradepkg [ [--warn|-w|--dry-run|-d] | [--no-verbose|-q] | [--ask|-a] I [--raw|-R] ] [--install-new|-i] [--reinstall|-I] [--unique|-u] [--separator charcaters | -s characters] [--root /otherroort | -r /otherroot] [--max number | -m /number] [--list number | -l number] [--fast|-f] [--] packagename[%oldpackagename] [packagename2[%oldpackagename2]...]

DESCRIPTION
upgradepkg upgrades previously installed Zenwalk and Slackware packages from old version to new version.It does this by REMOVING files from the old package, and then INSTALLING the new package onto the system.If the old and new packages have the same basename, a single argument is all that is required. If the packages have different basenames, supply the name of the old package followed by separator ( as set by --separator or -s option, see OPTIONS below) which by default is a percent symbol (%). Do not add any extra whitespace between pairs of old/new package names.

If upgradepkg finds more than one installed package matching the old package's basename, it will remove them all.This behaviour can be modified by using --unique or -u option ( see OPTIONS below)

OPTIONS

-w, --warn,-d, --dry-run
    Turn on the warn mode(see MODES below)Generate a report to the standard output about which packages would be removed or installed but do not actually install or remove any of them

-r,--raw
    Turn on the raw mode(see MODES below).Do not show a spinning bar.List all the files being removed. Normally only warnings and errors are shown, e.g. if some files were not found.

-s character,--separator character
    the default separator '%' though uncommon may be a part of package names and therefore you may specify a different separator.Alphanumeric characters, / , - , . are strictly not allowed to be part of separator.Separator can be more than one character long but not more than 3.Be sure to use a separator that is not present in any of package names given on commandline .The first occurence of the separator is treated as the division point to break the packages into names

-V,--no-verbose
    Turn on the no-verbose mode (see MODES below).Hide all messages and display only a summary of error,if any, for each package on standard error after upgradepkg has processed all the packages. -r /otherroort ,--root /otherroot -R /otherroot, --root /otherroot Upgrade using a location other than / (the default) as the root of the filesystem. In the example given, use /otherroot instead. Setting the ROOT environment variable does the same thing.

-a,--ask
    Turn on the interactive mode(see MODES below),clear the screen and ask user to choose among installed packages matching given package names to be removed

-u,--unique
    do not upgrade and report error if the given packagename or oldpackagename matches more than one package installed.

-m  number , --max number
    set the maximum number of matches allowed to be removed for a given packagename or oldpackagename (if specified) In case the number of matched packages is greater than number then upgradepkg doesnot remove or ask the user to select the packages and continues to next package. number can be any integer greater than or equal to 0.if number is 0 , then the maximum limit of matched packages allowed to be removed is infinity, that is any number of matches are allowed for removal. By default number is set to 0.

--list number, -l number
    Set the number of packages to list in ask mode ( see MODES below) for selection in case more than one package matches the given packagename or oldpackagename (if specified)

--fast, -f
    Do not create backups while removing or overwriting files thereby making upgradepkg a little faster, use of this option is not advisable

MODES
like installpkg (8) and removepkg (8), upgradepkg functions in various modes which are mutually exclusive.These modes control the behaviour of upgradepkg such as the output produced by it, the action taken for each package,etc

  SPIN MODE
This is the default mode.In this mode,packages are upgraded with only limited output and errors and a spinning bar is displayed while waiting for processes to complete.

  WARN MODE
This mode is turned on by --warn , -w , --dry-run or -d option.In this mode, packages are not removed but fate for each package if called in any other mode is printed on standard output

  ASK MODE
this mode is turned on by --ask or -a. This is interactive mode where screen is saved and cleared.A progress bar for number of packages processed is displayed. upgradepkg asks user to select matched packages for removal if the number of matched packages is more than one and less than maximum allowed ( see -m number , --max number ).Before removing selected packages , user is prompted to confirm.This mode is advised to be used especially while using globbing patterns (see GLOBBING above)

  RAW MODE
This mode is turned on by --raw or -r option.This mode turns off the display of spinning bar and also lists all the files being removed.

  QUIET MODE
This mode is turned on by --no-verbose,-V. All the messages are suppessed and only a summary of error messages are displayed after all packages have been processed (see ERROR REPORT below)

ENVIRONMENT

ROOT
    Setting this is equivalent to using the --root /otherroot command line parameter.

SOURCE
    define a different location for source scripts and other files required by upgradepkg, default is /usr/libexec/zenpakt

USERPATH
    Add preffered search path for commands. It is a colon-separated list of directories in which upgradepkg will look for commands in addition to other usual directories which are internally defined.By default upgradepkg looks in /bin,/sbin,/usr/bin,/usr/sbin,/usr/local/bin,/usr/local/sbin.A zero-length (null) directory name in the value of USERPATH indicates the current directory.

EXIT STATUS
upgradepkg can upgrade more than one package at a time.The exit status is zero unless their is a preprocessing error or an error while processing a package. Preprocessing errors occur before any package is processed and cause upgradepkg to exit immediately without processing any package with a non zero exit status.An error while processing a package causes upgradepkg
 to jump to next package.The error is reported on standard error unless quiet mode is not enabled.A summary of error messages is reported on standard error after processing all packages (see ERROR REPORT below).The exit status is set corresponding to the last error occured while processing a package.The exit statuses are given below

    •   1 failed to source functions.
                the functions file doesnot exist at a place where upgradepkg expects to find it

    •   2 you are not root

    •   3 invalid arguments specified

    •   4 tar not found in PATH

    •   5 database locked by another process

    •   6 failed to initialize package databse

    •   7 failed to create temporary directory

    •   8 package database doesnot exist

    •   9 comm not found in PATH

    •   10 interactive mode needs standard input connected to the terminal

    •   11 interactive mode needs standard output connected to the terminal

    •   12 interactive mode needs standard error connected to the terminal

    •   13 external compression utility missing

    •   31 package is not a valid file

    •   32 package doesnot have a valid extension

    •   33 no packages with the given name installed

    •   34 old package is same as new package

    •   35 more than one package with same name installed

    •   36 found more packages installed than maximum allowed to be removed

    •   37 no packages selected for removal

    •   61 failed to create temporary directory

    •   62 failed to fetch file list for installed packages

    •   63 failed to remove files

    •   64 failed to move package index

    •   65 failed to move package doinst script

    •   66 failed to obtain package description

    •   67 error getting filelist for package to be installed

    •   68 error writing database

    •   70 error removing symlinks

    •   71 error exploding package

    •   72 error copying installation script to scripts dir

    •   73 error executing doinst

    •   74 doinst.sh doesnot exist or failed to extract

ERROR REPORT
upgradepkg can take multiple package names as argument and thus upgrade many packages when called once.The errors occuring in processing one package causes upgradepkg to jump to the next package argument.An error message is displayed if upgradepkg is not in quiet mode ( see MODES above).In all modes, except warn mode, a summary or report of errors occured for each package is displayed after all package have been processed. The error report is generally of the format:

packagename: error_status ( error_message )

packagename is name of the package, error_status is the exit or error status related to the error that occured while processing the package, and error_message is a short message explaining the error that had occured

EXAMPLES

upgradepkg -Ii ./acl-2.2.47_1-i486-1.txz
    This will install acl if it is not already installed,reinstall if same version is installed or otherwise upgrade the package to version 2.2.47

upgradepkg ./new-2.2.47_1-i486-1.txz%old
    This will upgrade installed versions of package old and replace it with package new

upgradepkg -s @ weird_package_with_%_in_name.txz
    This will upgrade the package with previous version.The separator is never used but is used to allow % in the package name not to be treated as special

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.

AUTHORS
Anshul Narula <sunny_delhi18@yahoo.com>

SEE ALSO
installpkg(8), removepkg(8), upgradepkg(8), explodepkg(1), makepkg(1)