Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Dec 2025 16:33:58 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        freebsd@walstatt-de.de, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   RE: CURRENT: bothering DESTDIR=/ issue after pkg base install
Message-ID:  <CA61CA29-7CA0-43F3-A888-7CF56F31939F@yahoo.com>
References:  <CA61CA29-7CA0-43F3-A888-7CF56F31939F.ref@yahoo.com>

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

A FreeBSD User <freebsd_at_walstatt-de.de> wrote on
Date: Sat, 20 Dec 2025 21:08:25 UTC :

> rescueing offline a wrecked system via the latest FreeBSD CURRENT image which resulted forced
> in a pkg pakcage installation, the way back to install the system via
> 
> make installkernel/make installworld
> 
> after custom builds is polluted by an annoying required DESTDIR=/

This means that you have a pkgbase FreeBSD installation.
You need to turn it into a non-pkgbase freebsd in order
to do source code based updates. (pkgbase does not track
source code based updates but views the installation
results of such as corrupted files.)


I'll note that:

https://download.freebsd.org/ftp/snapshots/ISO-IMAGES/16.0/FreeBSD-16.0-CURRENT-amd64-20251217-nullhash-nullcount-disc1.iso.xz

also has the *.txz style of install as an option without
a live connection being needed. That could have avoided
pkgbase being involved. (Noted in case you need to do
another round of such.)


If you have or can get pkg 2.5.0 to be installed, there
is a new command in it that should help disable pkgbase
status but I'm not sure how to use it for that or what
the status of things need to be before trying.

# pkg-static help unregister

would display related help text. So would:

# man pkg-unregister

(The pkg man pages do not yet seem to reference the
existence of this man page.)

Care is needed to avoid pkg actually deleting the
^FreeBSD- packages: that leaves the system unusable.
(Also: pkg deleting pkg or pkg-static deleting pkg
is problematical as well.)

If you have other packages installed, I'm not sure
what will happend with them.

(Note: In these sorts of contexts, I tend to use
pkg-static instead of pkg, in order to avoid
library dependencies in case any end up deleted.
Making an independent copy of pkg-static could
prove useful as well.)

> I'd like to go back to the status quo ante, without defining DESTDIR=/ in /etc/src.conf, but
> it seems I'm to blunt to find the correct "switch". Can anyone help.please?

Unfortunately, you went down the wrong path for wanting
to have source code based updates/upgrades/installs
working, as pkg will view such installations as corruptions.
You need to get at least the packages with names matching
^FreeBSD- (so: those prefixed by "FreeBSD-") to not be
registered as a package so pkg ignores them. "Matching"
means a case-sensitive match criteria: There are (were?)
"freebsd-" prefixed port-packages that are not system
packages.


===
Mark Millard
marklmi at yahoo.com



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA61CA29-7CA0-43F3-A888-7CF56F31939F>