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

multi-repo: pkg install package-name and pkg install origin/package-name come to different conclusions #2260

Open
igalic opened this issue Mar 21, 2024 · 4 comments

Comments

@igalic
Copy link

igalic commented Mar 21, 2024

in a multi-repo setup, running pkg install py39-cloud-init-devel yields a different result from pkg install net/cloud-init-devel:

root@freebsd:~ # pkg install net/cloud-init-devel
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating cloud-init repository catalogue...
cloud-init repository is up to date.
All repositories are up to date.
The following 26 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        py39-Babel: 2.14.0 [FreeBSD]
        py39-Jinja2: 3.1.3 [FreeBSD]
        py39-attrs: 23.2.0 [FreeBSD]
        py39-blinker: 1.7.0 [FreeBSD]
        py39-boto: 2.49.0_1 [FreeBSD]
        py39-certifi: 2024.2.2 [FreeBSD]
        py39-cffi: 1.16.0 [FreeBSD]
        py39-charset-normalizer: 3.3.2 [FreeBSD]
        py39-cloud-init-devel: 23.4.68 [FreeBSD]
        py39-configobj: 5.0.8 [FreeBSD]
        py39-cryptography: 41.0.7_3,1 [FreeBSD]
        py39-idna: 3.6 [FreeBSD]
        py39-jsonpatch: 1.21_1 [FreeBSD]
        py39-jsonpointer: 2.0 [FreeBSD]
        py39-jsonschema: 4.21.1 [FreeBSD]
        py39-jsonschema-specifications: 2023.6.1 [FreeBSD]
        py39-markupsafe: 2.1.5 [FreeBSD]
        py39-netifaces: 0.11.0 [FreeBSD]
        py39-oauthlib: 3.2.2 [FreeBSD]
        py39-pycparser: 2.21 [FreeBSD]
        py39-pyjwt: 2.8.0 [FreeBSD]
        py39-pyserial: 3.5_2 [FreeBSD]
        py39-referencing: 0.33.0 [FreeBSD]
        py39-requests: 2.31.0 [FreeBSD]
        py39-rpds-py: 0.13.2_3 [FreeBSD]
        sudo: 1.9.15p5_4 [FreeBSD]

Number of packages to be installed: 26

The process will require 73 MiB more space.
14 MiB to be downloaded.

Proceed with this action? [y/N]: 

vs

root@freebsd:~ # pkg install py39-cloud-init-devel
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating cloud-init repository catalogue...
cloud-init repository is up to date.
All repositories are up to date.
The following 26 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        py39-Babel: 2.14.0 [cloud-init]
        py39-Jinja2: 3.1.3 [cloud-init]
        py39-attrs: 23.2.0 [cloud-init]
        py39-blinker: 1.7.0 [cloud-init]
        py39-boto: 2.49.0_1 [cloud-init]
        py39-certifi: 2024.2.2 [cloud-init]
        py39-cffi: 1.16.0 [cloud-init]
        py39-charset-normalizer: 3.3.2 [cloud-init]
        py39-cloud-init-devel: 23.4.289 [cloud-init]
        py39-configobj: 5.0.8 [cloud-init]
        py39-cryptography: 42.0.5,1 [cloud-init]
        py39-idna: 3.6 [cloud-init]
        py39-jsonpatch: 1.33 [cloud-init]
        py39-jsonpointer: 2.0 [cloud-init]
        py39-jsonschema: 4.21.1 [cloud-init]
        py39-jsonschema-specifications: 2023.6.1 [cloud-init]
        py39-markupsafe: 2.1.5 [cloud-init]
        py39-netifaces: 0.11.0 [cloud-init]
        py39-oauthlib: 3.2.2 [cloud-init]
        py39-pycparser: 2.21 [cloud-init]
        py39-pyjwt: 2.8.0 [cloud-init]
        py39-pyserial: 3.5_2 [cloud-init]
        py39-referencing: 0.33.0 [cloud-init]
        py39-requests: 2.31.0 [cloud-init]
        py39-rpds-py: 0.13.2_3 [cloud-init]
        sudo: 1.9.15p5_4 [cloud-init]

Number of packages to be installed: 26

The process will require 73 MiB more space.
13 MiB to be downloaded.

Proceed with this action? [y/N]:

These two commands pick a different repository, even tho the cloud-init repo has higher versions and a higher priority;

@igalic
Copy link
Author

igalic commented Apr 4, 2024

some more data points:

  • renaming the repo from cloud-init to CLOUD-INIT has no effect.
  • when running pkg update, the order is FreeBSD (declared in /etc), FreeBSD-base (declared in /usr/local/etc) and then CLOUD-INIT (also declared in /usr/local/etc):
    Updating FreeBSD repository catalogue...
    FreeBSD repository is up to date.
    Updating FreeBSD-base repository catalogue...
    pkg: An error occured while fetching package
    FreeBSD-base repository is up to date.
    Updating CLOUD-INIT repository catalogue...
    CLOUD-INIT repository is up to date.
    All repositories are up to date.
    

@bapt
Copy link
Member

bapt commented Apr 4, 2024

if you don't play with the priority in the repository definition then this is expected

@igalic
Copy link
Author

igalic commented Apr 4, 2024

@bapt from the original report

These two commands pick a different repository, even tho the cloud-init repo has higher versions and a higher priority;

@Crest
Copy link

Crest commented May 8, 2024

Did you go through with install the packages using both commands and compared the pkg info output? Do the packages once installed (registered) show up with the names and origins you expect or do the repositories contain similar yet different packages? What happens when you attempt to override the repository selection with -r <repo>?

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

No branches or pull requests

3 participants