]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
EFI: don't mistakenly delete a file we never installed
authorJan Beulich <jbeulich@suse.com>
Wed, 27 Apr 2022 07:15:03 +0000 (09:15 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 27 Apr 2022 07:15:03 +0000 (09:15 +0200)
Just like for "install", make dealing with xen.efi on the EFI partition
dependent upon mount point and vendor directory being known.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
xen/Makefile

index ec34524ed21da006a088c43771621cec33a88528..735d5f6e45bbef65fa1e872c4d9133e1b474b392 100644 (file)
@@ -515,7 +515,9 @@ _uninstall:
        rm -f $(D)$(DEBUG_DIR)/$(T)-$(XEN_FULLVERSION).efi.map
        rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi
        rm -f $(D)$(EFI_DIR)/$(T).efi
-       rm -f $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi
+       if [ -n '$(EFI_MOUNTPOINT)' -a -n '$(EFI_VENDOR)' ]; then \
+               rm -f $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi; \
+       fi
 
 .PHONY: _debug
 _debug: