Skip to content

Conversation

@s-hamann
Copy link
Contributor

@s-hamann s-hamann commented Dec 8, 2025

SUMMARY

Trivial compatibility fix with apk-tools >= 3 (part of Alpine 3.23). Compatibility with older versions of apk-tools is kept.
Issue is that apk now space-pads the number of the package being processed.

Fixes #11264

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

apk

ADDITIONAL INFORMATION

I simply hijacked an existing test case to cover installation of 10 packages instead of only three. Let me know if this should be a separated test and/or if repeated installation/removal should also be covered.

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug integration tests/integration module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR plugins plugin (any type) tests tests labels Dec 8, 2025
@s-hamann s-hamann force-pushed the fix-apk-parse_for_pacakges branch from c59a238 to 8fdc932 Compare December 8, 2025 10:02
@s-hamann s-hamann force-pushed the fix-apk-parse_for_pacakges branch from 8fdc932 to d834ee4 Compare December 8, 2025 10:05
@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Dec 8, 2025
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-11 Automatically create a backport for the stable-10 branch backport-12 Automatically create a backport for the stable-12 branch labels Dec 8, 2025
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

packages = []
data = stdout.split("\n")
regex = re.compile(r"^\(\d+/\d+\)\s+\S+\s+(\S+)")
regex = re.compile(r"^\(\s*\d+/\d+\)\s+\S+\s+(\S+)")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be

Suggested change
regex = re.compile(r"^\(\s*\d+/\d+\)\s+\S+\s+(\S+)")
regex = re.compile(r"^\s*\(\d+/\d+\)\s+\S+\s+(\S+)")

so that leading space is removed, and not returned?

- zsh
- zsh-calendar
- zsh-completions
- zsh-doc
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you shorten this list of packages a bit, to reduce load on our and Alpine's infrastructure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-11 Automatically create a backport for the stable-10 branch backport-12 Automatically create a backport for the stable-12 branch bug This issue/PR relates to a bug check-before-release PR will be looked at again shortly before release and merged if possible. integration tests/integration module module plugins plugin (any type) tests tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

apk: Incorrect return value for packages on Alpine 3.23

3 participants