diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-11-04 01:04:41 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-11-04 01:04:41 +0000 |
commit | 2e9af066c27ff6ef1b3308a0fab887e8a35ff135 (patch) | |
tree | 4a7a62e0dd2a9a4d46ec7d05c928873f38ed38e2 /src/backend/solvedeps.py | |
parent | 1dc3bbe378ae39b10765c9e0f2a0ef995b4a287c (diff) |
backend : use pickle to store dependency lists across modules, split out download as separate module (remove lots of duplicated code)
Diffstat (limited to 'src/backend/solvedeps.py')
-rw-r--r-- | src/backend/solvedeps.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/backend/solvedeps.py b/src/backend/solvedeps.py index 833f8e2..35454c2 100644 --- a/src/backend/solvedeps.py +++ b/src/backend/solvedeps.py @@ -1,11 +1,14 @@ #!/usr/bin/python3 import animation +import os +import pickle import subprocess +import sisyphus.getfs @animation.wait('resolving dependencies') -def package(pkgname): +def pkg(pkgname): areBinaries = [] areSources = [] needsConfig = int() @@ -34,7 +37,7 @@ def package(pkgname): isSource = portageOutput.split("]")[1].split("[")[0].strip(" ") areSources.append(isSource) - return areBinaries,areSources,needsConfig + pickle.dump([areBinaries,areSources,needsConfig], open(os.path.join(sisyphus.getfs.portageMetadataDir, "sisyphus_solvedeps_pkg.pickle"), "wb")) @animation.wait('resolving dependencies') @@ -67,4 +70,4 @@ def world(): isSource = portageOutput.split("]")[1].split("[")[0].strip(" ") areSources.append(isSource) - return areBinaries,areSources,needsConfig + pickle.dump([areBinaries,areSources,needsConfig], open(os.path.join(sisyphus.getfs.portageMetadataDir, "sisyphus_solvedeps_world.pickle"), "wb")) |