[GITEA] Generate install if condition for Alpine

- If the APKINFO contains an install if condition, write it in the APKINDEX.
- No integration testing, as I don't have the files to regenerate the
hardcoded compressed(?) APKINFO in the test.
- Resolves #2174
This commit is contained in:
Gusted 2024-01-18 18:50:03 +01:00
parent 9fe826605f
commit 11da776bef
No known key found for this signature in database
GPG key ID: FD821B732837125F

View file

@ -230,6 +230,9 @@ func buildPackagesIndex(ctx context.Context, ownerID int64, repoVersion *package
if len(pd.FileMetadata.Provides) > 0 {
fmt.Fprintf(&buf, "p:%s\n", strings.Join(pd.FileMetadata.Provides, " "))
}
if pd.FileMetadata.InstallIf != "" {
fmt.Fprintf(&buf, "i:%s\n", pd.FileMetadata.InstallIf)
}
fmt.Fprint(&buf, "\n")
}