summaryrefslogtreecommitdiff
path: root/src/backend/autoremove.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-04 22:10:33 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-04 22:10:33 +0000
commit99455bbb94f298cd101c3e43227647ccf7aaaf1b (patch)
tree6e1d079bc2a051592d64e5fd1a73b3ea6c2d0123 /src/backend/autoremove.py
parent1965c85d0acc683e1dddb58cec343b2ff62711e4 (diff)
add an aditional matchphrase to the dependency solver, add color support && pep8 the whole backendv4.2212.0
Diffstat (limited to 'src/backend/autoremove.py')
-rw-r--r--src/backend/autoremove.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/backend/autoremove.py b/src/backend/autoremove.py
index 303b314..8dc00ec 100644
--- a/src/backend/autoremove.py
+++ b/src/backend/autoremove.py
@@ -5,21 +5,26 @@ import io
import subprocess
import sys
import sisyphus.checkenv
+import sisyphus.getcolor
import sisyphus.killemerge
import sisyphus.syncdb
def start():
if sisyphus.checkenv.root():
- portageExec = subprocess.Popen(['emerge', '--quiet', '--depclean', '--ask'])
+ portageExec = subprocess.Popen(
+ ['emerge', '--quiet', '--depclean', '--ask'])
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():
- portageExec = subprocess.Popen(['emerge', '--depclean'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ 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.killemerge.start, portageExec)