-
Notifications
You must be signed in to change notification settings - Fork 1.7k
apk: fix packages return value for apk-tools >= 3 (fix #11264) #11265
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
base: main
Are you sure you want to change the base?
apk: fix packages return value for apk-tools >= 3 (fix #11264) #11265
Conversation
c59a238 to
8fdc932
Compare
8fdc932 to
d834ee4
Compare
felixfontein
left a comment
There was a problem hiding this 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+)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be
| 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 |
There was a problem hiding this comment.
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?
SUMMARY
Trivial compatibility fix with
apk-tools>= 3 (part of Alpine 3.23). Compatibility with older versions ofapk-toolsis kept.Issue is that apk now space-pads the number of the package being processed.
Fixes #11264
ISSUE TYPE
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.