From 96aa10d1ee657e7809a98d42ea2b6b797cdcd1c5 Mon Sep 17 00:00:00 2001 From: dslackw Date: Mon, 12 May 2014 09:14:36 +0300 Subject: [PATCH] updated for version 1.0.8 --- README.rst | 27 ++++++++++++++------------ bin/slpkg.py | 26 +++++++++++++++++-------- man/slpkg.8 | 51 ++++++++++++++++++++++++++++--------------------- man/slpkg.8.gz | Bin 1856 -> 1973 bytes 4 files changed, 62 insertions(+), 42 deletions(-) diff --git a/README.rst b/README.rst index 1211a434..ec6167eb 100644 --- a/README.rst +++ b/README.rst @@ -48,21 +48,24 @@ Command Line Tool Usage .. code-block:: bash - usage: slpkg [-h] [-v] [-u] [-a] [-s name script source] [-r] [-l] [-f] [-d] + usage: slpkg.py [-h] [-v] [-s script source] [-l all, sbo [all, sbo ...]] [-i] + [-u] [-a] [-r] [-f] [-d] Utility to help package management in Slackware - + optional arguments: - -h, --help show this help message and exit - -v, --verbose print version and exit - -u, --upgrade install-upgrade package with new - -a, --reinstall reinstall the same package - -s script source, --slackbuild script source - auto build package - -r, --remove remove package - -l, --list list of installed packages - -f, --find find if package installed - -d, --display display the contents of the package + -h, --help show this help message and exit + -v, --verbose print version and exit + -s script source, --slackbuild script source + auto build package + -l all, sbo [all, sbo ...], --list all, sbo [all, sbo ...] + list of installed packages + -i , --install install binary package + -u , --upgrade install-upgrade package with new + -a , --reinstall reinstall the same package + -r , --remove remove package + -f , --find find if package installed + -d , --display display the contents of the package Slpkg Examples diff --git a/bin/slpkg.py b/bin/slpkg.py index f89592a1..4d07ab86 100755 --- a/bin/slpkg.py +++ b/bin/slpkg.py @@ -29,14 +29,16 @@ def main(): action="store_true") parser.add_argument("-s", "--slackbuild", help="auto build package", type=str, nargs=2, metavar=('script','source')) + parser.add_argument("-l", "--list", help="list of installed packages", + nargs="+", choices="all sbo".split(), metavar=('all, sbo')) + parser.add_argument("-i", "--install", help="install binary package", + type=str, metavar=('')) parser.add_argument("-u", "--upgrade", help="install-upgrade package with new", type=str, metavar=('')) parser.add_argument("-a", "--reinstall", help="reinstall the same package", type=str, metavar=('')) parser.add_argument("-r", "--remove", help="remove package", type=str, metavar=('')) - parser.add_argument("-l", "--list", help="list of installed packages", - action="store_true") parser.add_argument("-f", "--find", help="find if package installed", type=str, metavar=('')) parser.add_argument("-d", "--display", help="display the contents of the package", @@ -65,6 +67,18 @@ def main(): os.chdir(path + pkg_name) os.system("sh {}{}{}".format(path, pkg_name + "/", pkg_name + ".SlackBuild")) + ''' view list of installed packages ''' + if args.list: + if "all" in args.list: + os.system("ls " + __packages__ + "* | more") + + if "sbo" in args.list: + os.system("ls " + __packages__ + "* | grep 'SBo' | more") + + ''' install binary package ''' + if args.install: + os.system("installpkg {}".format(args.install)) + ''' upgrade package with new ''' if args.upgrade: os.system("upgradepkg --install-new {}".format(args.upgrade)) @@ -83,10 +97,6 @@ def main(): if remove_pkg == "y" or remove_pkg == "Y": os.system("removepkg {}".format(args.remove)) - ''' view list of installed packages ''' - if args.list: - os.system("ls " + __packages__ + "* | more") - ''' find if package installed on your system ''' if args.find: if find_package(args.find) == "": @@ -101,8 +111,8 @@ def main(): else: os.system("cat {}".format(find_package(args.display))) ''' fix null arguments ''' - if not any([args.verbose, args.upgrade, args.reinstall, args.slackbuild, - args.remove, args.list, args.find, args.display]): + if not any([args.verbose, args.slackbuild, args.install, args.upgrade, args.reinstall, + args.remove, args.list, args.find, args.display]): os.system("slpkg -h") diff --git a/man/slpkg.8 b/man/slpkg.8 index ef34aecf..3aaaf635 100644 --- a/man/slpkg.8 +++ b/man/slpkg.8 @@ -22,16 +22,18 @@ remove, find and view Slackware packages contents. .PP It's a quick and easy way to manage your packages in slackware to a command. .SH EXAMPLES - \fB-h, --help show this help message and exit\fP - \fB-v, --verbose print version and exit\fP - \fB-u, --upgrade install-upgrade package with new\fP - \fB-a, --reinstall reinstall the same package\fP - \fB-s script source, --slackbuild script source\fP - \fB auto build package\fP - \fB-r, --remove remove package\fP - \fB-l, --list list of installed packages\fP - \fB-f, --find find if package installed\fP - \fB-d, --display display the contents of the package\fP + \fB-h, --help show this help message and exit\fP + \fB-v, --verbose print version and exit\fP + \fB-s script source, --slackbuild script source\fP + \fB auto build package\fP + \fB-l all, sbo [all, sbo ...], --list all, sbo [all, sbo ...]\fP + \fB list of installed packages\fP + \fB-i , --install install binary package\fP + \fB-u , --upgrade install-upgrade package with new\fP + \fB-a , --reinstall reinstall the same package\fP + \fB-r , --remove remove package\fP + \fB-f , --find find if package installed\fP + \fB-d , --display display the contents of the package\fP .SH GLOBAL OPTIONS .TP \fB\-v\fP, \fB\-\-verbose\fP @@ -39,7 +41,21 @@ Print the version of program and exit. .SH COMMANDS .PP The following commands are available. -.SS -u --upgrade +.SS -s script source, --slackbuild script source +\fBslpkg\fP \fB-s\fP <\fIscript\fP> <\fIsource\fP> +.PP +With this argument, build slackware package quickly and easy. +Support .tar.gz and .tar.bz2 slackbuilds archives. +.SS -l all, sbo [all, sbo ...], --list all, sbo [all, sbo ...] +\fBslpkg\fP \fB-l\fP <\fIall\fP> <\fIsbo\fP> +.PP +Two display options list, one for all packages and another +only for packages SBo. +.SS -i , --install install binary package +\fBslpkg\fP \fB-i\fP <\fIpackage.tgz or .txz\fP> +Installs single binary packages designed for use with the +Slackware Linux distribution into your system. +.SS -u , --upgrade install-upgrade package with new \fBslpkg\fP \fB-u\fP <\fIpackage.tgz or .txz\fP> .PP Normally upgrade only upgrades packages that are already @@ -49,16 +65,11 @@ already have a version installed. 'Requires root privileges' .SS -a --reinstall \fBslpkg\fP \fB-a\fP <\fIpackage.tgz or .tgz or else\fP> .PP -Upgradepkg usually skips packages ifthe exact same package +Upgradepkg usually skips packages if the exact same package (matching name, version, arch, and build number) is already installed on the system.'Requires root privileges' (like slackware command upgradepkg --reinstall) -.SS -s name script source -\fBslpkg\fP \fB-s\fP <\fIscript\fP> <\fIsource\fP> -.PP -With this argument, build slackware package quickly and easy. -Support .tar.gz and .tar.bz2 slackbuilds archives. -.SS -r --remove +.SS -r , --remove package \fBslpkg\fP \fB-r\fP <\fIname of package\fP> .PP Removes a previously installed Slackware package, while writing @@ -66,10 +77,6 @@ a progress report to the standard output. A package may be specified either by the full package name (as you'd see listed in /var/log/packages/), or by the base package name. 'Requires root privileges' (like slackware command removepkg) -.SS -l --list -\fBslpkg\fP \fB-l\fP -.PP -List all installed packages. .SS -f --find \fBslpkg\fP \fB-f\fP <\fIname of package\fP> .PP diff --git a/man/slpkg.8.gz b/man/slpkg.8.gz index bb0b02ab47359cabeeb0277ea0be0144181d2ad5..ae3d85516630146a610232ff12952ea4e9493a97 100644 GIT binary patch literal 1973 zcmV;m2TJ%KiwFo}W^hvi19NO}YiBMv0G(KSZyHGw|9j_CRHBn&pI}(;Hf6~xzR~N zqaZ}G3tjAtTCE+NT%5u$KcBsaOO+{Sl!bq%!iikP%F-KiW=_#&2MSL7k$v08iUH2{aP1j)f$0 z&u<_~i^mnb{qPpv{+;6m2bR`wJGy~!|8@}Y9J+AlRH{&8r(rGA0t&Hw6e|gt$nh(a zxg&=~DK68^F@xxSJefwrD1e9L6Ek{9rtsw<8TzZSIQ>d{U%KnBw8g_sJ1pUDdOho3 z4%#IFv%zp2&HJNKyJ&FncJlk)v9ui~=*#hCJCEUV7)?k0dtUktwOQ&6&4|0gtV*(k z^!gZvAscZyh%RQs>3ldD2m5AVvGe_L4U+>wr`-ET1%%^m!!e>)uw@Xp9v-E{}LUB2+Wk6r66nu8wT zolIIwa#;M6a_F6kdPCHhbPJ7fSbqwmFj(p|J|?nYmqry1v8XglNi0}l_TAxLL-c)! z6eZf{$tv?(DJk#;*oB5K%?R)OE6GDxaxd*SEPnclWY9l8j%ZX}t8B#CR-OW4T%D*D ztfvc%A+tMHvSgwvNS+Zj%XKCa+CVP1ExBNFBM+puQwm5cGI=c5RD=|gjW?_5(cy#- zbKJHco~oo#u5nFE7c(6qZjoZRR-bxGy48_h1O1+4iqz}T$CnYO*nCYGN;$0ZRh=xDbeKM3gMca) zsU)%p{+G}_z!DDo8jbuhf*?PwBmE<5^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