summaryrefslogtreecommitdiff
path: root/src/backend/uninstallforce.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-18 12:26:10 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-18 12:26:10 +0100
commita71ffe9cd09164182584bb01b3993881f7766dfd (patch)
tree3131c0ac94300b27d5983249f54769ec95a89689 /src/backend/uninstallforce.py
parentf28b67f3d6910f71e20da86367205f3c3660ff72 (diff)
make sisyphus.check.root more portable, replace it everywhere
Diffstat (limited to 'src/backend/uninstallforce.py')
-rw-r--r--src/backend/uninstallforce.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/uninstallforce.py b/src/backend/uninstallforce.py
index 9a8330f..f85dbe1 100644
--- a/src/backend/uninstallforce.py
+++ b/src/backend/uninstallforce.py
@@ -3,9 +3,12 @@
import subprocess
import sisyphus.check
import sisyphus.database
+import sys
def start(pkgname):
- sisyphus.check.root()
- portageExec = subprocess.Popen(['emerge', '--quiet', '--unmerge', '--ask'] + list(pkgname))
- portageExec.wait()
- sisyphus.database.syncLocal()
+ if sisyphus.check.root() == 0:
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--unmerge', '--ask'] + list(pkgname))
+ portageExec.wait()
+ sisyphus.database.syncLocal()
+ else:
+ sys.exit("\nYou need root permissions to do this, exiting!\n")