updated for verssion 1.9.3

This commit is contained in:
Dimitris Zlatanidis 2014-09-30 04:16:43 +03:00
parent 0ce01ae998
commit f17fc64ea5
11 changed files with 109 additions and 86 deletions

View file

@ -1,3 +1,9 @@
Version 1.9.3
29-09-2014
[Feature] - Added blacklist configuration file.
- Added blacklist options.
Version 1.9.2
27-09-2014

View file

@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: slpkg
Version: 1.9.2
Version: 1.9.3
Author: dslackw
Author-email: d zlatanidis at gmail com
Maintainer: dslackw

View file

@ -7,9 +7,9 @@
Latest Release:
- Version: 1.9.2
- Version: 1.9.3
- `Package <https://sourceforge.net/projects/slpkg/files/slpkg/binary/>`_
- `Source <https://github.com/dslackw/slpkg/archive/v1.9.2.tar.gz>`_
- `Source <https://github.com/dslackw/slpkg/archive/v1.9.3.tar.gz>`_
- `CHANGELOG <https://github.com/dslackw/slpkg/blob/master/CHANGELOG>`_
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png
@ -88,7 +88,7 @@ Tutorial
--------
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/screenshot-1.png
:target: https://asciinema.org/a/12340
:target: https://asciinema.org/a/12544
Installation
@ -98,8 +98,8 @@ Untar the archive and run install.sh script:
.. code-block:: bash
$ tar xvf slpkg-1.9.2.tar.gz
$ cd slpkg-1.9.2
$ tar xvf slpkg-1.9.3.tar.gz
$ cd slpkg-1.9.3
$ ./install.sh
Using `pip <https://pip.pypa.io/en/latest/>`_ :
@ -120,28 +120,31 @@ Command Line Tool Usage
-----------------------
.. code-block:: bash
slpkg - Utility for easy management packages in Slackware
Utility for easy management packages in Slackware
Optional arguments:
-h, --help show this help message and exit
-v, --version print version and exit
-a, script [source...] auto build packages
-l, all, sbo, slack, noarch list of installed packages
-c, <repository> --upgrade check if your packages is up to date
-s, <repository> <package> download, build & install packages
-f, <package> find installed packages
-t, <package> packages tracking dependencies from SBo
-n, <package> view packages from SBo repository
-i, [package...] install binary packages
-u, [package...] upgrade binary packages
-o, [package...] reinstall binary packages
-r, [package...] remove binary packages
-d, [package...] display the contents of the packages
-h, --help show this help message and exit
-v, --version print version and exit
-a, script [source...] auto build packages
-l, all, sbo, slack, noarch list of installed packages
-c, <repository> --upgrade check if your packages is up to date
-s, <repository> <package> download, build & install packages
-f, <package> find installed packages
-t, <package> packages tracking dependencies from SBo
-n, <package> view packages from SBo repository
-b, --list blacklisted packages
-b [package...] --add --remove add, remove packages in blacklist
-i, [package...] install binary packages
-u, [package...] upgrade binary packages
-o, [package...] reinstall binary packages
-r, [package...] remove binary packages
-d, [package...] display the contents of the packages
Repositories:
SlackBuilds = sbo
Slackware = slack
Slpkg Examples
--------------
@ -576,6 +579,35 @@ Remove packages with all dependencies:
| Package werkzeug removed
+==============================================================================
Using the blacklist file manually from /etc/slpkg/blacklist or
with the following options:
.. code-block:: bash
$ slpkg -b live554 speex faac --add
Add packages in blacklist:
live555
speex
faac
$ slpkg -b speex --remove
Remove packages from blacklist:
speex
$ slpkg -b --list
Packages in blacklist:
live555
faac
Man page it is available for full support:
.. code-block:: bash

View file

@ -21,7 +21,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=slpkg
VERSION=${VERSION:-1.9.2}
VERSION=${VERSION:-1.9.3}
TAG=${TAG:-_dsw}
cd ..

View file

