summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-09-30 10:50:35 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-09-30 10:50:35 +0100
commit46dfe970cba1f8fe2edea1ecb7d7b9c622c7f175 (patch)
treef7ffc2d2d20658d3f461098bed6022534580ac09
parentc723ec8926dcdde690c684ce46efbb0333f09004 (diff)
hardcode binmode
-rw-r--r--src/backend/libsisyphus.py30
-rwxr-xr-xsrc/frontend/cli/sisyphus-cli.py2
-rw-r--r--src/frontend/gui/sisyphus-gui.py8
3 files changed, 12 insertions, 28 deletions
diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py
index 959e80f..38c1c7d 100644
--- a/src/backend/libsisyphus.py
+++ b/src/backend/libsisyphus.py
@@ -24,20 +24,6 @@ def checkRoot():
if not os.getuid() == 0:
sys.exit("\nYou need root permissions to do this, exiting!\n")
-def checkSystemMode():
- portageBinCfg = '/opt/redcore-build/conf/intel/portage/make.conf.amd64-binmode'
- portageCfgSym = '/etc/portage/make.conf'
-
- if not os.path.islink(portageCfgSym):
- print("\nmake.conf is not a symlink, refusing to run!\n")
- sys.exit(1)
- else:
- if os.path.realpath(portageCfgSym) == portageBinCfg:
- pass
- else:
- print("\nThe system is not set to binmode, refusing to run!\n")
- sys.exit(1)
-
def getMirrorList():
mirrorList = []
@@ -82,7 +68,7 @@ def getRemoteDscsURL():
@animation.wait('resolving dependencies')
def getPkgDeps(pkgList):
pkgDeps = []
- portageExec = subprocess.Popen(['emerge', '-qgp'] + pkgList, stdout=subprocess.PIPE)
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--pretend', '--getbinpkg', '--rebuilt-binaries'] + pkgList, stdout=subprocess.PIPE)
for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
if "/" in portageOutput.rstrip():
@@ -100,7 +86,7 @@ def getPkgDeps(pkgList):
@animation.wait('resolving dependencies')
def getWorldDeps():
worldDeps = []
- portageExec = subprocess.Popen(['emerge', '-uDNqgp', '--backtrack=100', '--with-bdeps=y', '@world'], stdout=subprocess.PIPE)
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--update', '--deep', '--newuse', '--pretend', '--getbinpkg', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '@world'], stdout=subprocess.PIPE)
for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
if "/" in portageOutput.rstrip():
@@ -219,7 +205,7 @@ def rescueDB():
syncLocalDatabase()
def startSearch(pkgList):
- subprocess.check_call(['emerge', '-sg'] + pkgList)
+ subprocess.check_call(['emerge', '--search', '--getbinpkg'] + pkgList)
def startUpdate():
syncAll()
@@ -258,7 +244,7 @@ def startInstall(pkgList):
if os.path.exists(str(binpkg + '.tbz2')):
os.remove(str(binpkg + '.tbz2'))
- portageExec = subprocess.Popen(['emerge', '-q'] + pkgList)
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--usepkg', '--usepkgonly', '--rebuilt-binaries'] + pkgList)
portageExec.wait()
syncLocalDatabase()
else:
@@ -298,24 +284,24 @@ def startUpgrade():
if os.path.exists(str(worldpkg + '.tbz2')):
os.remove(str(worldpkg + '.tbz2'))
- portageExec = subprocess.Popen(['emerge', '-uDNq', '--backtrack=100', '--with-bdeps=y', '@world'])
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--update', '--deep', '--newuse', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '@world'])
portageExec.wait()
syncLocalDatabase()
else:
sys.exit("\n" + "Nothing to upgrade; quitting." + "\n")
def startUninstall(pkgList):
- portageExec = subprocess.Popen(['emerge', '-cqa'] + pkgList)
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--depclean', '--ask'] + pkgList)
portageExec.wait()
syncLocalDatabase()
def startUninstallForce(pkgList):
- portageExec = subprocess.Popen(['emerge', '-Cqa'] + pkgList)
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--unmerge', '--ask'] + pkgList)
portageExec.wait()
syncLocalDatabase()
def removeOrphans():
- portageExec = subprocess.Popen(['emerge', '-cqa'])
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--depclean', '--ask'])
portageExec.wait()
syncLocalDatabase()
diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py
index d5febd9..e7637cb 100755
--- a/src/frontend/cli/sisyphus-cli.py
+++ b/src/frontend/cli/sisyphus-cli.py
@@ -3,8 +3,6 @@
import sys
from libsisyphus import *
-checkSystemMode()
-
pkgList = sys.argv[2:]
if "__main__" == __name__:
diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py
index 8050568..3391dfc 100644
--- a/src/frontend/gui/sisyphus-gui.py
+++ b/src/frontend/gui/sisyphus-gui.py
@@ -392,7 +392,7 @@ class MainWorker(QtCore.QObject):
if os.path.exists(str(binpkg + '.tbz2')):
os.remove(str(binpkg + '.tbz2'))
- portageExec = subprocess.Popen(['emerge', '-q'] + pkgList, stdout=subprocess.PIPE)
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--usepkg', '--usepkgonly', '--rebuilt-binaries'] + pkgList, stdout=subprocess.PIPE)
atexit.register(portageKill, portageExec)
@@ -407,7 +407,7 @@ class MainWorker(QtCore.QObject):
def startUninstall(self):
self.started.emit()
pkgList = Sisyphus.pkgList
- portageExec = subprocess.Popen(['emerge', '-cq'] + pkgList, stdout=subprocess.PIPE)
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--depclean'] + pkgList, stdout=subprocess.PIPE)
atexit.register(portageKill, portageExec)
@@ -449,7 +449,7 @@ class MainWorker(QtCore.QObject):
if os.path.exists(str(worldpkg + '.tbz2')):
os.remove(str(worldpkg + '.tbz2'))
- portageExec = subprocess.Popen(['emerge', '-uDNq', '--backtrack=100', '--with-bdeps=y', '@world'], stdout=subprocess.PIPE)
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--update', '--deep', '--newuse', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '@world'], stdout=subprocess.PIPE)
atexit.register(portageKill, portageExec)
@@ -463,7 +463,7 @@ class MainWorker(QtCore.QObject):
@QtCore.pyqtSlot()
def cleanOrphans(self):
self.started.emit()
- portageExec = subprocess.Popen(['emerge', '-cq'], stdout=subprocess.PIPE)
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--depclean'], stdout=subprocess.PIPE)
atexit.register(portageKill, portageExec)