diff mbox series

EFI: don't mistakenly delete a file we never installed

Message ID 55e50138-1d41-1e79-f269-df875473b1d2@suse.com (mailing list archive)
State New, archived
Headers show
Series EFI: don't mistakenly delete a file we never installed | expand

Commit Message

Jan Beulich April 25, 2022, 10:47 a.m. UTC
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>

Comments

Bertrand Marquis April 26, 2022, 12:10 p.m. UTC | #1
Hi Jan,

> On 25 Apr 2022, at 11:47, Jan Beulich <jbeulich@suse.com> wrote:
> 
> 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>

Cheers
Bertrand

> 
> --- 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:
> 
>
diff mbox series

Patch

--- 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: