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 mailing list
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2016-08-11 08:23 UTC by VK
Modified: 2018-12-02 19:30 UTC (History)
1 user (show)

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


Attachments

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
pkg-1.8.7_1
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:
        libpkg.so.3
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:
  https://github.com/freebsd/pkg/blob/master/src/update.c#L69

* install falls through update:
  https://github.com/freebsd/pkg/blob/master/src/install.c#L197

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

Thanks.