Closed tigarmo closed 11 months ago
Merging #96 (127f1bd) into main (f6cddd4) will increase coverage by
0.07%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #96 +/- ##
==========================================
+ Coverage 90.10% 90.17% +0.07%
==========================================
Files 13 13
Lines 687 692 +5
Branches 140 141 +1
==========================================
+ Hits 619 624 +5
Misses 50 50
Partials 18 18
Files Changed | Coverage Δ | |
---|---|---|
craft_archives/repo/apt_sources_manager.py | 94.23% <100.00%> (+0.29%) |
:arrow_up: |
This commit both fixes the order of the parameters in the call to "dpkg --add-architecture" (the parser is picky) and updates the logic to only make said call if the target architecture (that is, the one coming from the package-repository definition) is "compatible" with the host architecture (that is, the architecture of the system running the code).
This is necessary because incompatible mixes typically break the system. For example, adding "armhf" on an "amd64" system breaks subsequent calls to "apt update" because apt will try to fetch package listings for the "armhf" architecture on the default Ubuntu archives, which don't have them.
Therefore, only the following pairs result in adding the target arch:
host amd64, target i386;
host arm64, target armhf.
[ ] Have you followed the guidelines for contributing?
[ ] Have you signed the CLA?
[ ] Have you successfully run
tox
?