diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-10-30 14:31:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-10-30 14:31:44 +0000 |
commit | 129031c9155d03890ef66f00be1ab60f63327c35 (patch) | |
tree | a01810eae7ff87f1bc0836bf74ef9d921feb85e2 /src/backend/upgradePkg.py | |
parent | 02b654dc089c570ce81ce5da0c2c48d5d21d3cb8 (diff) |
move getFilesystem -> getfs
Diffstat (limited to 'src/backend/upgradePkg.py')
-rw-r--r-- | src/backend/upgradePkg.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/backend/upgradePkg.py b/src/backend/upgradePkg.py index 5110499..d910df3 100644 --- a/src/backend/upgradePkg.py +++ b/src/backend/upgradePkg.py @@ -9,7 +9,7 @@ import sys import wget import sisyphus.checkenv import sisyphus.getenv -import sisyphus.getFilesystem +import sisyphus.getfs import sisyphus.killPortage import sisyphus.resolveDeps import sisyphus.syncDatabase @@ -25,7 +25,7 @@ def cliExec(): if needsConfig == 0: if len(areSources) == 0: if not len(areBinaries) == 0: - os.chdir(sisyphus.getFilesystem.portageCacheDir) + os.chdir(sisyphus.getfs.portageCacheDir) print("\n" + "These are the binary packages that would be merged, in order:" + "\n\n" + " ".join(areBinaries) + "\n\n" + "Total:" + " " + str(len(areBinaries)) + " " + "binary package(s)" + "\n") 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): @@ -33,11 +33,11 @@ def cliExec(): wget.download(binhostURL + binary) print("\n") - if os.path.isdir(os.path.join(sisyphus.getFilesystem.portageCacheDir, binary.rstrip().split("/")[0])): - shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.getFilesystem.portageCacheDir, binary.rstrip().split("/")[0]), os.path.basename(binary.rstrip().split("/")[1]))) + 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.getFilesystem.portageCacheDir, binary.rstrip().split("/")[0])) - shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.getFilesystem.portageCacheDir, binary.rstrip().split("/")[0]), os.path.basename(binary.rstrip().split("/")[1]))) + 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]) @@ -66,18 +66,18 @@ def guiExec(): print("\n" + "Source package(s) found in the mix;" + " " + "Use sisyphus CLI:" + " " + "'" + "sisyphus upgrade --ebuild" + "'" + " " + "to perform the upgrade;" + " " + "Aborting." + "\n") else: if not len(areBinaries) == 0: - os.chdir(sisyphus.getFilesystem.portageCacheDir) + 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.getFilesystem.portageCacheDir, binary.rstrip().split("/")[0])): - shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.getFilesystem.portageCacheDir, binary.rstrip().split("/")[0]), os.path.basename(binary.rstrip().split("/")[1]))) + 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.getFilesystem.portageCacheDir, binary.rstrip().split("/")[0])) - shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.getFilesystem.portageCacheDir, binary.rstrip().split("/")[0]), os.path.basename(binary.rstrip().split("/")[1]))) + 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]) |