Skip to content

Commit 58db3af

Browse files
committed
don't collect storepaths from volumeattributes
1 parent fd6de18 commit 58db3af

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

python/nix_csi/store.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ def extract_store_paths(value: Any) -> Iterator[Path]:
1212
for m in STORE_PATH_RE.finditer(value):
1313
yield Path(m.group())
1414
case Mapping():
15-
for v in value.values():
16-
yield from extract_store_paths(v)
15+
for k, v in value.items():
16+
# volumeAttributes might contain multiarch paths which we don't want to include.
17+
# storePaths in volumeAttributes are handled as "primary package".
18+
if k != "volumeAttributes":
19+
yield from extract_store_paths(v)
1720
case Sequence():
1821
for item in value:
1922
yield from extract_store_paths(item)

0 commit comments

Comments
 (0)