diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-02-25 21:35:12 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-02-25 22:12:43 +0000 |
commit | 7d32051b5114160c66c354972f8a64a00d331c6c (patch) | |
tree | 06e6a60d9468d159cb4bd52a79581315ff8bcea8 /src/backend/solverdeps.py | |
parent | 17b776830e4468080c1b0f09685b4aa4f7b9eaf3 (diff) |
rename some functionsv6.2402.0
Diffstat (limited to 'src/backend/solverdeps.py')
-rw-r--r-- | src/backend/solverdeps.py | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/backend/solverdeps.py b/src/backend/solverdeps.py deleted file mode 100644 index 97d19dd..0000000 --- a/src/backend/solverdeps.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/python3 - -import animation -import os -import pickle -import signal -import subprocess -import sys -import sisyphus.getfs - - -def sigint_handler(signal, frame): - sys.exit(0) - - -signal.signal(signal.SIGINT, sigint_handler) - - -@animation.wait('resolving reverse dependencies') -def start(pkgname=None): - is_needed = int(0) - - p_exe = subprocess.Popen( - ['emerge', '--depclean', '--quiet', '--pretend', '--verbose'] + list(pkgname), stdout=subprocess.PIPE, stderr=subprocess.PIPE) - - try: - stdout, stderr = p_exe.communicate() - - for p_out in stdout.decode('utf-8').splitlines(): - if any(key in p_out for key in ["pulled in by:", "required"]): - is_needed = int(1) - - pickle.dump(is_needed, open(os.path.join( - sisyphus.getfs.p_mtd_dir, "sisyphus_pkgrdeps.pickle"), "wb")) - except KeyboardInterrupt: - p_exe.terminate() - try: - p_exe.wait(1) - except subprocess.TimeoutExpired: - p_exe.kill() - sys.exit() |