Rename option --upgrade to --install-new

This commit is contained in:
Dimitris Zlatanidis 2015-06-10 20:11:29 +03:00
parent 02dede52bd
commit b6e8b1aa01
5 changed files with 7 additions and 7 deletions

View file

@ -4,7 +4,7 @@ _slpkg()
cur=${COMP_WORDS[COMP_CWORD]}
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W "--autobuild --blacklist --queue --list --check --sync --tracking --print --network --FIND --find --install --upgrade --reinstall --remove --display" -- $cur ))
COMPREPLY=( $( compgen -W "--autobuild --blacklist --queue --list --check --sync --tracking --print --network --FIND --find --install --install-new --reinstall --remove --display" -- $cur ))
else
_filedir

View file

@ -13,7 +13,7 @@ complete --command slpkg --long-option network --short-option n --description 'V
complete --command slpkg --long-option find --short-option f --description 'Find and print installed packages reporting the size and the sum.'
complete --command slpkg --long-option FIND --short-option F --description 'Find packages from repositories and search at each enabled repository and prints results.'
complete --command slpkg --long-option install --short-option i --description 'Installs single or multiple Slackware binary packages.'
complete --command slpkg --long-option upgrade --short-option u --description 'Upgrade single or multiple Slackware binary packages from a older to a newer one.'
complete --command slpkg --long-option install-new --short-option u --description 'Upgrade single or multiple Slackware binary packages from a older to a newer one.'
complete --command slpkg --long-option reinstall --short-option o --description 'Reinstall signle or multiple Slackware binary packages with the same packages if the exact.'
complete --command slpkg --long-option remove --short-option r --description 'Removes a previously installed Slackware binary packages.'
complete --command slpkg --long-option display --short-option d --description 'Display the installed packages contents and file list.'

View file

@ -179,7 +179,7 @@ build or install etc.
Installs single binary packages designed for use with the Slackware Linux
distribution into your system.
.SS -u, --upgrade, install-upgrade Slackware binary packages with new
.SS -u, --install-new, install-upgrade Slackware binary packages with new
\fBslpkg\fP \fB-u\fP <\fIpackages.t?z\fP>
.PP
Normally upgrade only upgrades packages that are already installed on the system,

View file

@ -101,7 +101,7 @@ Optional arguments:
reporting the size and the sum.
-i, --install, [package...] Installs single or multiple
Slackware binary packages.
-u, --upgrade, [package...] Upgrade single or multiple Slackware
-u, --install-new, [package...] Upgrade single or multiple Slackware
binary packages from a older to a
newer one.
-o, --reinstall, [package...] Reinstall signle or multiple

View file

@ -75,7 +75,7 @@ class ArgParse(object):
if (len(self.args) > 1 and
self.args[0] in ["-f", "--find", "-i", "--install", "-u",
"--upgrade", "-o", "--reinstall", "-r",
"--install-new", "-o", "--reinstall", "-r",
"--remove", "-d", "--display", "-n",
"--network"] and
self.args[1].endswith(".pkg")):
@ -334,7 +334,7 @@ class ArgParse(object):
def bin_upgrade(self):
""" install-upgrade Slackware binary packages """
options = ["-u", "--upgrade"]
options = ["-u", "--install-new"]
if len(self.args) > 1 and self.args[0] in options:
PackageManager(self.packages).upgrade()
else:
@ -465,7 +465,7 @@ def main():
"-i": argparse.bin_install,
"--install": argparse.bin_install,
"-u": argparse.bin_upgrade,
"--upgrade": argparse.bin_upgrade,
"--install-new": argparse.bin_upgrade,
"-o": argparse.bin_reinstall,
"--reinstall": argparse.bin_reinstall,
"-r": argparse.bin_remove,