Lexi Winter <ivy_at_freebsd.org> wrote on Date: Thu, 02 Oct 2025 09:17:30 UTC :
> Yasuhiro Kimura wrote in > <[email protected]>: > > 1. Consistency with update using source tree > . . . > > On pkgbase system, however, files under /etc seems to belong to > > packages. So they are updated by `pkg upgrade`. Then how confliction > > is handled if it happnes? > > pkg(8) will attempt a 3-way merge when installing a new configuration > file. if this is successful, no action is required. if it fails, the > existing file will be left unchanged and pkg will create a <name>.pkgnew > file, which you need to manually merge with the existing version of the > file. I'll note here that for how I've been grading, I rarely see *.pkgnew files but instead see *.pkgsave files. (I've been experimenting with starting with "pkg install" instead of "pkg upgrade" for base-package upgrades.) So: If you see a *.pkgsave then the pre-existing file may not have been left unchanged but instead be a copy of the new, default file content and the *.pkgsave is then the old, unchanged content. (I do sometimes get a * and *.pkgave pair that "diff -u" reports have no differences in content.) (I'm not recommending my experiment. My pkgbase usage testing includes doing some things somewhat oddly to see if I run into problems that I should report as notable for folks that happen to go off script.) > this workflow is much worse than etcupdate or freebsd-update, and i'm > not convinced we should release with pkgbase as the recommended option > without a better solution, but we'll see. > > note that this is *not* the same way ports handles new configuration > files; this feature is not used by ports at all, it is specific to the > base system. > . . . === Mark Millard marklmi at yahoo.com