@ -27,25 +27,29 @@ slpkg - Utility for easy management packages in Slackware
.PP
It's a quick and easy way to manage your packages in slackware to a command.
.SH EXAMPLES
\fBOptional arguments:
-h, --help show this help message and exit
-v, --version print version and exit
-a, script [source...] auto build packages
-l, all, sbo, slack, noarch list of installed packages
-c, <repository> --upgrade check if your packages is up to date
-s, <repository> <package> download, build & install packages
-f, <package> find installed packages
-t, <package> packages tracking dependencies from SBo
-n, <package> view packages from SBo repository
-i, [package...] install binary packages
-u, [package...] upgrade binary packages
-o, [package...] reinstall binary packages
-r, [package...] remove binary packages
-d, [package...] display the contents of the packages
\fBUtility for easy management packages in Slackware
Repositories:
SlackBuilds = sbo
Slackware = slack\fp
Optional arguments:
-h, --help show this help message and exit
-v, --version print version and exit
-a, script [source...] auto build packages
-l, all, sbo, slack, noarch list of installed packages
-c, <repository> --upgrade check if your packages is up to date
-s, <repository> <package> download, build & install packages
-f, <package> find installed packages
-t, <package> packages tracking dependencies from SBo
-n, <package> view packages from SBo repository
-b, --list blacklisted packages
-b [package...] --add --remove add, remove packages in blacklist
-i, [package...] install binary packages
-u, [package...] upgrade binary packages
-o, [package...] reinstall binary packages
-r, [package...] remove binary packages
-d, [package...] display the contents of the packages
Repositories:
SlackBuilds = sbo
Slackware = slack\fP
.SH GLOBAL OPTIONS
.TP
@ -88,6 +92,16 @@ The sequence shown is that you must follow to correctly install package.
.PP
With this method you can find the SBo script that interests you through
the network. (www.slackbuilds.org)
.SS -b , --list blacklisted packages
\fBslpkg\fP \fB-b\fP \fB--list\fP
.PP
Print all blacklist packages. Each package listed here may not be
installed be upgraded be find or deleted.
.SS -b , <packages> -- add --remove
\fBslpkg\fP \fB-b\fP <\fIpackages\fP> \fB--add\fP \fB--remove\fP
.PP
Add or remove packages from blacklist. The settings here affect
all repositories.
.SS -i , install binary package
\fBslpkg\fP \fB-i\fP <\fIpackages.t?z\fP>
.PP

View file

@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=slpkg
VERSION=${VERSION:-1.9.2}
VERSION=${VERSION:-1.9.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_dsw}

View file

@ -1,7 +1,7 @@
PRGNAM="slpkg"
VERSION="1.9.2"
VERSION="1.9.3"
HOMEPAGE="https://github.com/dslackw/slpkg"
DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.9.2.tar.gz"
DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.9.3.tar.gz"
MD5SUM=""
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""

View file

@ -23,7 +23,9 @@
import os
import sys
import getpass
from messages import s_user
from url_read import url_read
from __metadata__ import log_path, lib_path, bls_path
from file_size import server_file_size, local_file_size
@ -36,6 +38,7 @@ def initialization():
/var/lib/slpkg/sbo_repo/ and ChangeLog.txt in /var/log/slpkg/ from
slackbuilds.org
'''
s_user(getpass.getuser())
blacklist_conf = [
"# This is the blacklist file. Each package listed here may not be\n",
"# installed be upgraded be find or deleted.\n",

View file

@ -21,37 +21,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
'''
slpkg - Utility for easy management packages in Slackware
Optional arguments:
-h, --help show this help message and exit
-v, --version print version and exit
-a, script [source...] auto build packages
-l, all, sbo, slack, noarch list of installed packages
-c, <repository> --upgrade check if your packages is up to date
-s, <repository> <package> download, build & install packages
-f, <package> find installed packages
-t, <package> packages tracking dependencies from SBo
-n, <package> view packages from SBo repository
-i, [package...] install binary packages
-u, [package...] upgrade binary packages
-o, [package...] reinstall binary packages
-r, [package...] remove binary packages
-d, [package...] display the contents of the packages
Repositories:
SlackBuilds = sbo
Slackware = slack
'''
import getpass
from colors import *
from messages import s_user
from version import prog_version
from blacklist import blacklisted, add_blacklist, remove_blacklist
from __metadata__ import path, __version__
from blacklist import blacklisted, add_blacklist, remove_blacklist
from pkg.manager import *
from pkg.build import build_package
@ -66,6 +42,8 @@ from slack.install import install
def main():
s_user(getpass.getuser())
arguments = [
"slpkg - version {0}\n".format(__version__),
"Utility for easy management packages in Slackware\n",
@ -96,7 +74,8 @@ def main():
" [-l all, sbo, slack, noarch]",
" [-c <repository> --upgrade]",
" [-s <repository> <package>]",
" [-f] [-t] [-n] [-i [...]]",
" [-f] [-t] [-n] [-b --list]",
" [-b [...] --add --remove] [-i [...]]",
" [-u [...]] [-o [...]] [-r [...]] [-d [...]]\n",
"For more information try 'slpkg --help'\n"
]
@ -110,7 +89,6 @@ def main():
elif len(args) == 1 and args[0] == "-v" or args[0] == "--version":
prog_version()
elif len(args) == 3 and args[0] == "-a":
s_user(getpass.getuser())
build_package(args[1], args[2:], path)
elif len(args) == 2 and args[0] == "-l":
sbo_list = ["all", "sbo", "slack", "noarch"]
@ -119,7 +97,6 @@ def main():
else:
for opt in usage: print(opt)
elif len(args) == 3 and args[0] == "-c":
s_user(getpass.getuser())
if args[1] == repository[0] and args[2] == "--upgrade":
sbo_check()
elif args[1] == repository[1] and args[2] == "--upgrade":
@ -127,37 +104,27 @@ def main():
else:
for opt in usage: print(opt)
elif len(args) == 3 and args[0] == "-s":
s_user(getpass.getuser())
if args[1] == repository[0]:
sbo_build(args[2])
elif args[1] == repository[1]:
install(args[2])
elif len(args) == 2 and args[0] == "-t":
s_user(getpass.getuser())
pkg_tracking(args[1])
elif len(args) == 2 and args[0] == "-n":
s_user(getpass.getuser())
sbo_network(args[1])
elif len(args) == 2 and args[0] == "-b" and args[1] == "--list":
s_user(getpass.getuser())
blacklisted()
elif len(args) > 2 and args[0] == "-b" and args[-1] == "--add":
s_user(getpass.getuser())
add_blacklist(args[1:-1])
elif len(args) > 2 and args[0] == "-b" and args[-1] == "--remove":
s_user(getpass.getuser())
remove_blacklist(args[1:-1])
elif len(args) > 1 and args[0] == "-i":
s_user(getpass.getuser())
pkg_install(args[1:])
elif len(args) > 1 and args[0] == "-u":
s_user(getpass.getuser())
pkg_upgrade(args[1:])
elif len(args) > 1 and args[0] == "-o":
s_user(getpass.getuser())
pkg_reinstall(args[1:])
elif len(args) > 1 and args[0] == "-r":
s_user(getpass.getuser())
pkg_remove(args[1:])
elif len(args) > 1 and args[0] == "-f":
pkg_find(args[1:])
@ -165,5 +132,6 @@ def main():
pkg_display(args[1:])
else:
for opt in usage: print(opt)
if __name__ == "__main__":
main()

View file

@ -174,7 +174,7 @@ def pkg_find(binary):
matching = size = int()
print("\nInstalled packages with name matching [ {0}{1}{2} ]\n".format(
CYAN, binary, ENDC))
for match in sorted(os.listdir(pkg_path)):
for match in sorted(find_package(binary, pkg_path)):
if binary in match:
matching += 1
print("[ {0}installed{1} ] - {2}".format(

View file

@ -27,6 +27,6 @@ def prog_version():
'''
Print version, license and email
'''
print ("Version : {}".format(__version__))
print ("Licence : {}".format(__license__))
print ("Email : {}".format(__email__))
print ("Version : {0}".format(__version__))
print ("Licence : {0}".format(__license__))
print ("Email : {0}".format(__email__))