summaryrefslogtreecommitdiff
path: root/src/backend/ebuildupgrade.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/ebuildupgrade.py')
-rw-r--r--src/backend/ebuildupgrade.py28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/backend/ebuildupgrade.py b/src/backend/ebuildupgrade.py
index 8d7f501..2d4bc45 100644
--- a/src/backend/ebuildupgrade.py
+++ b/src/backend/ebuildupgrade.py
@@ -31,17 +31,11 @@ def start():
wget.download(binhostURL + 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():
wget.download(binhostURL + 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])