[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] do not remove kernels or modules on uninstall. (Was: Re: make uninstall can delete xen-kernels)
On Thu, 2012-08-23 at 08:59 +0100, Ian Campbell wrote: > On Thu, 2012-08-23 at 08:31 +0100, Ian Campbell wrote: > > On Thu, 2012-08-23 at 08:04 +0100, Jan Beulich wrote: > > > >>> Ian Campbell <Ian.Campbell@xxxxxxxxxx> 08/23/12 8:40 AM >>> > > > >--- a/Makefile Wed Aug 22 17:32:37 2012 +0100 > > > >+++ b/Makefile Thu Aug 23 07:38:10 2012 +0100 > > > >@@ -228,8 +228,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* > > > > > > But removing this line without replacement isn't right either - we at > > > least > > > need to undo what "make install" did. That may imply adding an > > > uninstall-xen sub-target, > > > > Right, I totally forgot about the hypervisor itself! > > > > Perhaps this target should include a > > $(MAKE) -C xen uninstall > > since that is the Makefile which knows how to undo its own install > > target. > > Like this, which handles EFI too but not (yet) tools. Here is tools. This cleans up a superset of what was cleaned up before this change but still leaves a lot of detritus. See attached install.before, uninstall.before & uninstall.after (install.after is identical to install.before). This is a much bigger problem and probably requires proper recursive subdir-uninstall rules for everything under tools. That broader rework is certainly a post 4.2 thing IMHO. I'm in two minds about this patch as a 4.2 thing, but given that the regression happened due to the switch to autoconf in 4.2 I think it might be good to take, even though as a %age of what we install the delta is pretty insignificant. 8<--------------------------------------------------------- # HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1345710001 -3600 # Node ID eaf499f0f7071fc0bfd84901babfd1ae18227ebb # Parent 101956baa3469f5f338c661f1ceab23077bd432b uninstall: push tools uninstall down into tools/Makefile Many of the rules here depend on having run configure and the variables which it defines in config/Tools.mk Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> diff -r 101956baa346 -r eaf499f0f707 Makefile --- a/Makefile Thu Aug 23 08:49:44 2012 +0100 +++ b/Makefile Thu Aug 23 09:20:01 2012 +0100 @@ -229,34 +229,7 @@ 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)$(LIBDIR)/xen* $(D)$(BINDIR)/lomount - rm -rf $(D)$(BINDIR)/cpuperf-perfcntr $(D)$(BINDIR)/cpuperf-xen - rm -rf $(D)$(BINDIR)/xc_shadow - rm -rf $(D)$(BINDIR)/pygrub - rm -rf $(D)$(BINDIR)/setsize $(D)$(BINDIR)/tbctl - rm -rf $(D)$(BINDIR)/xsls - rm -rf $(D)$(BINDIR)/xenstore* $(D)$(BINDIR)/xentrace* - rm -rf $(D)$(BINDIR)/xen-detect $(D)$(BINDIR)/xencons - rm -rf $(D)$(BINDIR)/xenpvnetboot $(D)$(BINDIR)/qemu-*-xen - rm -rf $(D)$(INCLUDEDIR)/xenctrl* $(D)$(INCLUDEDIR)/xenguest.h - rm -rf $(D)$(INCLUDEDIR)/xs_lib.h $(D)$(INCLUDEDIR)/xs.h - rm -rf $(D)$(INCLUDEDIR)/xenstore-compat/xs_lib.h $(D)$(INCLUDEDIR)/xenstore-compat/xs.h - rm -rf $(D)$(INCLUDEDIR)/xenstore_lib.h $(D)$(INCLUDEDIR)/xenstore.h - rm -rf $(D)$(INCLUDEDIR)/xen - rm -rf $(D)$(INCLUDEDIR)/_libxl* $(D)$(INCLUDEDIR)/libxl* - rm -rf $(D)$(INCLUDEDIR)/xenstat.h $(D)$(INCLUDEDIR)/xentoollog.h - rm -rf $(D)$(LIBDIR)/libxenctrl* $(D)$(LIBDIR)/libxenguest* - rm -rf $(D)$(LIBDIR)/libxenstore* $(D)$(LIBDIR)/libxlutil* - rm -rf $(D)$(LIBDIR)/python/xen $(D)$(LIBDIR)/python/grub - rm -rf $(D)$(LIBDIR)/xen/ - rm -rf $(D)$(LIBEXEC)/xen* - rm -rf $(D)$(SBINDIR)/setmask - rm -rf $(D)$(SBINDIR)/xen* $(D)$(SBINDIR)/netfix $(D)$(SBINDIR)/xm - rm -rf $(D)$(SHAREDIR)/doc/xen - rm -rf $(D)$(SHAREDIR)/xen - rm -rf $(D)$(SHAREDIR)/qemu-xen - rm -rf $(D)$(MAN1DIR)/xen* - rm -rf $(D)$(MAN8DIR)/xen* + make -C tools uninstall rm -rf $(D)/boot/tboot* # Legacy targets for compatibility diff -r 101956baa346 -r eaf499f0f707 tools/Makefile --- a/tools/Makefile Thu Aug 23 08:49:44 2012 +0100 +++ b/tools/Makefile Thu Aug 23 09:20:01 2012 +0100 @@ -71,6 +71,38 @@ install: subdirs-install $(INSTALL_DIR) $(DESTDIR)/var/lib/xen $(INSTALL_DIR) $(DESTDIR)/var/lock/subsys +.PHONY: uninstall +uninstall: D=$(DESTDIR) +uninstall: + rm -rf $(D)$(LIBDIR)/xen* $(D)$(BINDIR)/lomount + rm -rf $(D)$(BINDIR)/cpuperf-perfcntr $(D)$(BINDIR)/cpuperf-xen + rm -rf $(D)$(BINDIR)/xc_shadow + rm -rf $(D)$(BINDIR)/pygrub + rm -rf $(D)$(BINDIR)/setsize $(D)$(BINDIR)/tbctl + rm -rf $(D)$(BINDIR)/xsls + rm -rf $(D)$(BINDIR)/xenstore* $(D)$(BINDIR)/xentrace* + rm -rf $(D)$(BINDIR)/xen-detect $(D)$(BINDIR)/xencons + rm -rf $(D)$(BINDIR)/xenpvnetboot $(D)$(BINDIR)/qemu-*-xen + rm -rf $(D)$(INCLUDEDIR)/xenctrl* $(D)$(INCLUDEDIR)/xenguest.h + rm -rf $(D)$(INCLUDEDIR)/xs_lib.h $(D)$(INCLUDEDIR)/xs.h + rm -rf $(D)$(INCLUDEDIR)/xenstore-compat/xs_lib.h $(D)$(INCLUDEDIR)/xenstore-compat/xs.h + rm -rf $(D)$(INCLUDEDIR)/xenstore_lib.h $(D)$(INCLUDEDIR)/xenstore.h + rm -rf $(D)$(INCLUDEDIR)/xen + rm -rf $(D)$(INCLUDEDIR)/_libxl* $(D)$(INCLUDEDIR)/libxl* + rm -rf $(D)$(INCLUDEDIR)/xenstat.h $(D)$(INCLUDEDIR)/xentoollog.h + rm -rf $(D)$(LIBDIR)/libxenctrl* $(D)$(LIBDIR)/libxenguest* + rm -rf $(D)$(LIBDIR)/libxenstore* $(D)$(LIBDIR)/libxlutil* + rm -rf $(D)$(LIBDIR)/python/xen $(D)$(LIBDIR)/python/grub + rm -rf $(D)$(LIBDIR)/xen/ + rm -rf $(D)$(LIBEXEC)/xen* + rm -rf $(D)$(SBINDIR)/setmask + rm -rf $(D)$(SBINDIR)/xen* $(D)$(SBINDIR)/netfix $(D)$(SBINDIR)/xm + rm -rf $(D)$(SHAREDIR)/doc/xen + rm -rf $(D)$(SHAREDIR)/xen + rm -rf $(D)$(SHAREDIR)/qemu-xen + rm -rf $(D)$(MAN1DIR)/xen* + rm -rf $(D)$(MAN8DIR)/xen* + .PHONY: clean clean: subdirs-clean Attachment:
install.before Attachment:
uninstall.after Attachment:
uninstall.before _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |