From 515171c670ed6ae373002196b8cd3dd1154cd5cc Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 30 Jan 2021 14:41:20 +0000 Subject: ui : move package operations into the backend --- src/backend/forceuninstall.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/backend/forceuninstall.py (limited to 'src/backend/forceuninstall.py') diff --git a/src/backend/forceuninstall.py b/src/backend/forceuninstall.py new file mode 100644 index 0000000..11139f4 --- /dev/null +++ b/src/backend/forceuninstall.py @@ -0,0 +1,14 @@ +#!/usr/bin/python3 + +import subprocess +import sisyphus.check +import sisyphus.database +import sys + +def start(pkgname): + if sisyphus.check.root(): + 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") -- cgit v1.2.3