Fix tree rendering and authored collision, add FPS display and packaging safeguards
This commit is contained in:
+14
-3
@@ -78,6 +78,9 @@ class Stage:
|
||||
|
||||
def add(self, rel, source):
|
||||
key = str(rel).lower()
|
||||
# Saved accounts are user data, never part of a development asset install.
|
||||
if key == "lib/wa_ac.py":
|
||||
return
|
||||
old = self.files.pop(key, None)
|
||||
if old is not None:
|
||||
old.unlink()
|
||||
@@ -91,13 +94,21 @@ class Stage:
|
||||
|
||||
def walk(top, pack_maker, missing):
|
||||
"""Yields (relative path, real file) under top, following and remapping symlinks."""
|
||||
stack = [(Path(top), Path())]
|
||||
stack = [(Path(top), Path(), frozenset())]
|
||||
while stack:
|
||||
directory, rel = stack.pop()
|
||||
directory, rel, ancestors = stack.pop()
|
||||
identity = directory.resolve()
|
||||
if identity in ancestors:
|
||||
continue
|
||||
ancestors = ancestors | {identity}
|
||||
for entry in sorted(os.scandir(directory), key=lambda e: e.name):
|
||||
path, child = Path(entry.path), rel / entry.name
|
||||
if entry.name == ".DS_Store":
|
||||
continue
|
||||
# This local convenience link points to the entire decoded pack tree;
|
||||
# its runtime files are already supplied by the flattened rundir.
|
||||
if Path(top) == ROOT / "upstream/python-root" and child == Path("pack_maker"):
|
||||
continue
|
||||
if entry.is_symlink() and not path.exists():
|
||||
link = os.readlink(path)
|
||||
mark = link.find(PACK_MAKER_MARK)
|
||||
@@ -108,7 +119,7 @@ def walk(top, pack_maker, missing):
|
||||
continue
|
||||
path = remapped
|
||||
if path.is_dir():
|
||||
stack.append((path, child))
|
||||
stack.append((path, child, ancestors))
|
||||
elif path.is_file():
|
||||
yield child, path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user