summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/autoRemoveAll.py6
-rw-r--r--src/backend/installPkg.py8
-rw-r--r--src/backend/installSrc.py4
-rw-r--r--src/backend/killPortage.py2
-rw-r--r--src/backend/recoverDatabase.py2
-rw-r--r--src/backend/searchPkg.py4
-rw-r--r--src/backend/searchSrc.py2
-rw-r--r--src/backend/setBranch.py7
-rw-r--r--src/backend/setJobs.py2
-rw-r--r--src/backend/setProfile.py2
-rw-r--r--src/backend/syncSPM.py2
-rw-r--r--src/backend/uninstallAll.py2
-rw-r--r--src/backend/updateAll.py4
-rw-r--r--src/backend/upgradePkg.py8
-rw-r--r--src/backend/upgradeSrc.py4
15 files changed, 29 insertions, 30 deletions
diff --git a/src/backend/autoRemoveAll.py b/src/backend/autoRemoveAll.py
index 982c7b3..85a7b7f 100644
--- a/src/backend/autoRemoveAll.py
+++ b/src/backend/autoRemoveAll.py
@@ -8,7 +8,7 @@ import sisyphus.checkEnvironment
import sisyphus.killPortage
import sisyphus.syncDatabase
-def start():
+def cliExec():
if sisyphus.checkEnvironment.root():
portageExec = subprocess.Popen(['emerge', '--quiet', '--depclean', '--ask'])
portageExec.wait()
@@ -16,10 +16,10 @@ def start():
else:
sys.exit("\nYou need root permissions to do this, exiting!\n")
-def startqt():
+def guiExec():
portageExec = subprocess.Popen(['emerge', '--depclean'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# kill portage if the program dies or it's terminated by the user
- atexit.register(sisyphus.killPortage.start, portageExec)
+ atexit.register(sisyphus.killPortage.cliExec, portageExec)
for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
print(portageOutput.rstrip())
diff --git a/src/backend/installPkg.py b/src/backend/installPkg.py
index 815eeb8..9aa9b51 100644
--- a/src/backend/installPkg.py
+++ b/src/backend/installPkg.py
@@ -15,9 +15,9 @@ import sisyphus.resolveDeps
import sisyphus.syncDatabase
import sisyphus.updateAll
-def start(pkgname):
+def cliExec(pkgname):
if sisyphus.checkEnvironment.root():
- sisyphus.updateAll.start()
+ sisyphus.updateAll.cliExec()
binhostURL = sisyphus.getEnvironment.binhostURL()
areBinaries,areSources,needsConfig = sisyphus.resolveDeps.package(pkgname)
@@ -62,7 +62,7 @@ def start(pkgname):
else:
sys.exit("\nYou need root permissions to do this, exiting!\n")
-def startqt(pkgname):
+def guiExec(pkgname):
binhostURL = sisyphus.getEnvironment.binhostURL()
areBinaries,areSources,needsConfig = sisyphus.resolveDeps.package.__wrapped__(pkgname) #undecorate
@@ -84,7 +84,7 @@ def startqt(pkgname):
portageExec = subprocess.Popen(['emerge', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + pkgname, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# kill portage if the program dies or it's terminated by the user
- atexit.register(sisyphus.killPortage.start, portageExec)
+ atexit.register(sisyphus.killPortage.cliExec, portageExec)
for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
if not "These are the packages that would be merged, in order:" in portageOutput.rstrip():
diff --git a/src/backend/installSrc.py b/src/backend/installSrc.py
index 0768902..d7a6cd3 100644
--- a/src/backend/installSrc.py
+++ b/src/backend/installSrc.py
@@ -13,9 +13,9 @@ import sisyphus.resolveDeps
import sisyphus.syncDatabase
import sisyphus.updateAll
-def start(pkgname):
+def cliExec(pkgname):
if sisyphus.checkEnvironment.root():
- sisyphus.updateAll.start()
+ sisyphus.updateAll.cliExec()
binhostURL = sisyphus.getEnvironment.binhostURL()
areBinaries,areSources,needsConfig = sisyphus.resolveDeps.package(pkgname)
diff --git a/src/backend/killPortage.py b/src/backend/killPortage.py
index f01af6b..c588252 100644
--- a/src/backend/killPortage.py
+++ b/src/backend/killPortage.py
@@ -1,4 +1,4 @@
#!/usr/bin/python3
-def start(portageCmd):
+def cliExec(portageCmd):
portageCmd.terminate()
diff --git a/src/backend/recoverDatabase.py b/src/backend/recoverDatabase.py
index 03e57a2..2594c72 100644
--- a/src/backend/recoverDatabase.py
+++ b/src/backend/recoverDatabase.py
@@ -6,7 +6,7 @@ import sisyphus.getFilesystem
import sisyphus.syncDatabase
@animation.wait('recovering databases')
-def start():
+def cliExec():
if os.path.exists(sisyphus.getFilesystem.remotePackagesCsv):
os.remove(sisyphus.getFilesystem.remotePackagesCsv)
if os.path.exists(sisyphus.getFilesystem.remoteDescriptionsCsv):
diff --git a/src/backend/searchPkg.py b/src/backend/searchPkg.py
index 6f227f9..8c5ea5b 100644
--- a/src/backend/searchPkg.py
+++ b/src/backend/searchPkg.py
@@ -124,9 +124,9 @@ def showSearch(filter, cat, pn, desc, single):
print(f"{cpn:45} {str(pkg['iv']):20} {str(pkg['av'])}")
print(f"\nFound {len(pkglist)} matching package(s) ...")
-def start(filter, cat, pn, desc, single):
+def cliExec(filter, cat, pn, desc, single):
if sisyphus.checkEnvironment.root():
- sisyphus.updateAll.start()
+ sisyphus.updateAll.cliExec()
else:
print("\nYou are not root, cannot fetch updates.\nSearch result may be inaccurate!\n")
diff --git a/src/backend/searchSrc.py b/src/backend/searchSrc.py
index c9b5862..5bd2279 100644
--- a/src/backend/searchSrc.py
+++ b/src/backend/searchSrc.py
@@ -2,5 +2,5 @@
import subprocess
-def start(pkgname):
+def cliExec(pkgname):
subprocess.call(['emerge', '--search', '--getbinpkg'] + list(pkgname))
diff --git a/src/backend/setBranch.py b/src/backend/setBranch.py
index 2633dd9..a2b1f62 100644
--- a/src/backend/setBranch.py
+++ b/src/backend/setBranch.py
@@ -79,16 +79,15 @@ def giveWarning(branch,remote):
print("Hint : Use the even numbers (2,4,6,8) from 'sisyphus mirror list'")
print("Examples : 'sisyphus mirror set 4' or 'sisyphus mirror set 8'\n")
-
-def start(branch,remote):
+def cliExec(branch,remote):
if sisyphus.checkEnvironment.root():
sisyphus.purgeEnvironment.branch()
sisyphus.purgeEnvironment.metadata()
injectGentooRepo(branch,remote)
injectRedcoreRepo(branch,remote)
injectPortageConfigRepo(branch,remote)
- sisyphus.setJobs.start()
- sisyphus.setProfile.start()
+ sisyphus.setJobs.cliExec()
+ sisyphus.setProfile.cliExec()
giveWarning(branch,remote)
else:
sys.exit("\nYou need root permissions to do this, exiting!\n")
diff --git a/src/backend/setJobs.py b/src/backend/setJobs.py
index 5a22b10..89ccc37 100644
--- a/src/backend/setJobs.py
+++ b/src/backend/setJobs.py
@@ -2,5 +2,5 @@
import subprocess
-def start():
+def cliExec():
subprocess.call(['/usr/share/sisyphus/helpers/set_jobs'])
diff --git a/src/backend/setProfile.py b/src/backend/setProfile.py
index a5d6480..3a7f5e3 100644
--- a/src/backend/setProfile.py
+++ b/src/backend/setProfile.py
@@ -5,7 +5,7 @@ import platform
import subprocess
@animation.wait('setting up profile')
-def start():
+def cliExec():
if platform.uname()[4] == 'x86_64':
eselectExec = subprocess.Popen(['eselect', 'profile', 'set', 'default/linux/amd64/17.1/hardened'])
eselectExec.wait()
diff --git a/src/backend/syncSPM.py b/src/backend/syncSPM.py
index c049c64..d7e5cdb 100644
--- a/src/backend/syncSPM.py
+++ b/src/backend/syncSPM.py
@@ -4,5 +4,5 @@ import animation
import sisyphus.syncDatabase
@animation.wait('syncing spm changes')
-def start():
+def cliExec():
sisyphus.syncDatabase.localTable()
diff --git a/src/backend/uninstallAll.py b/src/backend/uninstallAll.py
index b874738..4284867 100644
--- a/src/backend/uninstallAll.py
+++ b/src/backend/uninstallAll.py
@@ -27,7 +27,7 @@ def cliExecForce(pkgname):
def guiExec(pkgname):
portageExec = subprocess.Popen(['emerge', '--depclean'] + pkgname, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# kill portage if the program dies or it's terminated by the user
- atexit.register(sisyphus.killPortage.start, portageExec)
+ atexit.register(sisyphus.killPortage.cliExec, portageExec)
for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
print(portageOutput.rstrip())
diff --git a/src/backend/updateAll.py b/src/backend/updateAll.py
index c5809ab..41d4a3a 100644
--- a/src/backend/updateAll.py
+++ b/src/backend/updateAll.py
@@ -17,7 +17,7 @@ def syncAll():
sisyphus.syncDatabase.remoteTable()
@animation.wait('fetching updates')
-def start():
+def cliExec():
activeBranch = sisyphus.checkEnvironment.branch()
binhostURL = sisyphus.getEnvironment.binhostURL()
isSane = sisyphus.checkEnvironment.sanity()
@@ -31,7 +31,7 @@ def start():
print("\nCurrent branch: '" + activeBranch + "' (testing)" + "\nCurrent binhost: '" + binhostURL + "' (stable)")
sys.exit("\nInvalid branch - binhost pairing; Use 'sisyphus branch --help' for help; Quitting.")
-def startqt():
+def guiExec():
activeBranch = sisyphus.checkEnvironment.branch()
binhostURL = sisyphus.getEnvironment.binhostURL()
isSane = sisyphus.checkEnvironment.sanity()
diff --git a/src/backend/upgradePkg.py b/src/backend/upgradePkg.py
index ccddd99..05d3674 100644
--- a/src/backend/upgradePkg.py
+++ b/src/backend/upgradePkg.py
@@ -15,9 +15,9 @@ import sisyphus.resolveDeps
import sisyphus.syncDatabase
import sisyphus.updateAll
-def start():
+def cliExec():
if sisyphus.checkEnvironment.root():
- sisyphus.updateAll.start()
+ sisyphus.updateAll.cliExec()
binhostURL = sisyphus.getEnvironment.binhostURL()
areBinaries,areSources,needsConfig = sisyphus.resolveDeps.world()
@@ -63,7 +63,7 @@ def start():
else:
sys.exit("\nYou need root permissions to do this, exiting!\n")
-def startqt():
+def guiExec():
binhostURL = sisyphus.getEnvironment.binhostURL()
areBinaries,areSources,needsConfig = sisyphus.resolveDeps.world.__wrapped__() #undecorate
@@ -89,7 +89,7 @@ def startqt():
portageExec = subprocess.Popen(['emerge', '--update', '--deep', '--newuse', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# kill portage if the program dies or it's terminated by the user
- atexit.register(sisyphus.killPortage.start, portageExec)
+ atexit.register(sisyphus.killPortage.cliExec, portageExec)
for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
if not "These are the packages that would be merged, in order:" in portageOutput.rstrip():
diff --git a/src/backend/upgradeSrc.py b/src/backend/upgradeSrc.py
index 1f50e18..edca120 100644
--- a/src/backend/upgradeSrc.py
+++ b/src/backend/upgradeSrc.py
@@ -13,9 +13,9 @@ import sisyphus.resolveDeps
import sisyphus.syncDatabase
import sisyphus.updateAll
-def start():
+def cliExec():
if sisyphus.checkEnvironment.root():
- sisyphus.updateAll.start()
+ sisyphus.updateAll.cliExec()
binhostURL = sisyphus.getEnvironment.binhostURL()
areBinaries,areSources,needsConfig = sisyphus.resolveDeps.world()