diff --git a/CHANGELOG b/CHANGELOG index cb46f150..c1a428b2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,12 @@ -Version 2.1.5-dev +Version 2.1.6 +30-12-2014 + +[Updated] - Fix queue downloads. + - Update find argument. + + + +Version 2.1.5 27-12-2014 [Feature] - Added slacker.it, slackonly.com, Alien's ktown, Alien's multilib, diff --git a/README.rst b/README.rst index b001d552..3165e05b 100644 --- a/README.rst +++ b/README.rst @@ -244,7 +244,7 @@ Command Line Tool Usage -s, [repository] [package] download, build & install -t, [repository] [package] tracking dependencies -p, [repository] [package], --color=[] print package description - -f, [package] find installed packages + -f, [package...] find installed packages -n, [package] view SBo packages through network -i, [package...] install binary packages -u, [package...] upgrade binary packages diff --git a/man/slpkg.8 b/man/slpkg.8 index 74009cb7..64a99355 100644 --- a/man/slpkg.8 +++ b/man/slpkg.8 @@ -55,7 +55,7 @@ Optional arguments: -s, [repository] [package] download, build & install -t, [repository] [package] tracking dependencies -p, [repository] [package], --color=[] print package description - -f, [package] find installed packages + -f, [package...] find installed packages -n, [package] view SBo packages through network -i, [package...] install binary packages -u, [package...] upgrade binary packages diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index 8db0704b..f9dd2f8c 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -30,8 +30,6 @@ __version__ = "{0}.{1}.{2}".format(*__version_info__) __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com" -# temponary path -tmp = "/tmp/" # Default configuration values slack_rel = "stable" @@ -75,6 +73,7 @@ def slacke_repo(repositories): repositories[i] = 'slacke' return sub +tmp = "/tmp/" build_path = "/tmp/slpkg/build/" slpkg_tmp_packages = tmp + "slpkg/packages/" slpkg_tmp_patches = tmp + "slpkg/patches/" diff --git a/slpkg/arguments.py b/slpkg/arguments.py index 1047b87a..a9af58ce 100644 --- a/slpkg/arguments.py +++ b/slpkg/arguments.py @@ -62,7 +62,7 @@ def options(): " -s, [repository] [package] download, build & install", " -t, [repository] [package] tracking dependencies", " -p, [repository] [package], --color=[] print package description", - " -f, [package] find installed packages", + " -f, [package...] find installed packages", " -n, [package] view SBo packages " "through network", " -i, [package...] install binary packages", diff --git a/slpkg/main.py b/slpkg/main.py index da79ab8f..70b67053 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -200,7 +200,7 @@ def main(): PackageManager(args[1:]).reinstall() elif len(args) > 1 and args[0] == "-r": PackageManager(args[1:]).remove() - elif len(args) == 2 and args[0] == "-f": + elif len(args) > 1 and args[0] == "-f": PackageManager(args[1:]).find() elif len(args) == 3 and args[0] == "-p" and args[1] in repositories: PkgDesc(args[2], args[1], "").view() diff --git a/slpkg/pkg/manager.py b/slpkg/pkg/manager.py index 27b21ad6..5cb59481 100644 --- a/slpkg/pkg/manager.py +++ b/slpkg/pkg/manager.py @@ -230,34 +230,35 @@ class PackageManager(object): ''' matching = size = 0 print("\nPackages with matching name [ {0}{1}{2} ]\n".format( - color['CYAN'], ''.join(self.binary), color['ENDC'])) - for match in find_package(''.join(self.binary), pkg_path): - if ''.join(self.binary) in match: - matching += 1 - print("[ {0}installed{1} ] - {2}".format( - color['GREEN'], color['ENDC'], match)) - with open(pkg_path + match, "r") as f: - data = f.read() - f.close() - for line in data.splitlines(): - if line.startswith("UNCOMPRESSED PACKAGE SIZE:"): - if "M" in line[26:]: - size += float(line[26:-1]) * 1024 - else: - size += float(line[26:-1]) - break + color['CYAN'], ', '.join(self.binary), color['ENDC'])) + for pkg in self.binary: + for match in find_package(pkg, pkg_path): + if pkg in match: + matching += 1 + print("[ {0}installed{1} ] - {2}".format( + color['GREEN'], color['ENDC'], match)) + with open(pkg_path + match, "r") as f: + data = f.read() + f.close() + for line in data.splitlines(): + if line.startswith("UNCOMPRESSED PACKAGE SIZE:"): + if "M" in line[26:]: + size += float(line[26:-1]) * 1024 + else: + size += float(line[26:-1]) + break if matching == 0: message = "Can't find" - pkg_not_found("", self.binary, message, "\n") + pkg_not_found("", pkg, message, "\n") else: print("\n{0}Total found {1} matching packages.{2}".format( - color['GREY'], matching, color['ENDC'])) + color['GREY'], matching, color['ENDC'])) unit = "Kb" if size > 1024: unit = "Mb" size = (size / 1024) print("{0}Size of installed packages {1} {2}.{3}\n".format( - color['GREY'], round(size, 2), unit, color['ENDC'])) + color['GREY'], round(size, 2), unit, color['ENDC'])) def display(self): '''