From 36e2fca70465e2e658570bcdf276d5ca644125bb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 9 Mar 2023 19:05:15 +0000 Subject: portageExec -> p_exe --- src/backend/upgrade.py | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/backend/upgrade.py') diff --git a/src/backend/upgrade.py b/src/backend/upgrade.py index 00400ce..fbd23d3 100644 --- a/src/backend/upgrade.py +++ b/src/backend/upgrade.py @@ -34,9 +34,9 @@ def start(): "[" + sisyphus.getcolor.bright_green + "Yes" + sisyphus.getcolor.reset + "/" + sisyphus.getcolor.bright_red + "No " + sisyphus.getcolor.reset + "]" + " ") if user_input.lower() in ['yes', 'y', '']: sisyphus.download.worldbinpkgonly() - 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']) - portageExec.wait() + p_exe = subprocess.Popen(['emerge', '--quiet', '--verbose', '--update', '--deep', '--newuse', '--usepkg', '--usepkgonly', + '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world']) + p_exe.wait() sisyphus.syncdb.localTable() break elif user_input.lower() in ['no', 'n']: @@ -89,9 +89,9 @@ def estart(): "[" + sisyphus.getcolor.bright_green + "Yes" + sisyphus.getcolor.reset + "/" + sisyphus.getcolor.bright_red + "No" + sisyphus.getcolor.reset + "]" + " ") if user_input.lower() in ['yes', 'y', '']: sisyphus.download.worldbinpkgonly() - 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']) - portageExec.wait() + p_exe = subprocess.Popen(['emerge', '--quiet', '--verbose', '--update', '--deep', '--newuse', '--usepkg', '--usepkgonly', + '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world']) + p_exe.wait() sisyphus.syncdb.localTable() break elif user_input.lower() in ['no', 'n']: @@ -119,9 +119,9 @@ def estart(): "[" + sisyphus.getcolor.bright_green + "Yes" + sisyphus.getcolor.reset + "/" + sisyphus.getcolor.bright_red + "No" + sisyphus.getcolor.reset + "]" + " ") if user_input.lower() in ['yes', 'y', '']: sisyphus.download.worldbinpkg() - portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--update', '--deep', '--newuse', '--usepkg', - '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world']) - portageExec.wait() + p_exe = subprocess.Popen(['emerge', '--quiet', '--verbose', '--update', '--deep', '--newuse', '--usepkg', + '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world']) + p_exe.wait() sisyphus.syncdb.localTable() break elif user_input.lower() in ['no', 'n']: @@ -140,9 +140,9 @@ def estart(): user_input = input(sisyphus.getcolor.bright_white + "Would you like to proceed?" + sisyphus.getcolor.reset + " " + "[" + sisyphus.getcolor.bright_green + "Yes" + sisyphus.getcolor.reset + "/" + sisyphus.getcolor.bright_red + "No" + sisyphus.getcolor.reset + "]" + " ") if user_input.lower() in ['yes', 'y', '']: - 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() + p_exe = 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) + p_exe.wait() sisyphus.syncdb.localTable() break elif user_input.lower() in ['no', 'n']: @@ -155,9 +155,9 @@ def estart(): user_input + "'" + " " + "not understood.\n") continue else: - portageExec = subprocess.Popen(['emerge', '--quiet', '--update', '--deep', '--newuse', '--pretend', '--getbinpkg', - '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world']) - portageExec.wait() + p_exe = subprocess.Popen(['emerge', '--quiet', '--update', '--deep', '--newuse', '--pretend', '--getbinpkg', + '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world']) + p_exe.wait() print(sisyphus.getcolor.bright_red + "\nCannot proceed!\n" + sisyphus.getcolor.reset) print(sisyphus.getcolor.bright_yellow + @@ -183,15 +183,15 @@ def xstart(): print("\n" + "These are the binary packages that will be merged, in order:" + "\n\n" + ", ".join( areBinaries) + "\n\n" + "Total:" + " " + str(len(areBinaries)) + " " + "binary package(s)" + "\n\n") sisyphus.download.xworldbinpkgonly() - 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) + p_exe = 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.killemerge.start, portageExec) + atexit.register(sisyphus.killemerge.start, p_exe) - for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): + for portageOutput in io.TextIOWrapper(p_exe.stdout, encoding="utf-8"): print(portageOutput.rstrip()) - portageExec.wait() + p_exe.wait() sisyphus.syncdb.localTable() else: print("\nNo package upgrades found!\n") -- cgit v1.2.3