Which repo will pkg(8) select?
- Reply: Baptiste Daroussin : "Re: Which repo will pkg(8) select?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 10 Nov 2022 17:11:18 UTC
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