summaryrefslogtreecommitdiff
path: root/src/backend/upgrade.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-07 17:47:46 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-07 17:47:46 +0100
commit5a3414863014bec7f901cb04b9afd49834e181f4 (patch)
treed5efa6c68fd41907a77043c12a38a60c87a6b9c6 /src/backend/upgrade.py
parenta9d87ee5bd0c98b6daae9ddf307c634da9c35551 (diff)
backend : rewrite download in a more efficient way
Diffstat (limited to 'src/backend/upgrade.py')
-rw-r--r--src/backend/upgrade.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/upgrade.py b/src/backend/upgrade.py
index c138533..a897078 100644
--- a/src/backend/upgrade.py
+++ b/src/backend/upgrade.py
@@ -33,7 +33,8 @@ def start():
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', '']:
- sisyphus.download.dl_wpbin_only()
+ sisyphus.download.start(
+ redir_out=False, dl_world=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'])
p_exe.wait()
@@ -86,7 +87,8 @@ 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', '']:
- sisyphus.download.dl_wpbin_only()
+ sisyphus.download.start(
+ redir_out=False, dl_world=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'])
p_exe.wait()
@@ -114,7 +116,8 @@ 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', '']:
- sisyphus.download.dl_wpbin()
+ sisyphus.download.start(
+ redir_out=False, dl_world=True)
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()
@@ -174,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.xdl_wpbin_only()
+ sisyphus.download.start(redir_out=True, dl_world=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