Skip to content

Ill-formed package index emitted #2059

@Dichloromethane

Description

@Dichloromethane

When the following container is build, running apk info results in

ERROR: This apk-tools is too old to handle installed packages
ERROR: Unable to read database: v2 database format error
ERROR: Failed to open apk database: v2 database format error
archs:
  - aarch64

contents:
  repositories:
    - https://dl-cdn.alpinelinux.org/alpine/edge/main
    - https://dl-cdn.alpinelinux.org/alpine/edge/community
  keyring:
    - https://alpinelinux.org/keys/alpine-devel@lists.alpinelinux.org-6165ee59.rsa.pub
  packages:
    - alpine-base
    - eudev
    - eudev-openrc

Commands to reproduce:

apko build minimal.yaml test:latest minimal.tar
docker load < minimal.tar
docker run --rm test:latest-arm64 apk info

An LLM told me the error is because the i: field in the database is ill-formed (it shouldn't have the []), which seems correct, as the apk documentation says that "i: - install if (corresponds to install_if in PKGINFO, concatenated by spaces into a single line)" and does not mention [].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions