From 7afbc62057b876fb6711ef58743f664a2509dde4 Mon Sep 17 00:00:00 2001 From: Gusted Date: Thu, 18 Jan 2024 18:50:03 +0100 Subject: [PATCH] [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 (cherry picked from commit 11da776befde7ec5d893d4f0579502b891bdd014) (cherry picked from commit 2824ae4cf25a174004ff78ffa176330782e85821) --- services/packages/alpine/repository.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/packages/alpine/repository.go b/services/packages/alpine/repository.go index 30b7a06eb3..01e97b980d 100644 --- a/services/packages/alpine/repository.go +++ b/services/packages/alpine/repository.go @@ -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") }