-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Propagate install_if and provider_priority to APKINDEX #28899
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,16 +55,18 @@ type VersionMetadata struct { | |
| } | ||
|
|
||
| type FileMetadata struct { | ||
| Checksum string `json:"checksum"` | ||
| Packager string `json:"packager,omitempty"` | ||
| BuildDate int64 `json:"build_date,omitempty"` | ||
| Size int64 `json:"size,omitempty"` | ||
| Architecture string `json:"architecture,omitempty"` | ||
| Origin string `json:"origin,omitempty"` | ||
| CommitHash string `json:"commit_hash,omitempty"` | ||
| InstallIf string `json:"install_if,omitempty"` | ||
| Provides []string `json:"provides,omitempty"` | ||
| Dependencies []string `json:"dependencies,omitempty"` | ||
| Checksum string `json:"checksum"` | ||
| Packager string `json:"packager,omitempty"` | ||
| BuildDate int64 `json:"build_date,omitempty"` | ||
| Size int64 `json:"size,omitempty"` | ||
| Architecture string `json:"architecture,omitempty"` | ||
| Origin string `json:"origin,omitempty"` | ||
| CommitHash string `json:"commit_hash,omitempty"` | ||
| InstallIf string `json:"install_if,omitempty"` | ||
| Provides []string `json:"provides,omitempty"` | ||
| Dependencies []string `json:"dependencies,omitempty"` | ||
| ProviderPriority int64 `json:"provider_priority,omitempty"` | ||
| ReplacesPriority int64 `json:"replaces_priority,omitempty"` | ||
| } | ||
|
|
||
| // ParsePackage parses the Alpine package file | ||
|
|
@@ -188,6 +190,16 @@ func ParsePackageInfo(r io.Reader) (*Package, error) { | |
| if value != "" { | ||
| p.FileMetadata.Dependencies = append(p.FileMetadata.Dependencies, value) | ||
| } | ||
| case "provider_priority": | ||
| n, err := strconv.ParseInt(value, 10, 64) | ||
| if err == nil { | ||
| p.FileMetadata.ProviderPriority = n | ||
| } | ||
| case "replaces_priority": | ||
| n, err := strconv.ParseInt(value, 10, 64) | ||
| if err == nil { | ||
| p.FileMetadata.ReplacesPriority = n | ||
|
||
| } | ||
KN4CK3R marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
| if err := scanner.Err(); err != nil { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.