Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Mar 2026 19:54:48 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        grahamperrin@gmail.com, freebsd-pkg@freebsd.org
Subject:   Re: pkg-repositories(8) and the --rootdir option of pkg(8)
Message-ID:  <c20bb8ca-0daf-4532-93f5-c7ee2850ed2e@yahoo.com>
In-Reply-To: <a8dbff88-d8fa-418d-bc95-455f5b8bbba7@gmail.com>

index | next in thread | previous in thread | raw e-mail

On 3/15/26 17:46, Graham Perrin wrote:
> pkg version 2.6.2. 
> 
> Below, I half-expected the second use of pkg to show 
> base_latest (not base_release_0) in the url.
> 
> What am I missing? 
> 
> Thanks
> 
> 
> root@clean:~ # bectl list -c creation
> BE        Active Mountpoint Space Created
> default   NR     /          11.7G 2025-10-07 04:15
> stable-15 -      /tmp/up    483M  2026-03-15 23:31
> root@clean:~ # pkg repos FreeBSD-base
> FreeBSD-base: { 
>     url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/
> base_release_0",
>     enabled         : yes,
>     priority        : 0,
>     mirror_type     : "SRV",
>     signature_type  : "FINGERPRINTS",
>     fingerprints    : "/usr/share/keys/pkgbase-15"
>   }
> root@clean:~ # pkg -r /tmp/up repos FreeBSD-base

QUOTE (of man pkg output)
     -c ⟨chroot path⟩, --chroot ⟨chroot path⟩
             pkg will chroot in the ⟨chroot path⟩ environment.

     -r ⟨root directory⟩, --rootdir ⟨root directory⟩
             pkg will install all packages within the specified ⟨root
             directory⟩.
END QUOTE

--rootdir says nothing about anything except where packages are
installed, not where url specifications come from, nor about other files
generated/updated that would have meta data about the install.

--chroot uses the chroot environment instead of the original
environment. There could be different files with different content in
that chroot environment, files that would indicate a different url. But
more then that (such as other files generated/updated) would then be
internal to the chroot enviroment instead of being in the original
environment.

It might be that you were after --chroot instead?

> FreeBSD-base: { 
>     url             : "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/
> base_release_0",
>     enabled         : yes,
>     priority        : 0,
>     mirror_type     : "SRV",
>     signature_type  : "FINGERPRINTS",
>     fingerprints    : "/usr/share/keys/pkgbase-15"
>   }
> root@clean:~ # grep -A 2 FreeBSD-base /tmp/up/usr/local/etc/pkg/repos/
> FreeBSD.conf
> FreeBSD-base {
>     enabled = yes;
>     url = "pkg+https://pkg.freebsd.org/${ABI}/base_latest";
> root@clean:~ # 
> 


-- 
===
Mark Millard
marklmi at yahoo.com


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c20bb8ca-0daf-4532-93f5-c7ee2850ed2e>