mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
update find argument
This commit is contained in:
parent
2f73093551
commit
c555149aa0
7 changed files with 34 additions and 26 deletions
10
CHANGELOG
10
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
|
27-12-2014
|
||||||
|
|
||||||
[Feature] - Added slacker.it, slackonly.com, Alien's ktown, Alien's multilib,
|
[Feature] - Added slacker.it, slackonly.com, Alien's ktown, Alien's multilib,
|
||||||
|
|
|
@ -244,7 +244,7 @@ Command Line Tool Usage
|
||||||
-s, [repository] [package] download, build & install
|
-s, [repository] [package] download, build & install
|
||||||
-t, [repository] [package] tracking dependencies
|
-t, [repository] [package] tracking dependencies
|
||||||
-p, [repository] [package], --color=[] print package description
|
-p, [repository] [package], --color=[] print package description
|
||||||
-f, [package] find installed packages
|
-f, [package...] find installed packages
|
||||||
-n, [package] view SBo packages through network
|
-n, [package] view SBo packages through network
|
||||||
-i, [package...] install binary packages
|
-i, [package...] install binary packages
|
||||||
-u, [package...] upgrade binary packages
|
-u, [package...] upgrade binary packages
|
||||||
|
|
|
@ -55,7 +55,7 @@ Optional arguments:
|
||||||
-s, [repository] [package] download, build & install
|
-s, [repository] [package] download, build & install
|
||||||
-t, [repository] [package] tracking dependencies
|
-t, [repository] [package] tracking dependencies
|
||||||
-p, [repository] [package], --color=[] print package description
|
-p, [repository] [package], --color=[] print package description
|
||||||
-f, [package] find installed packages
|
-f, [package...] find installed packages
|
||||||
-n, [package] view SBo packages through network
|
-n, [package] view SBo packages through network
|
||||||
-i, [package...] install binary packages
|
-i, [package...] install binary packages
|
||||||
-u, [package...] upgrade binary packages
|
-u, [package...] upgrade binary packages
|
||||||
|
|
|
@ -30,8 +30,6 @@ __version__ = "{0}.{1}.{2}".format(*__version_info__)
|
||||||
__license__ = "GNU General Public License v3 (GPLv3)"
|
__license__ = "GNU General Public License v3 (GPLv3)"
|
||||||
__email__ = "d.zlatanidis@gmail.com"
|
__email__ = "d.zlatanidis@gmail.com"
|
||||||
|
|
||||||
# temponary path
|
|
||||||
tmp = "/tmp/"
|
|
||||||
|
|
||||||
# Default configuration values
|
# Default configuration values
|
||||||
slack_rel = "stable"
|
slack_rel = "stable"
|
||||||
|
@ -75,6 +73,7 @@ def slacke_repo(repositories):
|
||||||
repositories[i] = 'slacke'
|
repositories[i] = 'slacke'
|
||||||
return sub
|
return sub
|
||||||
|
|
||||||
|
tmp = "/tmp/"
|
||||||
build_path = "/tmp/slpkg/build/"
|
build_path = "/tmp/slpkg/build/"
|
||||||
slpkg_tmp_packages = tmp + "slpkg/packages/"
|
slpkg_tmp_packages = tmp + "slpkg/packages/"
|
||||||
slpkg_tmp_patches = tmp + "slpkg/patches/"
|
slpkg_tmp_patches = tmp + "slpkg/patches/"
|
||||||
|
|
|
@ -62,7 +62,7 @@ def options():
|
||||||
" -s, [repository] [package] download, build & install",
|
" -s, [repository] [package] download, build & install",
|
||||||
" -t, [repository] [package] tracking dependencies",
|
" -t, [repository] [package] tracking dependencies",
|
||||||
" -p, [repository] [package], --color=[] print package description",
|
" -p, [repository] [package], --color=[] print package description",
|
||||||
" -f, [package] find installed packages",
|
" -f, [package...] find installed packages",
|
||||||
" -n, [package] view SBo packages "
|
" -n, [package] view SBo packages "
|
||||||
"through network",
|
"through network",
|
||||||
" -i, [package...] install binary packages",
|
" -i, [package...] install binary packages",
|
||||||
|
|
|
@ -200,7 +200,7 @@ def main():
|
||||||
PackageManager(args[1:]).reinstall()
|
PackageManager(args[1:]).reinstall()
|
||||||
elif len(args) > 1 and args[0] == "-r":
|
elif len(args) > 1 and args[0] == "-r":
|
||||||
PackageManager(args[1:]).remove()
|
PackageManager(args[1:]).remove()
|
||||||
elif len(args) == 2 and args[0] == "-f":
|
elif len(args) > 1 and args[0] == "-f":
|
||||||
PackageManager(args[1:]).find()
|
PackageManager(args[1:]).find()
|
||||||
elif len(args) == 3 and args[0] == "-p" and args[1] in repositories:
|
elif len(args) == 3 and args[0] == "-p" and args[1] in repositories:
|
||||||
PkgDesc(args[2], args[1], "").view()
|
PkgDesc(args[2], args[1], "").view()
|
||||||
|
|
|
@ -230,9 +230,10 @@ class PackageManager(object):
|
||||||
'''
|
'''
|
||||||
matching = size = 0
|
matching = size = 0
|
||||||
print("\nPackages with matching name [ {0}{1}{2} ]\n".format(
|
print("\nPackages with matching name [ {0}{1}{2} ]\n".format(
|
||||||
color['CYAN'], ''.join(self.binary), color['ENDC']))
|
color['CYAN'], ', '.join(self.binary), color['ENDC']))
|
||||||
for match in find_package(''.join(self.binary), pkg_path):
|
for pkg in self.binary:
|
||||||
if ''.join(self.binary) in match:
|
for match in find_package(pkg, pkg_path):
|
||||||
|
if pkg in match:
|
||||||
matching += 1
|
matching += 1
|
||||||
print("[ {0}installed{1} ] - {2}".format(
|
print("[ {0}installed{1} ] - {2}".format(
|
||||||
color['GREEN'], color['ENDC'], match))
|
color['GREEN'], color['ENDC'], match))
|
||||||
|
@ -248,7 +249,7 @@ class PackageManager(object):
|
||||||
break
|
break
|
||||||
if matching == 0:
|
if matching == 0:
|
||||||
message = "Can't find"
|
message = "Can't find"
|
||||||
pkg_not_found("", self.binary, message, "\n")
|
pkg_not_found("", pkg, message, "\n")
|
||||||
else:
|
else:
|
||||||
print("\n{0}Total found {1} matching packages.{2}".format(
|
print("\n{0}Total found {1} matching packages.{2}".format(
|
||||||
color['GREY'], matching, color['ENDC']))
|
color['GREY'], matching, color['ENDC']))
|
||||||
|
|
Loading…
Add table
Reference in a new issue