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

Depext: fix alpine tagged repositories handling #4758

Merged
merged 2 commits into from
Jul 22, 2021
Merged

Conversation

rjbou
Copy link
Collaborator

@rjbou rjbou commented Jul 21, 2021

Some examples of the new behavior

libx11-dev policy:
 1.7.1-r0:
   lib/apk/db/installed
   https://dl-cdn.alpinelinux.org/alpine/v3.13/main
 1.7.2-r0:
   @edge https://dl-cdn.alpinelinux.org/alpine/edge/main
  • libx11 as installed
  • libx11@edge as available
bubblewrap policy:
 0.4.1-r2:
   lib/apk/db/installed
   https://dl-cdn.alpinelinux.org/alpine/v3.13/main
   @edge https://dl-cdn.alpinelinux.org/alpine/v3.13/main
   https://dl-cdn.alpinelinux.org/alpine/edge/main
   @edge https://dl-cdn.alpinelinux.org/alpine/edge/main
  • bubblewrap and bubblewrap@edge as installed
capnproto policy:
  0.8.0-r1:
    @edgecommunity https://dl-cdn.alpinelinux.org/alpine/edge/community
  • capnproto-dev@edgecommunity as available

@kit-ty-kate
Copy link
Member

bubblewrap@edge as available

I don't think this should be the behaviour in this case. For example:

bash-5.1$ apk policy gmp-dev
gmp-dev policy:
  6.2.1-r0:
    https://dl-cdn.alpinelinux.org/alpine/v3.13/main
    @edge https://dl-cdn.alpinelinux.org/alpine/v3.13/main
    https://dl-cdn.alpinelinux.org/alpine/edge/main
    @edge https://dl-cdn.alpinelinux.org/alpine/edge/main
bash-5.1$ sudo apk add gmp-dev@edge
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
(1/2) Installing libgmpxx (6.2.1-r0)
(2/2) Installing gmp-dev (6.2.1-r0)
OK: 228 MiB in 80 packages
bash-5.1$ apk policy gmp-dev
gmp-dev policy:
  6.2.1-r0:
    lib/apk/db/installed
    https://dl-cdn.alpinelinux.org/alpine/v3.13/main
    @edge https://dl-cdn.alpinelinux.org/alpine/v3.13/main
    https://dl-cdn.alpinelinux.org/alpine/edge/main
    @edge https://dl-cdn.alpinelinux.org/alpine/edge/main

Both should be marked as installed if they have the same version number

@rjbou
Copy link
Collaborator Author

rjbou commented Jul 21, 2021

Oh, I made a mistake in the example. In the code the installed state is reverted only if there is another version field, not another repo line. I'll update the main comment

Copy link
Member

@kit-ty-kate kit-ty-kate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes to simplify and harden the codebase, but overall it looks ok.
I haven't tested it yet, I'll do that tomorrow.

src/state/opamSysInteract.ml Outdated Show resolved Hide resolved
src/state/opamSysInteract.ml Outdated Show resolved Hide resolved
src/state/opamSysInteract.ml Outdated Show resolved Hide resolved
src/state/opamSysInteract.ml Outdated Show resolved Hide resolved
src/state/opamSysInteract.ml Outdated Show resolved Hide resolved
@dra27 dra27 added this to the 2.1.0 milestone Jul 22, 2021
src/state/opamSysInteract.ml Outdated Show resolved Hide resolved
Copy link
Member

@kit-ty-kate kit-ty-kate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested successfully

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.

3 participants