From 3bb7d7d25a3a20af26859f841deaacc137a8d2c9 Mon Sep 17 00:00:00 2001 From: dslackw Date: Sat, 17 May 2014 05:25:16 +0300 Subject: [PATCH] updated for version 1.1.9 --- CHANGELOG | 6 ++++++ PKG-INFO | 2 +- README.rst | 13 +++++++------ bin/slpkg | 24 +++++++++++++----------- setup.py | 2 +- 5 files changed, 28 insertions(+), 19 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 8095d528..08b239fa 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +17-05-2014 +Version 1.1.9 + +[Updated] - Fix notify message if exist package in fuction remove + + 17-05-2014 Version 1.1.8 diff --git a/PKG-INFO b/PKG-INFO index 8e69e531..86e9e2dc 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: slpkg -Version: 1.1.8 +Version: 1.1.9 Author: dslackw Author-email: d zlatanidis at gmail com Maintainer: dslackw diff --git a/README.rst b/README.rst index cbbc823d..ebf5218d 100644 --- a/README.rst +++ b/README.rst @@ -252,12 +252,13 @@ Find if your packages installed: $ slpkg -f termcolor lua yetris you-get rar pip - The package `termcolor` is installed on your system - The package `lua` is not installed on your system - The package `yetris` is installed on your system - The package `you-get` is not installed on your system - The package `rar` is installed on your system - The package `pip` is installed on your system + -----> termcolor-1.1.0-x86_64-1_SBo + The package `lua` is not found + -----> yetris-2.0.1-x86_64-1_SBo + The package `you-get` is not found + -----> rar-5.0.1-x86_64-1_SBo + -----> pip-1.5.4-x86_64-1_SBo + Display the contents of the package: diff --git a/bin/slpkg b/bin/slpkg index 6c44728a..a9761aee 100755 --- a/bin/slpkg +++ b/bin/slpkg @@ -16,10 +16,13 @@ import argparse import subprocess __author__ = "dslackw" -__version__ = "1.1.8" +__version__ = "1.1.9" __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com" + + + # path file record packages = "/var/log/packages/" tmp = "/tmp/" @@ -33,7 +36,8 @@ repository = ("academic", "business", "games", "ham", "desktop", "gis", "haskell", "multimedia", "perl", "system", "audio", "development", "graphics", "lbraries", "network", "python") -import getpass + + # print out colors class class colors: RED = "\e[31m" @@ -62,7 +66,7 @@ def rmv_unused(name): return name -# this fuction return the path of the package +# this fuction return if the package exist def find_package(find_pkg): results = [] @@ -71,10 +75,6 @@ def find_package(find_pkg): results.append(file) return results -# find_pkg = subprocess.check_output(["find " + packages + " -name '{}*' 2> -#/dev/null".format(find_pkg)], shell=True) -# return find_pkg - # open url and read page def url_read(name): @@ -119,6 +119,7 @@ def sbo_slackbuild_dwn(sbo_url, name): return sbo_url + # find source downloads def sbo_source_dwn(sbo_url, name): sbo_url = sbo_url + name + ".info" @@ -231,7 +232,6 @@ def main(): # find from SBo repositority www.slackbuild.org if args.network: - # call function `sbo_search_pkg` find_sbo_url = sbo_search_pkg(args.network) if find_sbo_url == None: print @@ -266,6 +266,7 @@ def main(): colors.ENDC, find_sbo_req)) print + # install binary package if args.install: s_user(getpass.getuser()) @@ -287,17 +288,18 @@ def main(): # uninstall package if args.remove: s_user(getpass.getuser()) + print os.system("echo -e '{}!!! WARNING !!!{}'".format(colors.YELLOW, colors.ENDC)) remove_pkg = raw_input("Are you sure to remove this package(s) [y/n] ") if remove_pkg == "y" or remove_pkg == "Y": for i in range(len(args.remove)): - # call function `find_package` - if find_package(args.remove[i]) == "": + if find_package(args.remove[i]) == []: os.system("echo -e '{}The package {} is not found{}'".format(colors.RED, colors.CYAN + '`' + args.remove[i] + '`' + colors.RED, colors.ENDC)) else: os.system("removepkg {}".format(args.remove[i])) - + print + # find if package installed on your system if args.find: diff --git a/setup.py b/setup.py index 750c54e3..df61e647 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from distutils.core import setup setup( name = 'slpkg', - version = "1.1.8", + version = "1.1.9", description = "Python tool to manage Slackware packages", keywords = ["slackware", "slpkg", "upgrade", "install", "remove", "view", "slackpkg", "tool"],