Re: pkgbase and config file merges

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Wed, 06 Mar 2024 18:12:22 UTC
Le 6 mars 2024 19:07:51 GMT+01:00, Mark Millard <marklmi@yahoo.com> a écrit :
>Baptiste Daroussin <bapt_at_freebsd.org> wrote on
>Date: Wed, 06 Mar 2024 17:24:18 UTC :
>
>> On Wed, Mar 06, 2024 at 08:59:36AM -0800, Roger Marquis wrote:
>> > 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.
>> > 
>> this can only happen in the bootstrap phase and not otherwise, in normal usage
>> there is always a 3 way merge happening and if the 3 way merge fails there the
>> original is preserved and a file.pkgnew is created with the new content.
>> 
>> pkg should always be and remain unattended, once it enter a transaction so there
>> is no plan to make it interactive.
>> 
>> I don't understand what you are asking for about the .pkgsave files cleanup.
>
>I've been using find to check for *.pkgsave files to know to deal with
>them if they occur.
>
>Checking now with find, I did not find any *.pkgnew files. I had not
>been aware to look for those.
>
>But I've discovered .pkgtemp.* as a naming convention and for
>it I find:
>
># find -x / -name .pkgtemp.\* -print | wc -l
>      80
>
>So it looks like I've more checking and cleanup to do in general for
>my PkgBase experiments.
>
>
>===
>Mark Millard
>marklmi at yahoo.com
>

.pkgtemp. Should never occur except if pkg crashes

.pkgsave once you have boostrapped you should not have any.

Best regards
Bapt