From bdb1f218d3133bb1ca75f2c104d64ed315fc79ea Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 30 Oct 2022 16:09:02 +0000 Subject: fix indentation --- src/backend/install.py | 56 +++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'src/backend') diff --git a/src/backend/install.py b/src/backend/install.py index 4104a25..741b5ed 100644 --- a/src/backend/install.py +++ b/src/backend/install.py @@ -143,31 +143,31 @@ def estart(pkgname): sys.exit("\nYou need root permissions to do this, exiting!\n") def startx(pkgname): - binhostURL = sisyphus.getenv.binhostURL() - areBinaries,areSources,needsConfig = sisyphus.solvedeps.package.__wrapped__(pkgname) #undecorate - - 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") - 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) - print("\n") - - if os.path.isdir(os.path.join(sisyphus.getfs.portageCacheDir, binary.rstrip().split("/")[0])): - shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.getfs.portageCacheDir, binary.rstrip().split("/")[0]), os.path.basename(binary.rstrip().split("/")[1]))) - else: - os.makedirs(os.path.join(sisyphus.getfs.portageCacheDir, binary.rstrip().split("/")[0])) - shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.getfs.portageCacheDir, binary.rstrip().split("/")[0]), os.path.basename(binary.rstrip().split("/")[1]))) - - if os.path.exists(binary.rstrip().split("/")[1]): - os.remove(binary.rstrip().split("/")[1]) - - portageExec = 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 - atexit.register(sisyphus.killemerge.start, portageExec) - - for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): - print(portageOutput.rstrip()) - - portageExec.wait() - sisyphus.syncdb.localTable() + binhostURL = sisyphus.getenv.binhostURL() + areBinaries,areSources,needsConfig = sisyphus.solvedeps.package.__wrapped__(pkgname) #undecorate + + 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") + 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) + print("\n") + + if os.path.isdir(os.path.join(sisyphus.getfs.portageCacheDir, binary.rstrip().split("/")[0])): + shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.getfs.portageCacheDir, binary.rstrip().split("/")[0]), os.path.basename(binary.rstrip().split("/")[1]))) + else: + os.makedirs(os.path.join(sisyphus.getfs.portageCacheDir, binary.rstrip().split("/")[0])) + shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.getfs.portageCacheDir, binary.rstrip().split("/")[0]), os.path.basename(binary.rstrip().split("/")[1]))) + + if os.path.exists(binary.rstrip().split("/")[1]): + os.remove(binary.rstrip().split("/")[1]) + + portageExec = 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 + atexit.register(sisyphus.killemerge.start, portageExec) + + for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): + print(portageOutput.rstrip()) + + portageExec.wait() + sisyphus.syncdb.localTable() -- cgit v1.2.3