Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
PR #1864: retire storage versions 4 and 5
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaudill authored Mar 20, 2024
1 parent d679373 commit 5ceefa7
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions lib/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ def init(self):
if (v_found == STORAGE_VERSION):
ch.VERBOSE("found storage dir v%d: %s" % (STORAGE_VERSION, self.root))
self.lock()
elif (v_found in {None, 4, 5, 6}): # initialize/upgrade
elif (v_found in {None, 6}): # initialize/upgrade
ch.INFO("%s storage directory: v%d %s"
% (op, STORAGE_VERSION, self.root))
self.root.mkdir()
Expand All @@ -1189,23 +1189,6 @@ def init(self):
self.unpack_base.mkdir()
self.upload_cache.mkdir()
if (v_found is not None): # upgrade
if (v_found < 6):
# Git metadata moved from /.git to /ch/.git, and /.gitignore
# went out-of-band (to info/exclude in the repository).
for img in self.unpack_base.iterdir():
old = img // ".git"
new = img // "ch/git"
if (old.exists()):
new.parent.mkdir()
old.rename(new)
gi = img // ".gitignore"
if (gi.exists()):
gi.unlink()
# Must also remove .gitignore from all commits. This requires
# Git operations, which we can’t do here because the build
# cache may be disabled. Do it in Enabled_Cache.configure().
if (len(self.build_cache.listdir()) > 0):
self.bucache_needs_ignore_upgrade.file_ensure_exists()
if (v_found == 6):
# Charliecloud 0.32 had a bug where symlinks to fat manifests
# that were really skinny were erroneously absolute, making the
Expand Down

0 comments on commit 5ceefa7

Please sign in to comment.