I have host with gentoo and xen hypervizor on it. To boot Xen by default I have rename 20_linux_xen to 10_linux_xen and 10_linux to 20_linux. But when I update or reinstall grub it installs 10_linux and 20_linux_xen again so as I have 10_linux, 10_linux_xen, 20_linux and 20_linux_xen. I understand why it's done so, but it doesn't seems as correct behavior for me. Or may be I should change boot menu order in some other way?
Why would you run the bootloader in a domU at all? app-emulation/xen-tools has pygrub for that. http://wiki.xen.org/wiki/PyGrub Additionally, you could play with INSTALL_MASK and CONFIG_PROTECT_MASK in make.conf to keep sys-boot/grub's files out or protect them so they would never be overwritten.
I use grub on dom0 only
This seems like a missing piece of the config-protect feature in portage.
This could be handled by checking for files that are in CONTENTS of the installed instance, but don't exist in the file system. In this case, we could merge the new file as a ._cfg, so that the user will be prompted by etc-update/dispatch-conf.
(In reply to Zac Medico from comment #4) Yes, I have had the same idea, but have been lazy about implementing it. ^_^
Oh, for systemd specifically, it would be nice if that also worked for symlinks that the sysadmin has removed. See also bug 485598. I imagine that would require some modification of etc-update/dispatch-conf as well.
Created attachment 385488 [details, diff] dblink.mergeme: implement bug #523684 If a CONFIG_PROTECTed file was installed but no longer exists in the file system, then it may have been deleted or renamed by the admin. Therefore, force the file to be merged with a ._cfg name, so that the admin will be prompted for this update.
This is in git: https://github.com/gentoo/portage/commit/5f7b4865ecafe4f04a92c5e1158f657b0dcd41d6
This is fixed in 2.2.14.
I've notice that etc-update does not prompt for updates when the destination file doesn't exist. So, I think we should fix that before we can consider this bug "fixed".
Also, if a file (rather than a directory) is listed in CONFIG_PROTECT (supported since bug #14321), the the ConfigProtect class will not protect it unless it exits. So, we should fix it to work even if the file does not exist (due to being renamed or removed by the sysadmin).
(In reply to Zac Medico from comment #10) > I've notice that etc-update does not prompt for updates when the destination > file doesn't exist. So, I think we should fix that before we can consider > this bug "fixed". Actually, both etc-update and dispatch-conf appear to work correctly, so the ConfigProtect issue (comment #11) is the only thing left to fix.
Created attachment 387326 [details, diff] CONFIG_PROTECT: handle non-existent files (listed directly in CONFIG_PROTECT) This fixes the ConfigProtect class, etc-update, and dispatch-conf to account for non-existent files (rather than directories) that are listed directly in CONFIG_PROTECT. It has been valid to list files directly in CONFIG_PROTECT since bug #14321. However, the support for non-existent files added for bug #523684 did not include support for non-existent files listed directly in CONFIG_PROTECT.
This is in git now: https://github.com/gentoo/portage/commit/ae355c93fd2760970c92cd4e9d2daa68f216adfa
This is in the portage-2.2.15 release.