Skip to content
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

fix: allow package pin contains - & _ chars #239

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dungdm93
Copy link

contents:
  keyring:
    - https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
  repositories:
    - "@foo-bar https://packages.wolfi.dev/os"
  packages:
    - wolfi-baselayout@foo-bar
    - ca-certificates-bundle@foo-bar
    - tzdata@foo-bar
    - busybox@foo-bar

work-dir: /home/nonroot

accounts:
  run-as: nonroot
  groups:
    - groupname: nonroot
      gid: 65532
  users:
    - username: nonroot
      uid: 65532
      gid: 65532

cmd: "/bin/sh"

archs:
  - amd64

When building this image, I got following error:

❯ apko build apko.yaml foobar:123 foobar.tar.gz
...
2024/04/11 12:28:56 [DEBUG] HEAD https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz
2024/04/11 12:28:56 [DEBUG] GET https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz
Error: failed to build layer image for "amd64": installing apk packages: error getting package dependencies: could not find package, alias or a package that provides busybox@foo-bar in indexes
2024/04/11 12:29:01 error during command execution: failed to build layer image for "amd64": installing apk packages: error getting package dependencies: could not find package, alias or a package that provides busybox@foo-bar in indexes

As u can see, repository index is retrieved successfully, however, apko could not resolve packages because repository tag contains - character.

Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant