[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] EFI: don't mistakenly delete a file we never installed



commit 163071b1800304c962756789b4ef0ddb978059ba
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Apr 27 09:15:03 2022 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Apr 27 09:15:03 2022 +0200

    EFI: don't mistakenly delete a file we never installed
    
    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@xxxxxxxx>
    Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
---
 xen/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/xen/Makefile b/xen/Makefile
index ec34524ed2..735d5f6e45 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -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:
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.