summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-02-02 22:44:34 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-02-02 22:44:34 +0000
commitc72f5dac54d4b8382a4d3891af07509ebe629f63 (patch)
tree58259dee11751843171e4f4e5fe809f6a90e585e
parente8e43274a6dda2257f3a43dc2a20572f7779cce5 (diff)
minor changes
-rw-r--r--src/backend/binhost.py8
-rw-r--r--src/backend/check.py4
-rw-r--r--src/backend/csvfiles.py20
-rw-r--r--src/backend/database.py6
-rw-r--r--src/backend/ebuildinstall.py6
-rw-r--r--src/backend/ebuildupgrade.py2
-rw-r--r--src/backend/install.py8
-rw-r--r--src/backend/update.py16
-rw-r--r--src/backend/upgrade.py8
9 files changed, 39 insertions, 39 deletions
diff --git a/src/backend/binhost.py b/src/backend/binhost.py
index 5bcf20c..809fa34 100644
--- a/src/backend/binhost.py
+++ b/src/backend/binhost.py
@@ -3,13 +3,13 @@
import subprocess
import io
-def getURL():
- binhostURL = []
+def start():
+ isBinhost = []
portageExec = subprocess.Popen(['emerge', '--info', '--verbose'], stdout=subprocess.PIPE)
for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
if "PORTAGE_BINHOST" in portageOutput.rstrip():
- binhostURL = str(portageOutput.rstrip().split("=")[1].strip('\"'))
+ isBinhost = str(portageOutput.rstrip().split("=")[1].strip('\"'))
portageExec.wait()
- return binhostURL
+ return isBinhost
diff --git a/src/backend/check.py b/src/backend/check.py
index 3715705..9269735 100644
--- a/src/backend/check.py
+++ b/src/backend/check.py
@@ -13,10 +13,10 @@ def match():
os.chdir(sisyphus.filesystem.portageRepoDir)
needsMatch = int()
- binhostURL = sisyphus.binhost.getURL()
+ isBinhost = sisyphus.binhost.start()
localBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
- if "packages-next" in binhostURL:
+ if "packages-next" in isBinhost:
if localBranch.decode().strip() == "next":
needsMatch = int(0)
else:
diff --git a/src/backend/csvfiles.py b/src/backend/csvfiles.py
index 0d2e895..503ee84 100644
--- a/src/backend/csvfiles.py
+++ b/src/backend/csvfiles.py
@@ -2,16 +2,16 @@
import sisyphus.binhost
-def getURL():
- remotePackagesCsvURL = []
- remoteDescriptionsCsvURL = []
- binhostURL = sisyphus.binhost.getURL()
+def start():
+ isPackageCsv = []
+ isDescriptionCsv = []
+ isBinhost = sisyphus.binhost.start()
- if "packages-next" in binhostURL:
- remotePackagesCsvURL = binhostURL.replace('packages-next', 'csv-next') + 'remotePackagesPre.csv'
- remoteDescriptionsCsvURL = binhostURL.replace('packages-next', 'csv-next') + 'remoteDescriptionsPre.csv'
+ if "packages-next" in isBinhost:
+ isPackageCsv = isBinhost.replace('packages-next', 'csv-next') + 'remotePackagesPre.csv'
+ isDescriptionCsv = isBinhost.replace('packages-next', 'csv-next') + 'remoteDescriptionsPre.csv'
else:
- remotePackagesCsvURL = binhostURL.replace('packages', 'csv') + 'remotePackagesPre.csv'
- remoteDescriptionsCsvURL = binhostURL.replace('packages', 'csv') + 'remoteDescriptionsPre.csv'
+ isPackageCsv = isBinhost.replace('packages', 'csv') + 'remotePackagesPre.csv'
+ isDescriptionCsv = isBinhost.replace('packages', 'csv') + 'remoteDescriptionsPre.csv'
- return remotePackagesCsvURL,remoteDescriptionsCsvURL
+ return isPackageCsv,isDescriptionCsv
diff --git a/src/backend/database.py b/src/backend/database.py
index 9eb3bf5..e2ad380 100644
--- a/src/backend/database.py
+++ b/src/backend/database.py
@@ -9,13 +9,13 @@ import sisyphus.csvfiles
import sisyphus.filesystem
def getRemote():
- remotePackagesCsvURL,remoteDescriptionsCsvURL = sisyphus.csvfiles.getURL()
+ isPackageCsv,isDescriptionCsv = sisyphus.csvfiles.start()
http = urllib3.PoolManager()
- with http.request('GET', remotePackagesCsvURL, preload_content=False) as tmp_buffer, open(sisyphus.filesystem.remotePackagesCsv, 'wb') as output_file:
+ with http.request('GET', isPackageCsv, preload_content=False) as tmp_buffer, open(sisyphus.filesystem.remotePackagesCsv, 'wb') as output_file:
shutil.copyfileobj(tmp_buffer, output_file)
- with http.request('GET', remoteDescriptionsCsvURL, preload_content=False) as tmp_buffer, open(sisyphus.filesystem.remoteDescriptionsCsv, 'wb') as output_file:
+ with http.request('GET', isDescriptionCsv, preload_content=False) as tmp_buffer, open(sisyphus.filesystem.remoteDescriptionsCsv, 'wb') as output_file:
shutil.copyfileobj(tmp_buffer, output_file)
def makeLocal():
diff --git a/src/backend/ebuildinstall.py b/src/backend/ebuildinstall.py
index 02dd8a2..b570734 100644
--- a/src/backend/ebuildinstall.py
+++ b/src/backend/ebuildinstall.py
@@ -17,7 +17,7 @@ def start(pkgname):
if sisyphus.check.root():
sisyphus.update.start()
- binhostURL = sisyphus.binhost.getURL()
+ isBinhost = sisyphus.binhost.start()
areBinaries,areSources,needsConfig = sisyphus.solvedeps.package(pkgname)
if needsConfig == 0:
@@ -28,7 +28,7 @@ def start(pkgname):
if input("Would you like to proceed?" + " " + "[y/N]" + " ").lower().strip()[:1] == "y":
for index, binary in enumerate([package + '.tbz2' for package in areBinaries], start=1):
print(">>> Downloading binary ({}".format(index) + " " + "of" + " " + str(len(areBinaries)) + ")" + " " + binary)
- wget.download(binhostURL + binary)
+ wget.download(isBinhost + binary)
print("\n")
subprocess.call(['qtbz2', '-x'] + binary.rstrip().split("/")[1].split())
@@ -67,7 +67,7 @@ def start(pkgname):
if input("Would you like to proceed?" + " " + "[y/N]" + " ").lower().strip()[:1] == "y":
for index, binary in enumerate([package + '.tbz2' for package in areBinaries], start=1):
print(">>> Downloading binary ({}".format(index) + " " + "of" + " " + str(len(areBinaries)) + ")" + " " + binary)
- wget.download(binhostURL + binary)
+ wget.download(isBinhost + binary)
print("\n")
subprocess.call(['qtbz2', '-x'] + binary.rstrip().split("/")[1].split())
diff --git a/src/backend/ebuildupgrade.py b/src/backend/ebuildupgrade.py
index 013dc03..fb66be6 100644
--- a/src/backend/ebuildupgrade.py
+++ b/src/backend/ebuildupgrade.py
@@ -17,7 +17,7 @@ def start():
if sisyphus.check.root():
sisyphus.update.start()
- binhostURL = sisyphus.binhost.getURL()
+ binhostURL = sisyphus.binhost.start()
areBinaries,areSources,needsConfig = sisyphus.solvedeps.world()
if needsConfig == 0:
diff --git a/src/backend/install.py b/src/backend/install.py
index 17fa98d..98e97bb 100644
--- a/src/backend/install.py
+++ b/src/backend/install.py
@@ -19,7 +19,7 @@ def start(pkgname):
if sisyphus.check.root():
sisyphus.update.start()
- binhostURL = sisyphus.binhost.getURL()
+ isBinhost = sisyphus.binhost.start()
areBinaries,areSources,needsConfig = sisyphus.solvedeps.package(pkgname)
if needsConfig == 0:
@@ -30,7 +30,7 @@ def start(pkgname):
if input("Would you like to proceed?" + " " + "[y/N]" + " ").lower().strip()[:1] == "y":
for index, binary in enumerate([package + '.tbz2' for package in areBinaries], start=1):
print(">>> Downloading binary ({}".format(index) + " " + "of" + " " + str(len(areBinaries)) + ")" + " " + binary)
- wget.download(binhostURL + binary)
+ wget.download(isBinhost + binary)
print("\n")
subprocess.call(['qtbz2', '-x'] + binary.rstrip().split("/")[1].split())
@@ -70,14 +70,14 @@ def start(pkgname):
sys.exit("\nYou need root permissions to do this, exiting!\n")
def startqt(pkgname):
- binhostURL = sisyphus.binhost.getURL()
+ isBinhost = sisyphus.binhost.start()
areBinaries,areSources,needsConfig = sisyphus.solvedeps.package.__wrapped__(pkgname) #undecorate
os.chdir(sisyphus.filesystem.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")
for index, binary in enumerate([package + '.tbz2' for package in areBinaries], start=1):
print(">>> Downloading binary ({}".format(index) + " " + "of" + " " + str(len(areBinaries)) + ")" + " " + binary)
- wget.download(binhostURL + binary)
+ wget.download(isBinhost + binary)
print("\n")
subprocess.call(['qtbz2', '-x'] + binary.rstrip().split("/")[1].split())
diff --git a/src/backend/update.py b/src/backend/update.py
index a70d0e5..efb8dfc 100644
--- a/src/backend/update.py
+++ b/src/backend/update.py
@@ -36,29 +36,29 @@ def checksync():
@animation.wait('fetching updates')
def start():
- binhostURL = sisyphus.binhost.getURL()
+ isBinhost = sisyphus.binhost.start()
needsMatch,localBranch = sisyphus.check.match()
if needsMatch == 0:
checksync()
else:
- if "packages-next" in binhostURL:
- print("\nCurrent branch: '" + localBranch.decode().strip() + "' (stable)" + "\nCurrent binhost: '" + binhostURL + "' (testing)")
+ if "packages-next" in isBinhost:
+ print("\nCurrent branch: '" + localBranch.decode().strip() + "' (stable)" + "\nCurrent binhost: '" + isBinhost + "' (testing)")
else:
- print("\nCurrent branch: '" + localBranch.decode().strip() + "' (testing)" + "\nCurrent binhost: '" + binhostURL + "' (stable)")
+ print("\nCurrent branch: '" + localBranch.decode().strip() + "' (testing)" + "\nCurrent binhost: '" + isBinhost + "' (stable)")
sys.exit("\nInvalid branch - binhost pairing; Use 'sisyphus branch --help' for help; Quitting.")
def startqt():
- binhostURL = sisyphus.binhost.getURL()
+ isBinhost = sisyphus.binhost.start()
needsMatch,localBranch = sisyphus.check.match()
if needsMatch == 0:
checksync()
else:
- if "packages-next" in binhostURL:
- print("\nCurrent branch: '" + localBranch.decode().strip() + "' (stable)" + "\nCurrent binhost: '" + binhostURL + "' (testing)")
+ if "packages-next" in isBinhost:
+ print("\nCurrent branch: '" + localBranch.decode().strip() + "' (stable)" + "\nCurrent binhost: '" + isBinhost + "' (testing)")
else:
- print("\nCurrent branch: '" + localBranch.decode().strip() + "' (testing)" + "\nCurrent binhost: '" + binhostURL + "' (stable)")
+ print("\nCurrent branch: '" + localBranch.decode().strip() + "' (testing)" + "\nCurrent binhost: '" + isBinhost + "' (stable)")
print("\nInvalid branch - binhost pairing; Use 'sisyphus branch --help' for help; Quitting in 10 seconds.\n")
t = int(10)
while t:
diff --git a/src/backend/upgrade.py b/src/backend/upgrade.py
index 28a74f5..a89bff2 100644
--- a/src/backend/upgrade.py
+++ b/src/backend/upgrade.py
@@ -19,7 +19,7 @@ def start():
if sisyphus.check.root():
sisyphus.update.start()
- binhostURL = sisyphus.binhost.getURL()
+ isBinhost = sisyphus.binhost.start()
areBinaries,areSources,needsConfig = sisyphus.solvedeps.world()
if needsConfig == 0:
@@ -30,7 +30,7 @@ def start():
if input("Would you like to proceed?" + " " + "[y/N]" + " ").lower().strip()[:1] == "y":
for index, binary in enumerate([package + '.tbz2' for package in areBinaries], start=1):
print(">>> Downloading binary ({}".format(index) + " " + "of" + " " + str(len(areBinaries)) + ")" + " " + binary)
- wget.download(binhostURL + binary)
+ wget.download(isBinhost + binary)
print("\n")
subprocess.call(['qtbz2', '-x'] + binary.rstrip().split("/")[1].split())
@@ -70,7 +70,7 @@ def start():
sys.exit("\nYou need root permissions to do this, exiting!\n")
def startqt():
- binhostURL = sisyphus.binhost.getURL()
+ isBinhost = sisyphus.binhost.start()
areBinaries,areSources,needsConfig = sisyphus.solvedeps.world.__wrapped__() #undecorate
if not len(areSources) == 0:
@@ -81,7 +81,7 @@ def startqt():
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")
for index, binary in enumerate([package + '.tbz2' for package in areBinaries], start=1):
print(">>> Downloading binary ({}".format(index) + " " + "of" + " " + str(len(areBinaries)) + ")" + " " + binary)
- wget.download(binhostURL + binary)
+ wget.download(isBinhost + binary)
print("\n")
subprocess.call(['qtbz2', '-x'] + binary.rstrip().split("/")[1].split())