pkg --repository option only works if repo is enabled - contrary to man page description
drq883 opened this issue · 1 comments
drq883 commented
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://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://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 commented
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.