Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2022 18:13:53 +0100
From:      Baptiste Daroussin <bapt@freebsd.org>
To:        Ian Smith <smithi@nimnet.asn.au>
Cc:        questions@freebsd.org
Subject:   Re: Which repo will pkg(8) select?
Message-ID:  <20221110171353.qruvyay2skdob66h@aniel.nours.eu>
In-Reply-To: <48BC01A7-465A-45F5-A34A-609A2105191C@nimnet.asn.au>
References:  <48BC01A7-465A-45F5-A34A-609A2105191C@nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 11, 2022 at 04:11:18AM +1100, Ian Smith wrote:
> Hi crew,
> 
> is there any way to have pkg reveal which repository it will select with the present configuration, without it having to actually connect with that repo?
> 
> Specifically, bsdconfig(8) needs to know which /var/db/pkg/${something}.sqlite to check, where $something may be repo-FreeBSD or repo-FreeBSD_install_cdrom or some custom repo, likely from the default /etc/pkg/FreeBSD.conf or from (e.g) /usr/local/etc/pkg/repos/FreeBSD_install_cdrom.conf or other, or an overriding REPOS_DIR setting.
> 
> I'd sooner not have to scan each of the $REPOS_DIR directories and then parse all *.conf files, emulating pkg(8)'s described selection algorithm, but I've found no suitable option in pkg-*(8) so far.
> 
> Thanks, Ian

pkg -vv should provide you the information you are looking for.

Best regards,
Bapr



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20221110171353.qruvyay2skdob66h>