Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requirements: bump craft-archives #4303

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

tigarmo
Copy link
Contributor

@tigarmo tigarmo commented Aug 2, 2023

Version 1.1.3 fixes the issue with package-repositories that declare
architectures. In addition to addressing the wrong parameter order, the
new version also improves the handling of architectures.

The summary of the change is: if the host system is amd64 and the arch
of the package repository is i386, or if the host is arm64 and the
repo armhf, then dpkg --add-architecture <repo_arch> will be called.
Otherwise, the command is not called. This lets us preserve the
behavior of enabling i386 in the official repositories when a repo
using i386 is added, with the improvement of not breaking apt update
when an "incompatible" architecture combination is declared.

The new spread tests reflect this. Both run in amd64 and add the
deadsnakes ppa to fetch Python in a foreign arch:

  • For i386, only the deadsnakes ppa is necessary, as the architecture
    will be added "globally" and Python's dependencies are found in the
    default archives;
  • For armhf, the ports.ubuntu.com repo is necessary in addition to the
    deadsnakes one. This lets the dependencies be found in the ports repo,
    and doesn't break the build (this combination is broken in Snapcraft
    7.2, 7.3 and 7.4).

Fixes #4289 and #4298

@codecov-commenter
Copy link

codecov-commenter commented Aug 2, 2023

Codecov Report

Merging #4303 (c1b83b6) into hotfix/7.5 (706872e) will not change coverage.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@             Coverage Diff             @@
##           hotfix/7.5    #4303   +/-   ##
===========================================
  Coverage       94.88%   94.88%           
===========================================
  Files             657      657           
  Lines           55116    55116           
===========================================
  Hits            52297    52297           
  Misses           2819     2819           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tigarmo tigarmo force-pushed the work/CRAFT-1926-source-architectures branch from 0c11ac4 to c1b83b6 Compare August 3, 2023 20:08
Copy link
Collaborator

@sergiusens sergiusens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nicely done!

Version 1.1.3 fixes the issue with package-repositories that declare
architectures. In addition to addressing the wrong parameter order, the
new version also improves the handling of architectures.

The summary of the change is: if the host system is amd64 and the arch
of the package repository is i386, _or_ if the host is arm64 and the
repo armhf, then `dpkg --add-architecture <repo_arch>` will be called.
Otherwise, the command is not called. This lets us preserve the
behavior of enabling i386 in the official repositories when a repo
using i386 is added, with the improvement of _not breaking_ apt update
when an "incompatible" architecture combination is declared.

The new spread tests reflect this. Both run in amd64 and add the
deadsnakes ppa to fetch Python in a foreign arch:

- For i386, only the deadsnakes ppa is necessary, as the architecture
will be added "globally" and Python's dependencies are found in the
default archives;
- For armhf, the ports.ubuntu.com repo is necessary in addition to the
deadsnakes one. This lets the dependencies be found in the ports repo,
_and_ doesn't break the build (this combination is broken in Snapcraft
7.2, 7.3 and 7.4).

Fixes #4289 and #4298
@tigarmo tigarmo force-pushed the work/CRAFT-1926-source-architectures branch from c1b83b6 to 8c5e143 Compare August 4, 2023 17:04
@tigarmo tigarmo changed the title dependencies: bump craft-archives requirements: bump craft-archives Aug 4, 2023
@tigarmo tigarmo marked this pull request as ready for review August 4, 2023 17:06
@kenvandine
Copy link
Contributor

I tested this for our gaming-graphics-core22 build that needs to enable i386 for a PPA, it fixed the issue for us!

@sergiusens sergiusens merged commit 1db0f39 into hotfix/7.5 Aug 4, 2023
11 of 12 checks passed
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.

4 participants