diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-09-06 11:38:35 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-09-06 11:38:35 +0100 |
commit | 12c2d64d475552f7ccfb078613a8fbfcea1efaba (patch) | |
tree | a9711cf583ed9751d7d22a87b2deb93524142099 /src/backend | |
parent | 24f454442623df2060479a01b50e3eda55bfa341 (diff) |
Bugfix && feature :
* since our sync method is different than portage, sisyphus may fail to resolve dependencies properly in certain cases
* copy portage's behaviour, perform global updates (SLOT moves, blockers etc) and refresh the metadata after every sync
* while this will slow down the sync a little, it will accelerate dependency solving considerably
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/libsisyphus.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py index a188fb4..8af5bf7 100644 --- a/src/backend/libsisyphus.py +++ b/src/backend/libsisyphus.py @@ -15,6 +15,7 @@ gentooEbuildDir = '/usr/ports/gentoo' redcoreEbuildDir = '/usr/ports/redcore' portageConfigDir = '/opt/redcore-build' portageCacheDir = '/var/cache/packages' +portageMetadataDir = '/var/cache/edb' remotePkgsDB = '/var/lib/sisyphus/csv/remotePackagesPre.csv' remoteDscsDB = '/var/lib/sisyphus/csv/remoteDescriptionsPre.csv' localPkgsDB = '/var/lib/sisyphus/csv/localPackagesPre.csv' @@ -212,6 +213,20 @@ def syncPortageCfg(): subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'next', '--quiet']) subprocess.call(['git', 'reset', '--hard', 'origin/next', '--quiet']) +def syncPortageMtd(): + if os.path.isdir(portageMetadataDir): + for files in os.listdir(portageMetadataDir): + if os.path.isfile(os.path.join(portageMetadataDir, files)): + os.remove(os.path.join(portageMetadataDir, files)) + else: + shutil.rmtree(os.path.join(portageMetadataDir, files)) + + portageExecStage1 = subprocess.Popen(['emerge', '--quiet', '--regen'], stdout=subprocess.PIPE) + portageExecStage2 = subprocess.Popen(['emerge', '--quiet', '--metadata'], stdout=subprocess.PIPE) + + portageExecStage1.wait() + portageExecStage2.wait() + def cleanCacheDir(): if os.path.isdir(portageCacheDir): for files in os.listdir(portageCacheDir): @@ -227,6 +242,7 @@ def startUpdate(): syncPortageTree() syncOverlayTree() syncPortageCfg() + syncPortageMtd() syncRemoteDatabase() @animation.wait('syncing spm changes') |