From 4b1f4edf874da9620d2960c7b1a5c36da330ec7a Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 27 Oct 2022 02:46:36 +0100 Subject: bugfix : https://bugs.redcorelinux.org/show_bug.cgi?id=131 --- src/backend/installPkg.py | 12 +++--------- src/backend/installSrc.py | 21 +++------------------ src/backend/upgradePkg.py | 13 +++---------- src/backend/upgradeSrc.py | 21 +++------------------ 4 files changed, 12 insertions(+), 55 deletions(-) (limited to 'src') diff --git a/src/backend/installPkg.py b/src/backend/installPkg.py index 9aa9b51..2a4f53d 100644 --- a/src/backend/installPkg.py +++ b/src/backend/installPkg.py @@ -42,11 +42,7 @@ def cliExec(pkgname): if os.path.exists(binary.rstrip().split("/")[1]): os.remove(binary.rstrip().split("/")[1]) - portageExec = subprocess.Popen(['emerge', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname), stdout=subprocess.PIPE, stderr=subprocess.PIPE) - for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): - if not "These are the packages that would be merged, in order:" in portageOutput.rstrip(): - if not "Calculating dependencies" in portageOutput.rstrip(): - print(portageOutput.rstrip()) + portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname), stdout=subprocess.PIPE, stderr=subprocess.PIPE) portageExec.wait() sisyphus.syncDatabase.localTable() @@ -82,14 +78,12 @@ def guiExec(pkgname): if os.path.exists(binary.rstrip().split("/")[1]): os.remove(binary.rstrip().split("/")[1]) - portageExec = subprocess.Popen(['emerge', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + pkgname, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + pkgname, stdout=subprocess.PIPE, stderr=subprocess.PIPE) # kill portage if the program dies or it's terminated by the user atexit.register(sisyphus.killPortage.cliExec, portageExec) for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): - if not "These are the packages that would be merged, in order:" in portageOutput.rstrip(): - if not "Calculating dependencies" in portageOutput.rstrip(): - print(portageOutput.rstrip()) + print(portageOutput.rstrip()) portageExec.wait() sisyphus.syncDatabase.localTable() diff --git a/src/backend/installSrc.py b/src/backend/installSrc.py index d7a6cd3..1f65312 100644 --- a/src/backend/installSrc.py +++ b/src/backend/installSrc.py @@ -40,12 +40,7 @@ def cliExec(pkgname): if os.path.exists(binary.rstrip().split("/")[1]): os.remove(binary.rstrip().split("/")[1]) - portageExec = subprocess.Popen(['emerge', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname), stdout=subprocess.PIPE, stderr=subprocess.PIPE) - - for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): - if not "These are the packages that would be merged, in order:" in portageOutput.rstrip(): - if not "Calculating dependencies" in portageOutput.rstrip(): - print(portageOutput.rstrip()) + portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname), stdout=subprocess.PIPE, stderr=subprocess.PIPE) portageExec.wait() sisyphus.syncDatabase.localTable() @@ -73,12 +68,7 @@ def cliExec(pkgname): if os.path.exists(binary.rstrip().split("/")[1]): os.remove(binary.rstrip().split("/")[1]) - portageExec = subprocess.Popen(['emerge', '--usepkg', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname), stdout=subprocess.PIPE, stderr=subprocess.PIPE) - - for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): - if not "These are the packages that would be merged, in order:" in portageOutput.rstrip(): - if not "Calculating dependencies" in portageOutput.rstrip(): - print(portageOutput.rstrip()) + portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--usepkg', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname), stdout=subprocess.PIPE, stderr=subprocess.PIPE) portageExec.wait() sisyphus.syncDatabase.localTable() @@ -87,12 +77,7 @@ def cliExec(pkgname): else: print("\n" + "These are the source packages that would be merged, in order:" + "\n\n" + " ".join(areSources) + "\n\n" + "Total:" + " " + str(len(areSources)) + " " + "source package(s)" + "\n") if input("Would you like to proceed?" + " " + "[y/N]" + " ").lower().strip()[:1] == "y": - portageExec = subprocess.Popen(['emerge', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname), stdout=subprocess.PIPE, stderr=subprocess.PIPE) - - for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): - if not "These are the packages that would be merged, in order:" in portageOutput.rstrip(): - if not "Calculating dependencies" in portageOutput.rstrip(): - print(portageOutput.rstrip()) + portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname), stdout=subprocess.PIPE, stderr=subprocess.PIPE) portageExec.wait() sisyphus.syncDatabase.localTable() diff --git a/src/backend/upgradePkg.py b/src/backend/upgradePkg.py index 05d3674..a62408d 100644 --- a/src/backend/upgradePkg.py +++ b/src/backend/upgradePkg.py @@ -42,12 +42,7 @@ def cliExec(): if os.path.exists(binary.rstrip().split("/")[1]): os.remove(binary.rstrip().split("/")[1]) - portageExec = subprocess.Popen(['emerge', '--update', '--deep', '--newuse', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - - for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): - if not "These are the packages that would be merged, in order:" in portageOutput.rstrip(): - if not "Calculating dependencies" in portageOutput.rstrip(): - print(portageOutput.rstrip()) + portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--update', '--deep', '--newuse', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) portageExec.wait() sisyphus.syncDatabase.localTable() @@ -87,14 +82,12 @@ def guiExec(): if os.path.exists(binary.rstrip().split("/")[1]): os.remove(binary.rstrip().split("/")[1]) - portageExec = subprocess.Popen(['emerge', '--update', '--deep', '--newuse', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--update', '--deep', '--newuse', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) # kill portage if the program dies or it's terminated by the user atexit.register(sisyphus.killPortage.cliExec, portageExec) for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): - if not "These are the packages that would be merged, in order:" in portageOutput.rstrip(): - if not "Calculating dependencies" in portageOutput.rstrip(): - print(portageOutput.rstrip()) + print(portageOutput.rstrip()) portageExec.wait() sisyphus.syncDatabase.localTable() diff --git a/src/backend/upgradeSrc.py b/src/backend/upgradeSrc.py index edca120..d2d4ec2 100644 --- a/src/backend/upgradeSrc.py +++ b/src/backend/upgradeSrc.py @@ -40,12 +40,7 @@ def cliExec(): if os.path.exists(binary.rstrip().split("/")[1]): os.remove(binary.rstrip().split("/")[1]) - portageExec = subprocess.Popen(['emerge', '--update', '--deep', '--newuse', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - - for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): - if not "These are the packages that would be merged, in order:" in portageOutput.rstrip(): - if not "Calculating dependencies" in portageOutput.rstrip(): - print(portageOutput.rstrip()) + portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--update', '--deep', '--newuse', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) portageExec.wait() sisyphus.syncDatabase.localTable() @@ -73,12 +68,7 @@ def cliExec(): if os.path.exists(binary.rstrip().split("/")[1]): os.remove(binary.rstrip().split("/")[1]) - portageExec = subprocess.Popen(['emerge', '--update', '--deep', '--newuse', '--usepkg', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - - for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): - if not "These are the packages that would be merged, in order:" in portageOutput.rstrip(): - if not "Calculating dependencies" in portageOutput.rstrip(): - print(portageOutput.rstrip()) + portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--update', '--deep', '--newuse', '--usepkg', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) portageExec.wait() sisyphus.syncDatabase.localTable() @@ -87,12 +77,7 @@ def cliExec(): else: print("\n" + "These are the source packages that would be merged, in order:" + "\n\n" + " ".join(areSources) + "\n\n" + "Total:" + " " + str(len(areSources)) + " " + "source package(s)" + "\n") if input("Would you like to proceed?" + " " + "[y/N]" + " ").lower().strip()[:1] == "y": - portageExec = subprocess.Popen(['emerge', '--update', '--deep', '--newuse', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - - for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): - if not "These are the packages that would be merged, in order:" in portageOutput.rstrip(): - if not "Calculating dependencies" in portageOutput.rstrip(): - print(portageOutput.rstrip()) + portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--update', '--deep', '--newuse', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) portageExec.wait() sisyphus.syncDatabase.localTable() -- cgit v1.2.3