summaryrefslogtreecommitdiff
path: root/src/backend/upgrade.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-12 22:27:04 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-12 22:27:04 +0000
commitdef1fa5301790963e7e7ae214a2df1c692f97005 (patch)
tree47be1c85884facf0bbed4d22a8a9e2fee904eb71 /src/backend/upgrade.py
parente07a1e4959c34d70631b693f76af8163702c306a (diff)
bugfix : https://bugs.redcorelinux.org/show_bug.cgi?id=132 && add manual cache cleaning optionv5.2301.0
Diffstat (limited to 'src/backend/upgrade.py')
-rw-r--r--src/backend/upgrade.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/backend/upgrade.py b/src/backend/upgrade.py
index 0ec707c..f3a21c0 100644
--- a/src/backend/upgrade.py
+++ b/src/backend/upgrade.py
@@ -7,7 +7,6 @@ import pickle
import subprocess
import sys
import sisyphus.checkenv
-import sisyphus.download
import sisyphus.getcolor
import sisyphus.getfs
import sisyphus.killemerge
@@ -33,7 +32,9 @@ 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.world()
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--update', '--deep', '--newuse', '--getbinpkg', '--getbinpkgonly',
+ '--fetchonly', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'])
+ portageExec.wait()
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()
@@ -88,7 +89,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', '']:
- sisyphus.download.world()
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--update', '--deep', '--newuse', '--getbinpkg', '--getbinpkgonly',
+ '--fetchonly', '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'])
+ portageExec.wait()
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()
@@ -118,7 +121,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', '']:
- sisyphus.download.world()
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--update', '--deep', '--newuse', '--getbinpkg', '--fetchonly',
+ '--rebuilt-binaries', '--backtrack=100', '--with-bdeps=y', '--misspell-suggestion=n', '--fuzzy-search=n', '@world'])
+ poortageExec.wait()
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()
@@ -182,7 +187,15 @@ def xstart():
os.chdir(sisyphus.getfs.portageCacheDir)
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.world()
+ portageExec = subprocess.Popen(['emerge', '--quiet', '--verbose', '--update', '--deep', '--newuse', '--getbinpkg', '--getbinpkgonly', '--fetchonly', '--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)
+
+ for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
+ print(portageOutput.rstrip())
+
+ portageExec.wait()
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