From 55ab0d11545c1f04f67236f3c741b1214acce050 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 2 Apr 2019 15:51:57 +0100 Subject: more backend bugfixes: drop some redundant code, rework update and make sure we're always synced --- src/backend/libsisyphus.py | 18 +++++------------- src/frontend/cli/sisyphus-cli.py | 2 +- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py index d5eece3..e64bd11 100644 --- a/src/backend/libsisyphus.py +++ b/src/backend/libsisyphus.py @@ -182,7 +182,7 @@ def syncPortageCfg(): subprocess.call(['git', 'pull', '--quiet']) @animation.wait('syncing remote database') -def syncAll(): +def startUpdate(): checkRoot() syncPortageTree() syncPortageCfg() @@ -192,11 +192,6 @@ def syncAll(): def startSyncSPM(): syncLocalDatabase() -@animation.wait('syncing portage') -def startSync(): - syncPortageTree() - syncPortageCfg() - @animation.wait('resurrecting database') def rescueDB(): if os.path.exists(remotePkgsDB): @@ -217,11 +212,8 @@ def startSearch(pkgList): def startHybridSearch(pkgList): subprocess.check_call(['emerge', '--search', '--getbinpkg'] + pkgList) -def startUpdate(): - syncAll() - def startInstall(pkgList): - syncAll() + startUpdate() binhostURL = getBinhostURL() areBinaries,areSources,needsConfig = getPackageDeps(pkgList) @@ -272,7 +264,7 @@ def startInstall(pkgList): sys.exit("\n" + "No binary package found; Source package found; Use sisyphus --hybrid-install; Quitting." + "\n") def startHybridInstall(pkgList): - syncAll() + startUpdate() binhostURL = getBinhostURL() areBinaries,areSources,needsConfig = getPackageDeps(pkgList) @@ -387,7 +379,7 @@ def startHybridInstall(pkgList): sys.exit("\n" + "Cannot proceed; Apply the above changes to your portage configuration files and try again; Quitting." + "\n") def startUpgrade(): - syncAll() + startUpdate() binhostURL = getBinhostURL() areBinaries,areSources,needsConfig = getWorldDeps() @@ -438,7 +430,7 @@ def startUpgrade(): sys.exit("\n" + "No binary package upgrades found; Source package upgrades found; Use sisyphus --hybrid-upgrade; Quitting." + "\n") def startHybridUpgrade(): - syncAll() + startUpdate() binhostURL = getBinhostURL() areBinaries,areSources,needsConfig = getWorldDeps() diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py index 6d0253c..b1636db 100755 --- a/src/frontend/cli/sisyphus-cli.py +++ b/src/frontend/cli/sisyphus-cli.py @@ -30,7 +30,7 @@ if "__main__" == __name__: elif "--remove-orphans" in sys.argv[1:]: removeOrphans() elif "--update" in sys.argv[1:]: - startSync() + startUpdate() elif "--upgrade" in sys.argv[1:]: startUpgrade() elif "--hybrid-upgrade" in sys.argv[1:]: -- cgit v1.2.3