From ae35005d5af4547d66ec5e0b40eb2a6cf856456e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 5 May 2023 23:28:35 +0100 Subject: bugfix (part 2) : https://bugs.redcorelinux.org/show_bug.cgi?id=142 --- src/backend/install.py | 4 +--- src/backend/solvedeps.py | 6 ++++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/backend/install.py b/src/backend/install.py index ae04384..e3847c3 100644 --- a/src/backend/install.py +++ b/src/backend/install.py @@ -41,7 +41,7 @@ def start(pkgname, ebuild=False, gfx_ui=False, oneshot=False): 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)) + '--with-bdeps=y', '--misspell-suggestion=y', '--fuzzy-search=y'] + list(pkgname)) try: p_exe.wait() except KeyboardInterrupt: @@ -54,8 +54,6 @@ def start(pkgname, ebuild=False, gfx_ui=False, oneshot=False): if gfx_ui: pass # GUI always calls /, no ambiguity else: - print(sisyphus.getcolor.bright_red + - "\nCannot proceed!\n" + sisyphus.getcolor.reset) sys.exit() elif need_cfg != 0: # catch aliens diff --git a/src/backend/solvedeps.py b/src/backend/solvedeps.py index 24d4613..d3e8a3b 100644 --- a/src/backend/solvedeps.py +++ b/src/backend/solvedeps.py @@ -37,14 +37,16 @@ def start(pkgname=None): for p_out in stderr.decode('utf-8').splitlines(): if pkgname: - if "The short ebuild name" + " " + ', '.join(f'"{package}"' for package in pkgname) + " " + "is ambiguous." in p_out: + if any(key in p_out for key in ["short ebuild name", + "is ambiguous", + "there are no ebuilds to satisfy"]): # likely very fragile is_vague = int(1) if any(key in p_out for key in ["The following keyword changes are necessary to proceed:", "The following mask changes are necessary to proceed:", "The following USE changes are necessary to proceed:", "The following REQUIRED_USE flag constraints are unsatisfied:", - "One of the following masked packages is required to complete your request:"]): + "One of the following masked packages is required to complete your request:"]): # likely very fragile need_cfg = int(1) for p_out in stdout.decode('utf-8').splitlines(): -- cgit v1.2.3