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

retire storage versions 4 and 5 #1864

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading