Skip to content

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

Open
@drq883

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions