diff options
-rw-r--r-- | src/backend/uninstall.py | 8 | ||||
-rwxr-xr-x | src/frontend/cli/sisyphus-cli.py | 4 | ||||
-rw-r--r-- | src/frontend/gui/sisyphus-gui.py | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/uninstall.py b/src/backend/uninstall.py index c2e777b..3c5a280 100644 --- a/src/backend/uninstall.py +++ b/src/backend/uninstall.py @@ -18,15 +18,15 @@ def sigint_handler(signal, frame): signal.signal(signal.SIGINT, sigint_handler) -def start(pkgname, force=False, gfx_ui=False, normal=False): +def start(pkgname, depclean=False, gfx_ui=False, unmerge=False): args = ['--quiet', '--depclean'] - if not sisyphus.checkenv.root() and (force or normal): + if not sisyphus.checkenv.root() and (unmerge or depclean): print(sisyphus.getcolor.bright_red + "\nYou need root permissions to do this!\n" + sisyphus.getcolor.reset) sys.exit() - if force: + if unmerge: p_exe = subprocess.Popen( ['emerge', '--quiet', '--unmerge', '--ask'] + list(pkgname)) try: @@ -50,7 +50,7 @@ def start(pkgname, force=False, gfx_ui=False, normal=False): p_exe.wait() sisyphus.syncdb.lcl_tbl() - elif normal: + elif depclean: p_exe = subprocess.Popen(['emerge'] + args + ['--ask'] + list(pkgname)) try: p_exe.wait() diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py index 634cb5f..e4dd877 100755 --- a/src/frontend/cli/sisyphus-cli.py +++ b/src/frontend/cli/sisyphus-cli.py @@ -161,9 +161,9 @@ def uninstall(pkgname: List[str], force: bool = typer.Option(False, "--force", " will succeed, but the system will be broken """ if not force: - sisyphus.uninstall.start(pkgname, force=False, gfx_ui=False, normal=True) + sisyphus.uninstall.start(pkgname, depclean=True, gfx_ui=False, unmerge=False) else: - sisyphus.uninstall.start(pkgname, force=True, gfx_ui=False, normal=False) + sisyphus.uninstall.start(pkgname, depclean=False, gfx_ui=False, unmerge=True) @app.command("autoremove") def autoremove(): diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py index 8fa8804..72c6cf7 100644 --- a/src/frontend/gui/sisyphus-gui.py +++ b/src/frontend/gui/sisyphus-gui.py @@ -405,7 +405,7 @@ class MainWorker(QtCore.QObject): def startUninstall(self): self.started.emit() pkgname = Sisyphus.pkgname - sisyphus.uninstall.start(pkgname, force=False, gfx_ui=True, normal=False) + sisyphus.uninstall.start(pkgname, depclean=False, gfx_ui=True, unmerge=False) self.finished.emit() @QtCore.pyqtSlot() |