diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-02-08 01:53:05 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-02-08 01:53:05 +0000 |
commit | 4a0e1e81a257000e372877360eac419ff2a3c834 (patch) | |
tree | 9568a966d9337c3f4ad2f11d9191557bdad50d6b /src/backend/ebuildinstall.py | |
parent | 37381bb9d592c77d8ceafb55c602d122a95aec65 (diff) |
backend : we already have package category in the calculated dependency list, so use it and don't waste time extracting it from the tarbalsv4.2102.0
Diffstat (limited to 'src/backend/ebuildinstall.py')
-rw-r--r-- | src/backend/ebuildinstall.py | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/src/backend/ebuildinstall.py b/src/backend/ebuildinstall.py index c20ad57..12bfcad 100644 --- a/src/backend/ebuildinstall.py +++ b/src/backend/ebuildinstall.py @@ -31,17 +31,11 @@ def start(pkgname): wget.download(isBinhost + binary) print("\n") - subprocess.call(['qtbz2', '-x'] + binary.rstrip().split("/")[1].split()) - CATEGORY = subprocess.check_output(['qxpak', '-x', '-O'] + binary.rstrip().split("/")[1].replace('tbz2', 'xpak').split() + ['CATEGORY']) - - if os.path.exists(binary.rstrip().split("/")[1].replace('tbz2', 'xpak')): - os.remove(binary.rstrip().split("/")[1].replace('tbz2', 'xpak')) - - if os.path.isdir(os.path.join(sisyphus.filesystem.portageCacheDir, CATEGORY.decode().strip())): - shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.filesystem.portageCacheDir, CATEGORY.decode().strip()), os.path.basename(binary.rstrip().split("/")[1]))) + if os.path.isdir(os.path.join(sisyphus.filesystem.portageCacheDir, binary.rstrip().split("/")[0])): + shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.filesystem.portageCacheDir, binary.rstrip().split("/")[0]), os.path.basename(binary.rstrip().split("/")[1]))) else: - os.makedirs(os.path.join(sisyphus.filesystem.portageCacheDir, CATEGORY.decode().strip())) - shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.filesystem.portageCacheDir, CATEGORY.decode().strip()), os.path.basename(binary.rstrip().split("/")[1]))) + os.makedirs(os.path.join(sisyphus.filesystem.portageCacheDir, binary.rstrip().split("/")[0])) + shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.filesystem.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]) @@ -70,17 +64,11 @@ def start(pkgname): wget.download(isBinhost + binary) print("\n") - subprocess.call(['qtbz2', '-x'] + binary.rstrip().split("/")[1].split()) - CATEGORY = subprocess.check_output(['qxpak', '-x', '-O'] + binary.rstrip().split("/")[1].replace('tbz2', 'xpak').split() + ['CATEGORY']) - - if os.path.exists(binary.rstrip().split("/")[1].replace('tbz2', 'xpak')): - os.remove(binary.rstrip().split("/")[1].replace('tbz2', 'xpak')) - - if os.path.isdir(os.path.join(sisyphus.filesystem.portageCacheDir, CATEGORY.decode().strip())): - shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.filesystem.portageCacheDir, CATEGORY.decode().strip()), os.path.basename(binary.rstrip().split("/")[1]))) + if os.path.isdir(os.path.join(sisyphus.filesystem.portageCacheDir, binary.rstrip().split("/")[0])): + shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.filesystem.portageCacheDir, binary.rstrip().split("/")[0]), os.path.basename(binary.rstrip().split("/")[1]))) else: - os.makedirs(os.path.join(sisyphus.filesystem.portageCacheDir, CATEGORY.decode().strip())) - shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.filesystem.portageCacheDir, CATEGORY.decode().strip()), os.path.basename(binary.rstrip().split("/")[1]))) + os.makedirs(os.path.join(sisyphus.filesystem.portageCacheDir, binary.rstrip().split("/")[0])) + shutil.move(binary.rstrip().split("/")[1], os.path.join(os.path.join(sisyphus.filesystem.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]) |