Bug 211749 - ports-mgmt/pkg: pkg install -r <disabled-repo> does not work, contrary to pkg-install(8)
Summary: ports-mgmt/pkg: pkg install -r <disabled-repo> does not work, contrary to pkg...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-pkg (Nobody)
Keywords: needs-qa
Depends on:
Reported: 2016-08-11 08:23 UTC by VK
Modified: 2020-06-04 16:49 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (pkg)


Note You need to log in before you can comment on or make changes to this bug.
Description VK freebsd_triage 2016-08-11 08:23:00 UTC
When installing packages from a disabled repo with pkg install -r, the manpage suggests it should not respect the "active" status of the repo ('irrespective of the configured "active" status from repo.conf'), meaning it will install from disabled repos, however that is not the case:

> # grep enabled /usr/local/etc/pkg/repos/FreeBSD.conf 
>   enabled: no
> # pkg install -r FreeBSD openjdk
> No repositories are enabled.

Enabling the repo allows installation from it with -r.
Comment 1 VK freebsd_triage 2016-08-11 08:27:53 UTC
# pkg info pkg
Name           : pkg
Version        : 1.8.7_1
Installed on   : Thu Aug  4 13:55:40 2016 CEST
Origin         : ports-mgmt/pkg
Architecture   : freebsd:11:x86:64
Prefix         : /usr/local
Categories     : ports-mgmt
Licenses       : BSD2CLAUSE
Maintainer     : pkg@FreeBSD.org
WWW            : http://wiki.freebsd.org/pkgng
Comment        : Package manager
Shared Libs provided:
Annotations    :
        repo_type      : binary
        repository     : Poudriere
Flat size      : 10.9MiB
Description    :
Package management tool

WWW: http://wiki.freebsd.org/pkgng
Comment 2 VK freebsd_triage 2016-11-26 17:01:47 UTC
Looking at the source code, it would appear that the manpage is wrong. For example, given repo is explicitly checked if enabled:

* update:

* install falls through update:

Can we get some feedback here? If this is the intended behavior, then the solution is to correct the manpage.

Comment 3 Gleb Popov freebsd_committer 2019-08-02 10:43:05 UTC
I'd like to bump this bug. It is pretty annoying in my use-case.
Comment 4 Gleb Popov freebsd_committer 2020-06-04 16:47:26 UTC
Any progress on this?
Comment 5 Kyle Evans freebsd_committer 2020-06-04 16:49:10 UTC
CC'ing bapt@ specifically, though I reckon he probably reads -pkg@ as well