summaryrefslogtreecommitdiff
path: root/src/backend/download.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-12 22:27:04 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-12 22:27:04 +0000
commitdef1fa5301790963e7e7ae214a2df1c692f97005 (patch)
tree47be1c85884facf0bbed4d22a8a9e2fee904eb71 /src/backend/download.py
parente07a1e4959c34d70631b693f76af8163702c306a (diff)
bugfix : https://bugs.redcorelinux.org/show_bug.cgi?id=132 && add manual cache cleaning optionv5.2301.0
Diffstat (limited to 'src/backend/download.py')
-rw-r--r--src/backend/download.py57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/backend/download.py b/src/backend/download.py
deleted file mode 100644
index cd250f0..0000000
--- a/src/backend/download.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/python3
-
-import os
-import pickle
-import shutil
-import wget
-import sisyphus.getcolor
-import sisyphus.getenv
-import sisyphus.getfs
-
-
-def pkg(pkgname):
- binhostURL = sisyphus.getenv.binhostURL()
- areBinaries, areSources, needsConfig = pickle.load(open(os.path.join(
- sisyphus.getfs.portageMetadataDir, "sisyphus_pkgdeps.pickle"), "rb"))
-
- for index, binary in enumerate([package + '.tbz2' for package in areBinaries], start=1):
- print(">>> Downloading binary" + "(" + sisyphus.getcolor.bright_yellow + "{}".format(index) + sisyphus.getcolor.reset + " " + "of" + " " + sisyphus.getcolor.bright_yellow +
- str(len(areBinaries)) + sisyphus.getcolor.reset + ")" + " " + sisyphus.getcolor.magenta + binary.replace('.tbz2', ' ') + sisyphus.getcolor.reset)
- wget.download(binhostURL + binary)
- print("")
-
- 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])
-
-
-def world():
- binhostURL = sisyphus.getenv.binhostURL()
- areBinaries, areSources, needsConfig = pickle.load(open(os.path.join(
- sisyphus.getfs.portageMetadataDir, "sisyphus_worlddeps.pickle"), "rb"))
-
- for index, binary in enumerate([package + '.tbz2' for package in areBinaries], start=1):
- print(">>> Downloading binary" + "(" + sisyphus.getcolor.bright_yellow + "{}".format(index) + sisyphus.getcolor.reset + " " + "of" + " " + sisyphus.getcolor.bright_yellow +
- str(len(areBinaries)) + sisyphus.getcolor.reset + ")" + " " + sisyphus.getcolor.magenta + binary.replace('.tbz2', ' ') + sisyphus.getcolor.reset)
- wget.download(binhostURL + binary)
- print("")
-
- 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])