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

[Xen-changelog] [xen-unstable] uninstall: do not remove kernels or modules on uninstall.


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Tue, 04 Sep 2012 14:44:11 +0000
  • Delivery-date: Tue, 04 Sep 2012 14:44:43 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Ian Campbell <Ian.Campbell@xxxxxxxxxx>
# Date 1346406128 -3600
# Node ID be1f4a84783178467e2e4ad2bb5e124b6a9bb244
# Parent  e23bbadd1ad7fdaaee3a7355c20ba3c17e71d297
uninstall: do not remove kernels or modules on uninstall.

The pattern used is very broad and will delete any kernel with xen in
its filename, likewise modules, including those which come packages
from the distribution etc.

I don't think this was ever the right thing to do but it is doubly
wrong now that Xen does not even build or install a kernel by default.

Push cleanup of the installed hypervisor down into xen/Makefile so that
it can cleanup exactly what it actually installs.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Looks-good: Jan Beulich <JBeulich@xxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r e23bbadd1ad7 -r be1f4a847831 Makefile
--- a/Makefile  Fri Aug 31 10:42:07 2012 +0100
+++ b/Makefile  Fri Aug 31 10:42:08 2012 +0100
@@ -220,6 +220,7 @@ help:
 uninstall: D=$(DESTDIR)
 uninstall:
        [ -d $(D)$(XEN_CONFIG_DIR) ] && mv -f $(D)$(XEN_CONFIG_DIR) 
$(D)$(XEN_CONFIG_DIR).old-`date +%s` || true
+       $(MAKE) -C xen uninstall
        rm -rf $(D)$(CONFIG_DIR)/init.d/xendomains $(D)$(CONFIG_DIR)/init.d/xend
        rm -rf $(D)$(CONFIG_DIR)/init.d/xencommons 
$(D)$(CONFIG_DIR)/init.d/xen-watchdog
        rm -rf $(D)$(CONFIG_DIR)/hotplug/xen-backend.agent
@@ -228,8 +229,6 @@ uninstall:
        rm -f  $(D)$(SYSCONFIG_DIR)/xendomains
        rm -f  $(D)$(SYSCONFIG_DIR)/xencommons
        rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
-       rm -rf $(D)/boot/*xen*
-       rm -rf $(D)/lib/modules/*xen*
        rm -rf $(D)$(LIBDIR)/xen* $(D)$(BINDIR)/lomount
        rm -rf $(D)$(BINDIR)/cpuperf-perfcntr $(D)$(BINDIR)/cpuperf-xen
        rm -rf $(D)$(BINDIR)/xc_shadow
diff -r e23bbadd1ad7 -r be1f4a847831 xen/Makefile
--- a/xen/Makefile      Fri Aug 31 10:42:07 2012 +0100
+++ b/xen/Makefile      Fri Aug 31 10:42:08 2012 +0100
@@ -20,8 +20,8 @@ default: build
 .PHONY: dist
 dist: install
 
-.PHONY: build install clean distclean cscope TAGS tags MAP gtags
-build install debug clean distclean cscope TAGS tags MAP gtags::
+.PHONY: build install uninstall clean distclean cscope TAGS tags MAP gtags
+build install uninstall debug clean distclean cscope TAGS tags MAP gtags::
        $(MAKE) -f Rules.mk _$@
 
 .PHONY: _build
@@ -48,6 +48,21 @@ _install: $(TARGET).gz
                fi; \
        fi
 
+.PHONY: _uninstall
+_uninstall: D=$(DESTDIR)
+_uninstall: T=$(notdir $(TARGET))
+_uninstall:
+       rm -f $(D)/boot/$(T)-$(XEN_FULLVERSION).gz
+       rm -f $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).gz
+       rm -f $(D)/boot/$(T)-$(XEN_VERSION).gz
+       rm -f $(D)/boot/$(T).gz
+       rm -f $(D)/boot/$(T)-syms-$(XEN_FULLVERSION)
+       rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi
+       rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi
+       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
+
 .PHONY: _debug
 _debug:
        objdump -D -S $(TARGET)-syms > $(TARGET).s

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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