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

pkg --repository option only works if repo is enabled - contrary to man page description #2197

Open
drq883 opened this issue Nov 9, 2023 · 1 comment

Comments

@drq883
Copy link

drq883 commented Nov 9, 2023

Using pkg version: 1.20.8

I have two repo config files in /usr/local/etc/pkg/repos:

% cat release_0.conf
release_0: {
  url: "pkg+http:https://pkg.FreeBSD.org/${ABI}/release_0",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

% cat latest.conf
latest: {
  url: "pkg+http:https://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: no
}

I only want to use the latest repo for upgrading things to the latest. Otherwise I want things to use the "frozen repo" that doesn't change.

man pkg-update shows this:

     -r reponame, --repository reponame
            Download the catalogue for the named repository only.  This will
            update only the named repository, irrespective of the configured
            “active” status from repo.conf.

Man pkg-upgrade shows this:

     -r reponame, --repository reponame
                 Install packages from only the named repository, irrespective
                 of the configured “active” status from repo.conf.

This is not true. The repos have to be enabled in order for it to work.

The only way around this is to enable the repo, do the update/upgrade, then disable the repo.

I've tested this on 13.2, and on 14-STABLE. Both exhibit the same behavior.

@drq883
Copy link
Author

drq883 commented Nov 9, 2023

This was originally entered as a FreeBSD bug here:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274989

They requested I enter an issue here instead.

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

1 participant