diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-04-07 18:55:23 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-04-07 18:55:23 +0100 |
commit | c8b3803ba3a0a5dd0d61d2ae178b8977c397b1b7 (patch) | |
tree | 396029be40be66f859c0c65a76aeda047503e574 /src/backend | |
parent | f5b227fc269a4cf6c5f8597b9183e780cb92e28f (diff) |
download : show why and where we use output_redirection (aka, graphical interface)
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/download.py | 4 | ||||
-rw-r--r-- | src/backend/install.py | 8 | ||||
-rw-r--r-- | src/backend/upgrade.py | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/backend/download.py b/src/backend/download.py index c93f9af..53fa936 100644 --- a/src/backend/download.py +++ b/src/backend/download.py @@ -10,7 +10,7 @@ import sisyphus.getfs import sisyphus.killemerge -def start(redir_out=False, dl_world=False): +def start(dl_world=False, gfx_ui=False): dl_list = [] if dl_world: @@ -28,7 +28,7 @@ def start(redir_out=False, dl_world=False): args = ['--nodeps', '--quiet', '--verbose', '--getbinpkg', '--fetchonly', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(dl_list) - if redir_out: + if gfx_ui: p_exe = subprocess.Popen( ['emerge'] + args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) # kill portage if the program dies or it's terminated by the user diff --git a/src/backend/install.py b/src/backend/install.py index 5f89b01..83f26f6 100644 --- a/src/backend/install.py +++ b/src/backend/install.py @@ -34,7 +34,7 @@ def start(pkgname): "[" + 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.start( - redir_out=False, dl_world=False) + dl_world=False, gfx_ui=False) p_exe = subprocess.Popen(['emerge', '--quiet', '--verbose', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname)) p_exe.wait() @@ -88,7 +88,7 @@ def estart(pkgname): "[" + 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.start( - redir_out=False, dl_world=False) + dl_world=False, gfx_ui=False) p_exe = subprocess.Popen(['emerge', '--quiet', '--verbose', '--usepkg', '--usepkgonly', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname)) p_exe.wait() @@ -117,7 +117,7 @@ def estart(pkgname): "[" + 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.start( - redir_out=False, dl_world=False) + dl_world=False, gfx_ui=False) p_exe = subprocess.Popen(['emerge', '--quiet', '--verbose', '--usepkg', '--rebuilt-binaries', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n'] + list(pkgname)) p_exe.wait() @@ -172,7 +172,7 @@ def xstart(pkgname): os.chdir(sisyphus.getfs.p_cch_dir) print("\n" + "These are the binary packages that will be merged, in order:" + "\n\n" + ", ".join(bin_list) + "\n\n" + "Total:" + " " + str(len(bin_list)) + " " + "binary package(s)" + "\n\n") - sisyphus.download.start(redir_out=True, dl_world=False) + sisyphus.download.start(dl_world=False, gfx_ui=True) p_exe = 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 diff --git a/src/backend/upgrade.py b/src/backend/upgrade.py index d1d21b5..376872d 100644 --- a/src/backend/upgrade.py +++ b/src/backend/upgrade.py @@ -34,7 +34,7 @@ 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.start( - redir_out=False, dl_world=True) + dl_world=True, gfx_ui=False) 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() @@ -88,7 +88,7 @@ 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.start( - redir_out=False, dl_world=True) + dl_world=True, gfx_ui=False) 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() @@ -117,7 +117,7 @@ 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.start( - redir_out=False, dl_world=True) + dl_world=True, gfx_ui=False) 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() @@ -177,7 +177,7 @@ def xstart(): os.chdir(sisyphus.getfs.p_cch_dir) print("\n" + "These are the binary packages that will be merged, in order:" + "\n\n" + ", ".join( bin_list) + "\n\n" + "Total:" + " " + str(len(bin_list)) + " " + "binary package(s)" + "\n\n") - sisyphus.download.start(redir_out=True, dl_world=True) + sisyphus.download.start(dl_world=True, gfx_ui=True) 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 |