summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-05-11 11:22:04 +0200
committerWojtek Kosior <koszko@koszko.org>2022-05-11 11:22:04 +0200
commit9e2cd3a25b6ff5addd7109414fdf5a535b9cbce3 (patch)
tree873324b1d7f6abc2f06d9a4c362f1fa89f501383
parent98687e9148bac0a18bf6a62e672275af9a920d9c (diff)
downloadhydrilla-builder-9e2cd3a25b6ff5addd7109414fdf5a535b9cbce3.tar.gz
hydrilla-builder-9e2cd3a25b6ff5addd7109414fdf5a535b9cbce3.zip
always use APT packages for amd64 architecture
-rw-r--r--src/hydrilla/builder/local_apt.py5
-rw-r--r--tests/test_local_apt.py1
2 files changed, 4 insertions, 2 deletions
diff --git a/src/hydrilla/builder/local_apt.py b/src/hydrilla/builder/local_apt.py
index eee028d..1bdc347 100644
--- a/src/hydrilla/builder/local_apt.py
+++ b/src/hydrilla/builder/local_apt.py
@@ -167,6 +167,7 @@ def apt_conf(directory: Path) -> str:
spaces.
"""
return f'''
+Architecture "amd64";
Dir "{directory}";
Dir::State "{directory}/var/lib/apt";
Dir::State::status "{directory}/var/lib/dpkg/status";
@@ -290,9 +291,9 @@ def download_apt_packages(list: SourcesList, keys: [str], packages: [str],
Set up a local APT, update it using the specified sources.list configuration
and use it to download the specified packages.
- This function downloads a .deb file of the packages matching the current
+ This function downloads .deb files of packages matching the amd64
architecture (which includes packages with architecture 'all') as well as
- all theis corresponding source package files and (if requested) the debs
+ all their corresponding source package files and (if requested) the debs
and source files of all their declared dependencies.
Return value is a list of names of all downloaded files.
diff --git a/tests/test_local_apt.py b/tests/test_local_apt.py
index 6ba2a06..edd47fa 100644
--- a/tests/test_local_apt.py
+++ b/tests/test_local_apt.py
@@ -253,6 +253,7 @@ def test_local_apt_contextmanager(mock_cache_dir):
assert not apt_root.exists()
expected_conf = {
+ 'Architecture': 'amd64',
'Dir': str(apt_root),
'Dir::State': f'{apt_root}/var/lib/apt',
'Dir::State::status': f'{apt_root}/var/lib/dpkg/status',