summaryrefslogtreecommitdiff
path: root/src/backend/uninstall.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/uninstall.py')
-rw-r--r--src/backend/uninstall.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/backend/uninstall.py b/src/backend/uninstall.py
index 0c22182..77fa479 100644
--- a/src/backend/uninstall.py
+++ b/src/backend/uninstall.py
@@ -5,30 +5,38 @@ import io
import subprocess
import sys
import sisyphus.checkenv
+import sisyphus.getcolor
import sisyphus.killemerge
import sisyphus.syncdb
def start(pkgname):
if sisyphus.checkenv.root():
- portageExec = subprocess.Popen(['emerge', '--quiet', '--depclean', '--ask'] + list(pkgname))
+ portageExec = subprocess.Popen(
+ ['emerge', '--quiet', '--depclean', '--ask'] + list(pkgname))
portageExec.wait()
sisyphus.syncdb.localTable()
else:
- sys.exit("\nYou need root permissions to do this, exiting!\n")
+ print(sisyphus.getcolor.bright_red +
+ "\nYou need root permissions to do this!\n" + sisyphus.getcolor.reset)
+ sys.exit()
def fstart(pkgname):
if sisyphus.checkenv.root():
- portageExec = subprocess.Popen(['emerge', '--quiet', '--unmerge', '--ask'] + list(pkgname))
+ portageExec = subprocess.Popen(
+ ['emerge', '--quiet', '--unmerge', '--ask'] + list(pkgname))
portageExec.wait()
sisyphus.syncdb.localTable()
else:
- sys.exit("\nYou need root permissions to do this, exiting!\n")
+ print(sisyphus.getcolor.bright_red +
+ "\nYou need root permissions to do this!\n" + sisyphus.getcolor.reset)
+ sys.exit()
def xstart(pkgname):
- portageExec = subprocess.Popen(['emerge', '--depclean'] + pkgname, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ 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.killemerge.start, portageExec)