On Tue, 18 Apr 2023 05:55:49 +0100, Wols Lists wrote: > On 17/04/2023 19:26, Walter Dnes wrote: > > Now that the (no)multilib problem in my latest update has been > > solved, I have a somewhat minor complaint. Can I get etc-update to > > skip certain files? My latest emerge world wanted to "update"... > > > > 1) /etc/hosts (1) > > 2) /etc/inittab (1) > > 3) /etc/mtab (1) > > 4) /etc/conf.d/consolefont (1) > > 5) /etc/conf.d/hwclock (1) > > 6) /etc/default/grub (1) > > 7) /etc/ssh/sshd_config (1) > > > > ...hosts is critical for networking. consolefont allows me tp use the > > true text console with a readable font, etc, etc. I have my reasons > > for making certain settings, and keeping them that way. > > > I had it want to update grub. Which would have utterly borked my system > the moment I updated my kernel. > > Okay, the problem is where you mix user and system config in the same > file, but this would have deleted lvm and mdadm from my boot config, > rendering any kernel unbootable. :-( > > Like it tried to update postfix many moons ago and would have destroued > my mail config ... > > Surely there's some way of fixing this ...
You could have a post-install hook in /etc/portage/env/$CAT/$PKG for each
of the affected files, something like
post_pkg_postinst() {
rm -f /etc/._cfg0000_hosts
}
You'll need to check the syntax as it's a while since I've used this.
--
Neil Bothwick
Life's a cache, and then you flush...
pgpAXMXm6uLuW.pgp
Description: OpenPGP digital signature

