This patch contains the following hunk: --- a/xen/Makefile +++ b/xen/Makefile @@ -41,9 +41,15 @@ _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX) _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) [ -d $(D)$(BOOT_DIR) ] || $(INSTALL_DIR) $(D)$(BOOT_DIR) $(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION)$(Z) - ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z) - ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z) - ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z) + if [ 'x$(EFI_VENDOR)' == 'x' ]; then \ + ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \ + ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z); \ + ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \ + else \ + $(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \ + $(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z); \ + $(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \ + fi; [ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR) $(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION) if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \ So when EFI_VENDOR (USE=efi) is set the instead of installing symlinks for /boot/xen.gz, /boot/xen-<major_version>.gz and /boot/xen-<major_version>.<minor_version>.gz but full copies. This causes the grub2 grub-mkconfig command to build 4 xen submenus all for the same xen version. Upstream does not have this condition and it seems to be redundant. With this hunk removed from the patch xen-4.8.1-r2.ebuild continues to build. I'm not sure if this is supposed to be an allowance for the ESP being mounted at /boot instead of a typical (in my experience) Linux filesystem at /boot and then the ESP at /boot/efi? With original patch: # ls -l /boot/xen* -rw-r--r-- 1 root root 1106 Aug 8 09:45 /boot/xen-4.8.1.config -rw-r--r-- 1 root root 936492 Aug 8 09:51 /boot/xen-4.8.1.gz -rw-r--r-- 1 root root 936492 Aug 8 09:51 /boot/xen-4.8.gz -rw-r--r-- 1 root root 936492 Aug 8 09:51 /boot/xen-4.gz -rw-r--r-- 1 root root 936492 Aug 8 09:51 /boot/xen.gz With modified patch: # ls -l /boot/xen* -rw-r--r-- 1 root root 1106 Aug 8 09:59 /boot/xen-4.8.1.config -rw-r--r-- 1 root root 936492 Aug 8 10:04 /boot/xen-4.8.1.gz lrwxrwxrwx 1 root root 12 Aug 8 10:05 /boot/xen-4.8.gz -> xen-4.8.1.gz lrwxrwxrwx 1 root root 12 Aug 8 10:05 /boot/xen-4.gz -> xen-4.8.1.gz lrwxrwxrwx 1 root root 12 Aug 8 10:05 /boot/xen.gz -> xen-4.8.1.gz
Isn't this because an efi boot partition on vfat is unable to handle symlinks?