-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Propagate install_if and provider_priority to APKINDEX #28899
Conversation
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.
Thank you for the PR. This requires a migration because now the stored metadata is incompatible with the new struct.
Looks like PTAL |
modules/packages/alpine/metadata.go
Outdated
case "replaces_priority": | ||
n, err := strconv.ParseInt(value, 10, 64) | ||
if err == nil { | ||
p.FileMetadata.ReplacesPriority = n |
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.
Did I miss something, or is the ReplacesPriority
currently unused?
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.
Yes, it is unused indeed. It is a part of Alpine package metadata, so it makes sense to parse and store it alongside all the other package metadata, but there isn't anything else being done with it currently. Specifically, it looks like there's no field for replaces_priority
in the APKINDEX file, so ReplacesPriority
is not used when generating APKINDEX.
I guess ReplacesPriority
could show up in some HTTP API request if there is one that returns package file metadata, or if one is added in the future.
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.
In that case, I recommend adding a comment to the field stating exactly that.
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.
I removed the field as it's not used in the index spec at the moment. We can add it if it is used in future.
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.
The migration is not needed, the field is just 0.
* giteaofficial/main: Hide code links on release page if user cannot read code (go-gitea#29064) [skip ci] Updated translations via Crowdin Don't do a full page load when clicking `Watch` or `Star` (go-gitea#29001) Remove useless template file (go-gitea#29053) Fix typos in the documentation (go-gitea#29048) Move some repository transfer functions to service layer (go-gitea#28855) Propagate install_if and provider_priority to APKINDEX (go-gitea#28899)
Resolves go-gitea#28704 Example of an entry in the generated `APKINDEX` file: ``` C:Q1xCO3H9LTTEbhKt9G1alSC87I56c= P:hello V:2.12-r1 A:x86_64 T:The GNU Hello program produces a familiar, friendly greeting U:https://www.gnu.org/software/hello/ L:GPL-3.0-or-later S:15403 I:36864 o:hello m: t:1705934118 D:so:libc.musl-x86_64.so.1 p:cmd:hello=2.12-r1 i:foobar=1.0 !baz k:42 ``` the `i:` and `k:` entries are new. --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Resolves #28704
Example of an entry in the generated
APKINDEX
file:the
i:
andk:
entries are new.