if d == "cache":
exclude = flatten(
("--ro-bind", tmp, workdir(p))
- for p in config.distribution.package_manager(config).cache_subdirs(src)
+ for p in config.distribution.package_manager(config).package_subdirs(src)
)
else:
exclude = flatten(
)
src = last.package_cache_dir_or_default() / "cache" / subdir
- for p in last.distribution.package_manager(last).cache_subdirs(src):
+ for p in last.distribution.package_manager(last).package_subdirs(src):
p.mkdir(parents=True, exist_ok=True)
# If we're in incremental mode and caching metadata is not explicitly disabled, cache the keyring and the
return Path("custom")
@classmethod
- def cache_subdirs(cls, cache: Path) -> list[Path]:
+ def package_subdirs(cls, cache: Path) -> list[Path]:
return []
@classmethod
# configured package cache directory in this scenario, we mount in the relevant directories from
# the configured package cache directory.
if d == "cache" and context.metadata_dir != context.config.package_cache_dir_or_default():
- caches = context.config.distribution.package_manager(context.config).cache_subdirs(src)
+ caches = context.config.distribution.package_manager(context.config).package_subdirs(src)
mounts += flatten(
(
"--bind",
return Path("apt")
@classmethod
- def cache_subdirs(cls, cache: Path) -> list[Path]:
+ def package_subdirs(cls, cache: Path) -> list[Path]:
return [cache / "archives"]
@classmethod
return Path("libdnf5" if cls.executable(config) == "dnf5" else "dnf")
@classmethod
- def cache_subdirs(cls, cache: Path) -> list[Path]:
+ def package_subdirs(cls, cache: Path) -> list[Path]:
return [
p / "packages" for p in cache.iterdir() if p.is_dir() and "-" in p.name and "mkosi" not in p.name
]
return Path("pacman")
@classmethod
- def cache_subdirs(cls, cache: Path) -> list[Path]:
+ def package_subdirs(cls, cache: Path) -> list[Path]:
return [cache / "pkg"]
@classmethod
return Path("zypp")
@classmethod
- def cache_subdirs(cls, cache: Path) -> list[Path]:
+ def package_subdirs(cls, cache: Path) -> list[Path]:
return [cache / "packages"]
@classmethod