summaryrefslogtreecommitdiff
path: root/src/hydrilla/builder
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/builder')
-rw-r--r--src/hydrilla/builder/local_apt.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/hydrilla/builder/local_apt.py b/src/hydrilla/builder/local_apt.py
index 1bdc347..3bec08b 100644
--- a/src/hydrilla/builder/local_apt.py
+++ b/src/hydrilla/builder/local_apt.py
@@ -286,7 +286,7 @@ def local_apt(list: SourcesList, keys: [str]) -> Iterable[Apt]:
yield setup_local_apt(td, list, keys)
def download_apt_packages(list: SourcesList, keys: [str], packages: [str],
- destination_dir: Path, with_deps=False) -> [str]:
+ destination_dir: Path, with_deps: bool) -> [str]:
"""
Set up a local APT, update it using the specified sources.list configuration
and use it to download the specified packages.
@@ -380,7 +380,11 @@ def piggybacked_system(piggyback_def: dict, foreign_packages: Optional[Path]) \
if foreign_packages is None:
archives = td / 'archives'
archives.mkdir()
+ else:
+ archives = foreign_packages / 'apt'
+ archives.mkdir(exist_ok=True)
+ if [*archives.glob('*.deb')] == []:
sources_list = SourcesList(piggyback_def.get('sources_list', []),
piggyback_def.get('distribution'))
packages = piggyback_def['packages']
@@ -397,8 +401,6 @@ def piggybacked_system(piggyback_def: dict, foreign_packages: Optional[Path]) \
destination_dir=archives,
with_deps=with_deps
)
- else:
- archives = foreign_packages / 'apt'
for deb in archives.glob('*.deb'):
command = ['dpkg-deb', '-x', str(deb), str(root)]