Automatically overwriting files like passwd is clearly a problem.
Preferred solution would be a list, say [never_overwrite] and/or [ask
before overwriting] and/or [write diff to /var/db/pkgbase/...] in
/etc/defaults/pkgbase specifying existing files that should never be
modified without at least a dialog.

This plus the cleanup of pkgsave files which should only be written to
/var/db/pkgbase/pkgsave/`date +%G%m%d%H%M` should address the blockers
to more widespread adoption of packagebase and, ideally, make it
mandatory or at least the default option in the next version of FreeBSD.

Roger



On Tue, Mar 05, 2024 at 06:02:41AM +0000, Graham Perrin wrote:
On 04/03/2024 10:14, Baptiste Daroussin wrote:
?
Pkg has 3-way merge code, so it is similar to etcupdate(8) provided the file is
properly marked as a config file i the source tree which is the case of
master.passwd

Best regards,
Bapt

Thanks, that's a very pleasant surprise, is
<https://github.com/freebsd/pkg/blob/master/FAQ.md#25> outdated?

(Answered in 2012; 
<https://github.com/freebsd/pkg/commit/02f8a139532c32b63d21e36ebc67d3ca76a92813>.)

No this is not outdated.

Is <https://github.com/freebsd/pkg/issues/1845> still, partly, an issue?

? pkg(8) deinstall and then reinstall of FreeBSD-runtime leads to wiping out
`/etc/master.passwd` and `/etc/group` ? Issue #1845 ? freebsd/pkg

this is not an issue, this is expected.

Best regards,
Bapt






Reply via email to