Skip to content

apt_dpkg: keep :arch qualifier for foreign-arch packages (LP: #1784116) - #649

Open
varranvar wants to merge 2 commits into
canonical:mainfrom
varranvar:fix-lp-1784116
Open

varranvar wants to merge 2 commits into
canonical:mainfrom
varranvar:fix-lp-1784116

Conversation

@varranvar

Copy link
Copy Markdown

The get_file_package() function unconditionally stripped the ":arch" qualifier from the matched dpkg .list filename. On multiarch systems, a file owned by a foreign-architecture package then resolved via the bare name to the native-arch package, which is often not installed, will cause a spurious package not installed error message (LP: #1784116).

This fix is to only strip the qualifier when it matches the system architecture and keep it for foreign architectures so the name resolves to the installed package.

@varranvar
varranvar force-pushed the fix-lp-1784116 branch 2 times, most recently from dae2366 to 96f172f Compare August 28, 2026 15:22
The get_file_package() function unconditionally stripped the ":arch" qualifier
from the matched dpkg .list filename. On multiarch systems, a file owned by a
foreign-architecture package then resolved via the bare name to the native-arch
package, which is often not installed, will cause a spurious package not
installed error message (LP: #1784116).

This fix is to only strip the qualifier when it matches the system architecture
and keep it for foreign architectures so the name resolves to the installed
package.
@varranvar
varranvar force-pushed the fix-lp-1784116 branch 2 times, most recently from dae2366 to c1945ef Compare August 28, 2026 15:34
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.49%. Comparing base (d7b9734) to head (489f38a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #649      +/-   ##
==========================================
+ Coverage   84.48%   84.49%   +0.01%     
==========================================
  Files         106      106              
  Lines       21038    21055      +17     
  Branches     3184     3192       +8     
==========================================
+ Hits        17773    17790      +17     
+ Misses       2795     2794       -1     
- Partials      470      471       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Cover keeping the ":arch" qualifier for foreign-architecture packages
and stripping it for native-architecture and unqualified packages
(LP: #1784116).

Signed-off-by: Varun Varma <varun.varma@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant