Skip to content

Commit

Permalink
rewrite arch to match the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
iggy committed Jun 7, 2024
1 parent 67e5de2 commit 9067d4c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/openapi/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"context"
"crypto/x509"
"encoding/pem"
"fmt"
"io"
"mime/multipart"
"os"
Expand Down Expand Up @@ -275,7 +276,7 @@ func writeUploadedPkg(f *multipart.FileHeader, org, distro, version, repo, arch
func generateAPKIndex(org, distro, version, repo, arch string) {
log.Debug().Msg("generating APK index")
var apki repository.ApkIndex
apki.Description = "atlascloud main edge"
apki.Description = fmt.Sprintf("%s %s %s", org, repo, version)

ctx := context.Background()
configURI := url.JoinUNC(PackageBaseDirectory, "config", org, distro)
Expand All @@ -295,6 +296,8 @@ func generateAPKIndex(org, distro, version, repo, arch string) {
if err != nil {
log.Error().Err(err).Msg("generateAPKIndex: failed to parse package")
}
// we need to rewrite the arch because noarch packages don't install right
pkg.Arch = arch
apki.Packages = append(apki.Packages, pkg)
}
}
Expand Down

0 comments on commit 9067d4c

Please sign in to comment.