Skip to content

Depexts detection does not work on Alpine when requesting pkg@tagged-repo #4670

Description

@kit-ty-kate

Detected in ocaml/opam-repository#18704

Packages of the form pkg@tagged-repo are not taken into account.
apk list --available does not say anything about the tagged-repo (though it makes pkg available even if it's not without the tag)

I would suggest to change the command that gets the list of available packages to apk policy "*" which has the following output:

[...]
pkgconf policy:
  1.7.3-r0:
    lib/apk/db/installed
    https://dl-cdn.alpinelinux.org/alpine/v3.13/main
  1.7.4-r0:
    @edge https://dl-cdn.alpinelinux.org/alpine/edge/main
capnproto policy:
  0.8.0-r1:
    @edgecommunity https://dl-cdn.alpinelinux.org/alpine/edge/community
[...]

if lib/apk/db/installed is present, the package is installed and packages available through tagged repository are shown with the repository in question.

Here is a draft of the required regexp:

Re.(compile @@ seq                                                                 
      [ bol;                                                                       
        group (rep1 @@ alt [alnum]); space; str "policy:"; eol;                    
        rep1 @@ seq [                                                              
          str "  "; rep1 @@ alt [alnum; punct]; eol;                               
          str "    "; opt (seq [group (seq [char '@'; alnum]); space]); notnl; eol;
        ];                                                                         
      ])                                                                           

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions