summaryrefslogtreecommitdiff
path: root/src/backend/install.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-05 11:19:23 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-05 11:19:23 +0100
commitcdd5484814c4284304a551e2353d44fa9729c11c (patch)
treebb9ea39d8d7fba6006acda79ba4b62dc498e6674 /src/backend/install.py
parent81f2b15988e5176e998f6b727ae75db3d823324a (diff)
bugfix : https://bugs.redcorelinux.org/show_bug.cgi?id=142
Diffstat (limited to 'src/backend/install.py')
-rw-r--r--src/backend/install.py27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/backend/install.py b/src/backend/install.py
index b742708..ae04384 100644
--- a/src/backend/install.py
+++ b/src/backend/install.py
@@ -36,10 +36,29 @@ def start(pkgname, ebuild=False, gfx_ui=False, oneshot=False):
sisyphus.update.start(gfx_ui=False)
sisyphus.solvedeps.start(pkgname)
- bin_list, src_list, need_cfg = pickle.load(
+ bin_list, src_list, is_vague, need_cfg = pickle.load(
open(os.path.join(sisyphus.getfs.p_mtd_dir, "sisyphus_pkgdeps.pickle"), "rb"))
- if need_cfg != 0: # catch aliens
+ if is_vague != 0: # catch ambiguous packages
+ p_exe = subprocess.Popen(['emerge', '--quiet', '--pretend', '--getbinpkg', '--rebuilt-binaries',
+ '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname))
+ try:
+ p_exe.wait()
+ except KeyboardInterrupt:
+ p_exe.terminate()
+ try:
+ p_exe.wait(1)
+ except subprocess.TimeoutExpired:
+ p_exe.kill()
+ sys.exit()
+ if gfx_ui:
+ pass # GUI always calls <category>/<pkgname>, no ambiguity
+ else:
+ print(sisyphus.getcolor.bright_red +
+ "\nCannot proceed!\n" + sisyphus.getcolor.reset)
+ sys.exit()
+
+ elif need_cfg != 0: # catch aliens
p_exe = subprocess.Popen(['emerge', '--quiet', '--pretend', '--getbinpkg', '--rebuilt-binaries',
'--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname))
try:
@@ -54,7 +73,7 @@ def start(pkgname, ebuild=False, gfx_ui=False, oneshot=False):
if gfx_ui:
print("\nCannot proceed!\n")
print(
- "Apply the above changes to your portage configuration files and try again")
+ "Apply the above changes to your portage configuration files and try again!")
for i in range(9, 0, -1):
print(f"Killing application in : {i} seconds!")
@@ -65,7 +84,7 @@ def start(pkgname, ebuild=False, gfx_ui=False, oneshot=False):
print(sisyphus.getcolor.bright_red +
"\nCannot proceed!\n" + sisyphus.getcolor.reset)
print(sisyphus.getcolor.bright_yellow +
- "Apply the above changes to your portage configuration files and try again" + sisyphus.getcolor.reset)
+ "Apply the above changes to your portage configuration files and try again!" + sisyphus.getcolor.reset)
sys.exit()
else:
if len(bin_list) == 0 and len(src_list) == 0: