summaryrefslogtreecommitdiff
path: root/src/backend/install.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-02-08 17:12:13 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-02-08 17:12:13 +0000
commite3fa4634750ccceb23998fadefc249b35f86ca5b (patch)
tree057ae3b8c0422db00e41abaaf9ca50b06e04148b /src/backend/install.py
parent8d345d75ea4a692b3e9f2830465ec6b580eee730 (diff)
getcolor -> getclr
Diffstat (limited to 'src/backend/install.py')
-rw-r--r--src/backend/install.py106
1 files changed, 53 insertions, 53 deletions
diff --git a/src/backend/install.py b/src/backend/install.py
index 5e9b3b8..8dab0ef 100644
--- a/src/backend/install.py
+++ b/src/backend/install.py
@@ -10,7 +10,7 @@ import sys
import time
import sisyphus.checkenv
import sisyphus.dlpkg
-import sisyphus.getcolor
+import sisyphus.getclr
import sisyphus.getfs
import sisyphus.killemerge
import sisyphus.solvedeps
@@ -27,8 +27,8 @@ signal.signal(signal.SIGINT, sigint_handler)
def start(pkgname, ebuild=False, gfx_ui=False, oneshot=False):
if not sisyphus.checkenv.root():
- print(sisyphus.getcolor.bright_red +
- "\nYou need root permissions to do this!\n" + sisyphus.getcolor.reset)
+ print(sisyphus.getclr.bright_red +
+ "\nYou need root permissions to do this!\n" + sisyphus.getclr.reset)
sys.exit()
else:
if gfx_ui:
@@ -80,28 +80,28 @@ def start(pkgname, ebuild=False, gfx_ui=False, oneshot=False):
sys.exit(app.exec_()) # kill GUI window
else:
- print(sisyphus.getcolor.bright_red +
- "\nCannot proceed!\n" + sisyphus.getcolor.reset)
- print(sisyphus.getcolor.bright_yellow +
- "Apply the above changes to your portage configuration files and try again!" + sisyphus.getcolor.reset)
+ print(sisyphus.getclr.bright_red +
+ "\nCannot proceed!\n" + sisyphus.getclr.reset)
+ print(sisyphus.getclr.bright_yellow +
+ "Apply the above changes to your portage configuration files and try again!" + sisyphus.getclr.reset)
sys.exit()
else:
if len(bin_list) == 0 and len(src_list) == 0:
- print(sisyphus.getcolor.bright_red +
- "\nNo package found!\n" + sisyphus.getcolor.reset)
+ print(sisyphus.getclr.bright_red +
+ "\nNo package found!\n" + sisyphus.getclr.reset)
sys.exit()
if ebuild: # ebuild mode
if len(bin_list) == 0 and len(src_list) != 0: # source mode, ignore aliens
- print("\n" + sisyphus.getcolor.green +
- "These are the source packages that would be merged, in order:" + sisyphus.getcolor.reset + "\n")
- print("\n" + sisyphus.getcolor.green +
- ", ".join(src_list) + sisyphus.getcolor.reset + "\n")
- print("\n" + sisyphus.getcolor.bright_white + "Total:" + " " + str(
- len(src_list)) + " " + "source package(s)" + sisyphus.getcolor.reset + "\n")
+ print("\n" + sisyphus.getclr.green +
+ "These are the source packages that would be merged, in order:" + sisyphus.getclr.reset + "\n")
+ print("\n" + sisyphus.getclr.green +
+ ", ".join(src_list) + sisyphus.getclr.reset + "\n")
+ print("\n" + sisyphus.getclr.bright_white + "Total:" + " " + str(
+ len(src_list)) + " " + "source package(s)" + sisyphus.getclr.reset + "\n")
while True:
- 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 + "]" + " ")
+ user_input = input(sisyphus.getclr.bright_white + "Would you like to proceed?" + sisyphus.getclr.reset + " " +
+ "[" + sisyphus.getclr.bright_green + "Yes" + sisyphus.getclr.reset + "/" + sisyphus.getclr.bright_red + "No" + sisyphus.getclr.reset + "]" + " ")
if user_input.lower() in ['yes', 'y', '']:
p_exe = subprocess.Popen(['emerge', '--quiet', '--verbose', '--with-bdeps=y', '--misspell-suggestion=n',
'--fuzzy-search=n'] + (['--oneshot'] if oneshot else []) + list(pkgname))
@@ -123,22 +123,22 @@ def start(pkgname, ebuild=False, gfx_ui=False, oneshot=False):
user_input + "'" + " " + "not understood.\n")
continue
elif len(bin_list) != 0 and len(src_list) != 0: # hybrid mode, ignore aliens
- print("\n" + sisyphus.getcolor.green +
- "These are the binary packages that would be merged, in order:" + sisyphus.getcolor.reset + "\n")
- print("\n" + sisyphus.getcolor.magenta +
- ", ".join(bin_list) + sisyphus.getcolor.reset + "\n")
- print("\n" + sisyphus.getcolor.bright_white + "Total:" + " " + str(
- len(bin_list)) + " " + "binary package(s)" + sisyphus.getcolor.reset + "\n")
+ print("\n" + sisyphus.getclr.green +
+ "These are the binary packages that would be merged, in order:" + sisyphus.getclr.reset + "\n")
+ print("\n" + sisyphus.getclr.magenta +
+ ", ".join(bin_list) + sisyphus.getclr.reset + "\n")
+ print("\n" + sisyphus.getclr.bright_white + "Total:" + " " + str(
+ len(bin_list)) + " " + "binary package(s)" + sisyphus.getclr.reset + "\n")
- print("\n" + sisyphus.getcolor.green +
- "These are the source packages that would be merged, in order:" + sisyphus.getcolor.reset + "\n")
- print("\n" + sisyphus.getcolor.green +
- ", ".join(src_list) + sisyphus.getcolor.reset + "\n")
- print("\n" + sisyphus.getcolor.bright_white + "Total:" + " " + str(
- len(src_list)) + " " + "source package(s)" + sisyphus.getcolor.reset + "\n")
+ print("\n" + sisyphus.getclr.green +
+ "These are the source packages that would be merged, in order:" + sisyphus.getclr.reset + "\n")
+ print("\n" + sisyphus.getclr.green +
+ ", ".join(src_list) + sisyphus.getclr.reset + "\n")
+ print("\n" + sisyphus.getclr.bright_white + "Total:" + " " + str(
+ len(src_list)) + " " + "source package(s)" + sisyphus.getclr.reset + "\n")
while True:
- 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 + "]" + " ")
+ user_input = input(sisyphus.getclr.bright_white + "Would you like to proceed?" + sisyphus.getclr.reset + " " +
+ "[" + sisyphus.getclr.bright_green + "Yes" + sisyphus.getclr.reset + "/" + sisyphus.getclr.bright_red + "No" + sisyphus.getclr.reset + "]" + " ")
if user_input.lower() in ['yes', 'y', '']:
sisyphus.dlpkg.start(dl_world=False, gfx_ui=False)
os.chdir(sisyphus.getfs.p_cch_dir)
@@ -162,15 +162,15 @@ def start(pkgname, ebuild=False, gfx_ui=False, oneshot=False):
user_input + "'" + " " + "not understood.\n")
continue
elif len(bin_list) != 0 and len(src_list) == 0: # binary mode, fallback
- print("\n" + sisyphus.getcolor.green +
- "These are the binary packages that would be merged, in order:" + sisyphus.getcolor.reset + "\n")
- print("\n" + sisyphus.getcolor.magenta +
- ", ".join(bin_list) + sisyphus.getcolor.reset + "\n")
- print("\n" + sisyphus.getcolor.bright_white + "Total:" + " " + str(
- len(bin_list)) + " " + "binary package(s)" + sisyphus.getcolor.reset + "\n")
+ print("\n" + sisyphus.getclr.green +
+ "These are the binary packages that would be merged, in order:" + sisyphus.getclr.reset + "\n")
+ print("\n" + sisyphus.getclr.magenta +
+ ", ".join(bin_list) + sisyphus.getclr.reset + "\n")
+ print("\n" + sisyphus.getclr.bright_white + "Total:" + " " + str(
+ len(bin_list)) + " " + "binary package(s)" + sisyphus.getclr.reset + "\n")
while True:
- 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 + "]" + " ")
+ user_input = input(sisyphus.getclr.bright_white + "Would you like to proceed?" + sisyphus.getclr.reset + " " +
+ "[" + sisyphus.getclr.bright_green + "Yes" + sisyphus.getclr.reset + "/" + sisyphus.getclr.bright_red + "No" + sisyphus.getclr.reset + "]" + " ")
if user_input.lower() in ['yes', 'y', '']:
sisyphus.dlpkg.start(dl_world=False, gfx_ui=False)
os.chdir(sisyphus.getfs.p_cch_dir)
@@ -206,9 +206,9 @@ def start(pkgname, ebuild=False, gfx_ui=False, oneshot=False):
sys.exit(app.exec_()) # kill GUI window
else:
- print(sisyphus.getcolor.bright_red +
- "\nSource package(s) found in the mix!\n" + sisyphus.getcolor.reset)
- print(sisyphus.getcolor.bright_yellow + "Use" + sisyphus.getcolor.reset + " " +
+ print(sisyphus.getclr.bright_red +
+ "\nSource package(s) found in the mix!\n" + sisyphus.getclr.reset)
+ print(sisyphus.getclr.bright_yellow + "Use" + sisyphus.getclr.reset + " " +
"'" + "sisyphus install" + " " + " ".join(pkgname) + " " + "--ebuild" + "'")
sys.exit()
elif len(bin_list) != 0 and len(src_list) != 0: # hybrid mode (noop), catch aliens
@@ -223,9 +223,9 @@ def start(pkgname, ebuild=False, gfx_ui=False, oneshot=False):
sys.exit(app.exec_()) # kill GUI window
else:
- print(sisyphus.getcolor.bright_red +
- "\nSource package(s) found in the mix!\n" + sisyphus.getcolor.reset)
- print(sisyphus.getcolor.bright_yellow + "Use" + sisyphus.getcolor.reset + " " +
+ print(sisyphus.getclr.bright_red +
+ "\nSource package(s) found in the mix!\n" + sisyphus.getclr.reset)
+ print(sisyphus.getclr.bright_yellow + "Use" + sisyphus.getclr.reset + " " +
"'" + "sisyphus install" + " " + " ".join(pkgname) + " " + "--ebuild" + "'")
sys.exit()
elif len(bin_list) != 0 and len(src_list) == 0: # binary mode
@@ -247,15 +247,15 @@ def start(pkgname, ebuild=False, gfx_ui=False, oneshot=False):
p_exe.wait()
sisyphus.syncdb.lcl_tbl()
else:
- print("\n" + sisyphus.getcolor.green +
- "These are the binary packages that would be merged, in order:" + sisyphus.getcolor.reset + "\n")
- print("\n" + sisyphus.getcolor.magenta +
- ", ".join(bin_list) + sisyphus.getcolor.reset + "\n")
- print("\n" + sisyphus.getcolor.bright_white + "Total:" + " " + str(
- len(bin_list)) + " " + "binary package(s)" + sisyphus.getcolor.reset + "\n")
+ print("\n" + sisyphus.getclr.green +
+ "These are the binary packages that would be merged, in order:" + sisyphus.getclr.reset + "\n")
+ print("\n" + sisyphus.getclr.magenta +
+ ", ".join(bin_list) + sisyphus.getclr.reset + "\n")
+ print("\n" + sisyphus.getclr.bright_white + "Total:" + " " + str(
+ len(bin_list)) + " " + "binary package(s)" + sisyphus.getclr.reset + "\n")
while True:
- 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 + "]" + " ")
+ user_input = input(sisyphus.getclr.bright_white + "Would you like to proceed?" + sisyphus.getclr.reset + " " +
+ "[" + sisyphus.getclr.bright_green + "Yes" + sisyphus.getclr.reset + "/" + sisyphus.getclr.bright_red + "No" + sisyphus.getclr.reset + "]" + " ")
if user_input.lower() in ['yes', 'y', '']:
sisyphus.dlpkg.start(
dl_world=False, gfx_ui=False)