summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-31 03:30:24 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-31 03:30:24 +0000
commita63eca66cf856656626d09b2c86ede2f949fe51b (patch)
treeb42374a4458357ce71b5363bbf7d22b2795bd686
parent1f9a59ba2c7b1a9eb59689037d9cc868e0db1f0c (diff)
make search only search for binaries, implement hybrid search as an option to search for binaries and/or ebuilds
-rw-r--r--src/backend/libsisyphus.py9
-rwxr-xr-xsrc/frontend/cli/sisyphus-cli.py15
2 files changed, 16 insertions, 8 deletions
diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py
index b2436c9..8d958ab 100644
--- a/src/backend/libsisyphus.py
+++ b/src/backend/libsisyphus.py
@@ -196,6 +196,9 @@ def rescueDB():
syncLocalDatabase()
def startSearch(pkgList):
+ subprocess.check_call(['emerge', '--search', '--getbinpkgonly'] + pkgList)
+
+def startHybridSearch(pkgList):
subprocess.check_call(['emerge', '--search', '--getbinpkg'] + pkgList)
def startUpdate():
@@ -552,9 +555,9 @@ def showHelp():
print("--hybrid-upgrade")
print("* Upgrade the system using binary and/or ebuild (source) packages" + "\n")
print("--search")
- print("* Search for packages")
- print("* In binary mode this will return available binary packages")
- print("* In source mode this will return binary and ebuild (source) packages" + "\n")
+ print("* Search for binary packages" + "\n")
+ print("--hybrid-search")
+ print("* Search for binary and/or ebuild (source) packages" + "\n")
print("--spmsync")
print("* Sync Sisyphus's package database with Portage's package database")
print("* When you install something with Portage directly (emerge), Sisyphus is not aware of that package, and it doesn't track it in it's database")
diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py
index 9a325c4..6d0253c 100755
--- a/src/frontend/cli/sisyphus-cli.py
+++ b/src/frontend/cli/sisyphus-cli.py
@@ -9,22 +9,22 @@ if "__main__" == __name__:
if sys.argv[1:]:
if "--install" in sys.argv[1:]:
if not pkgList:
- sys.exit("\n" + "Nothing to install, please give at least one package name; quitting" + "\n")
+ sys.exit("\n" + "Nothing to install, please provide at least one package name; quitting" + "\n")
else:
startInstall(pkgList)
elif "--hybrid-install" in sys.argv[1:]:
if not pkgList:
- sys.exit("\n" + "Nothing to install, please give at least one package name; quitting" + "\n")
+ sys.exit("\n" + "Nothing to install, please provide at least one package name; quitting" + "\n")
else:
startHybridInstall(pkgList)
elif "--uninstall" in sys.argv[1:]:
if not pkgList:
- sys.exit("\n" + "Nothing to uninstall, please give at least one package name; quitting" + "\n")
+ sys.exit("\n" + "Nothing to uninstall, please provide at least one package name; quitting" + "\n")
else:
startUninstall(pkgList)
elif "--force-uninstall" in sys.argv[1:]:
if not pkgList:
- sys.exit("\n" + "Nothing to force uninstall, please give at least one package name; quitting" + "\n")
+ sys.exit("\n" + "Nothing to force uninstall, please provide at least one package name; quitting" + "\n")
else:
startUninstallForce(pkgList)
elif "--remove-orphans" in sys.argv[1:]:
@@ -37,9 +37,14 @@ if "__main__" == __name__:
startHybridUpgrade()
elif "--search" in sys.argv[1:]:
if not pkgList:
- sys.exit("\n" + "Nothing to search, please give at least one package name; quitting" + "\n")
+ sys.exit("\n" + "Nothing to search, please provide at least one package name; quitting" + "\n")
else:
startSearch(pkgList)
+ elif "--hybrid-search" in sys.argv[1:]:
+ if not pkgList:
+ sys.exit("\n" + "Nothing to search, please provide at least one package name; quitting" + "\n")
+ else:
+ startHybridSearch(pkgList)
elif "--spmsync" in sys.argv[1:]:
startSyncSPM()
elif "--rescue" in sys.argv[1:]: