diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-08-17 14:08:01 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-08-17 14:08:01 -0400 |
commit | cb5e44fdcfe1d7f55cbaa7f6355e082c5457c015 (patch) | |
tree | 112bfe62005d1874b3f347a5d0fecb5cb0f39aa3 | |
parent | 33b004bcb11c1d2cd8229ad5af24af722fa147fb (diff) | |
download | grokmirror-cb5e44fdcfe1d7f55cbaa7f6355e082c5457c015.tar.gz |
Fix logic for islandcore setting
Repos with islandcores were being fully repacked every time due to a bug
in logic.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-x | grokmirror/fsck.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/grokmirror/fsck.py b/grokmirror/fsck.py index d80703a..cf6f062 100755 --- a/grokmirror/fsck.py +++ b/grokmirror/fsck.py @@ -832,6 +832,7 @@ def fsck_mirror(config, force=False, repack_only=False, conn_only=False, refrepo = None set_baseline = False set_islandcore = False + new_islandcore = False for virtref, childpath in my_remotes: # Is it still relevant? if childpath not in amap[obstrepo]: @@ -895,6 +896,7 @@ def fsck_mirror(config, force=False, repack_only=False, conn_only=False, # is it already set to that? entries = grokmirror.get_config_from_git(obstrepo, r'pack\.island*') if entries.get('islandcore') != virtref: + new_islandcore = True logger.info(' reconfig: %s (islandCore to %s)', os.path.basename(obstrepo), virtref) grokmirror.set_git_config(obstrepo, 'pack.islandCore', virtref) @@ -907,7 +909,7 @@ def fsck_mirror(config, force=False, repack_only=False, conn_only=False, manifest[gitdir]['forkgroup'] = os.path.basename(obstrepo[:-4]) - if obstrepo not in status or set_islandcore: + if obstrepo not in status or new_islandcore: # We don't use obstrepo fingerprints, so we set it to None status[obstrepo] = { 'lastcheck': 'never', |