@@ -55,16 +55,18 @@ type VersionMetadata struct {
55
55
}
56
56
57
57
type FileMetadata struct {
58
- Checksum string `json:"checksum"`
59
- Packager string `json:"packager,omitempty"`
60
- BuildDate int64 `json:"build_date,omitempty"`
61
- Size int64 `json:"size,omitempty"`
62
- Architecture string `json:"architecture,omitempty"`
63
- Origin string `json:"origin,omitempty"`
64
- CommitHash string `json:"commit_hash,omitempty"`
65
- InstallIf string `json:"install_if,omitempty"`
66
- Provides []string `json:"provides,omitempty"`
67
- Dependencies []string `json:"dependencies,omitempty"`
58
+ Checksum string `json:"checksum"`
59
+ Packager string `json:"packager,omitempty"`
60
+ BuildDate int64 `json:"build_date,omitempty"`
61
+ Size int64 `json:"size,omitempty"`
62
+ Architecture string `json:"architecture,omitempty"`
63
+ Origin string `json:"origin,omitempty"`
64
+ CommitHash string `json:"commit_hash,omitempty"`
65
+ InstallIf string `json:"install_if,omitempty"`
66
+ Provides []string `json:"provides,omitempty"`
67
+ Dependencies []string `json:"dependencies,omitempty"`
68
+ ProviderPriority int64 `json:"provider_priority,omitempty"`
69
+ ReplacesPriority int64 `json:"replaces_priority,omitempty"`
68
70
}
69
71
70
72
// ParsePackage parses the Alpine package file
@@ -188,6 +190,16 @@ func ParsePackageInfo(r io.Reader) (*Package, error) {
188
190
if value != "" {
189
191
p .FileMetadata .Dependencies = append (p .FileMetadata .Dependencies , value )
190
192
}
193
+ case "provider_priority" :
194
+ n , err := strconv .ParseInt (value , 10 , 64 )
195
+ if err == nil {
196
+ p .FileMetadata .ProviderPriority = n
197
+ }
198
+ case "replaces_priority" :
199
+ n , err := strconv .ParseInt (value , 10 , 64 )
200
+ if err == nil {
201
+ p .FileMetadata .ReplacesPriority = n
202
+ }
191
203
}
192
204
}
193
205
if err := scanner .Err (); err != nil {
0 commit comments