Andrei Lifchits
2013-Feb-20 16:47 UTC
[PATCH] build: Fix distclean when repo location changes
If the path to xen-unstable.hg changes (i.e. you move the repo), the symlinks inside xen-unstable.hg/stubdom/libxc-x86_[32|64]/ all become broken, which breaks distclean because make attempts to clean inside those first and fails to find Makefile (which is also a symlink). diff -r 66f563be41d9 -r 8f69a0bcab52 stubdom/Makefile --- a/stubdom/Makefile Tue Feb 19 10:49:53 2013 +0100 +++ b/stubdom/Makefile Wed Feb 20 16:36:40 2013 +0000 @@ -501,7 +501,7 @@ clean: $(MAKE) -C vtpmmgr clean rm -fr grub-$(XEN_TARGET_ARCH) rm -f $(STUBDOMPATH) - [ ! -d libxc-$(XEN_TARGET_ARCH) ] || $(MAKE) DESTDIR= -C libxc-$(XEN_TARGET_ARCH) clean + [ ! -e libxc-$(XEN_TARGET_ARCH)/Makefile ] || $(MAKE) DESTDIR= -C libxc-$(XEN_TARGET_ARCH) clean -[ ! -d ioemu ] || $(MAKE) DESTDIR= -C ioemu clean -[ ! -d xenstore ] || $(MAKE) DESTDIR= -C xenstore clean
Ian Campbell
2013-Feb-20 17:01 UTC
Re: [PATCH] build: Fix distclean when repo location changes
On Wed, 2013-02-20 at 16:47 +0000, Andrei Lifchits wrote:> If the path to xen-unstable.hg changes (i.e. you move the repo), the symlinks > inside xen-unstable.hg/stubdom/libxc-x86_[32|64]/ all become broken, which > breaks distclean because make attempts to clean inside those first and fails to > find Makefile (which is also a symlink).Would it be possible to arrange for the symlinks to be relative in the first place?> > diff -r 66f563be41d9 -r 8f69a0bcab52 stubdom/Makefile > --- a/stubdom/Makefile Tue Feb 19 10:49:53 2013 +0100 > +++ b/stubdom/Makefile Wed Feb 20 16:36:40 2013 +0000 > @@ -501,7 +501,7 @@ clean: > $(MAKE) -C vtpmmgr clean > rm -fr grub-$(XEN_TARGET_ARCH) > rm -f $(STUBDOMPATH) > - [ ! -d libxc-$(XEN_TARGET_ARCH) ] || $(MAKE) DESTDIR= -C libxc-$(XEN_TARGET_ARCH) clean > + [ ! -e libxc-$(XEN_TARGET_ARCH)/Makefile ] || $(MAKE) DESTDIR= -C libxc-$(XEN_TARGET_ARCH) clean > -[ ! -d ioemu ] || $(MAKE) DESTDIR= -C ioemu clean > -[ ! -d xenstore ] || $(MAKE) DESTDIR= -C xenstore clean > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
Ian Jackson
2013-Feb-20 17:06 UTC
Re: [PATCH] build: Fix distclean when repo location changes
Andrei Lifchits writes ("[Xen-devel] [PATCH] build: Fix distclean when repo location changes"):> If the path to xen-unstable.hg changes (i.e. you move the repo), the symlinks > inside xen-unstable.hg/stubdom/libxc-x86_[32|64]/ all become broken, which > breaks distclean because make attempts to clean inside those first and fails to > find Makefile (which is also a symlink).TBH I''m inclined to say "don''t do that then". mving the tree about is likely to break things and I don''t think we support it. But your patch is harmless so I''m content to apply it - except that it''s missing a s-o-b. Ie we need your confirmation that the Developer''s Certificate of Origin applies. See http://wiki.xen.org/wiki/SubmittingXenPatches Thanks, Ian.
Andrei Lifchits
2013-Feb-21 11:30 UTC
Re: [PATCH] build: Fix distclean when repo location changes
On Wed, Feb 20, 2013 at 5:01 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote:> On Wed, 2013-02-20 at 16:47 +0000, Andrei Lifchits wrote: >> If the path to xen-unstable.hg changes (i.e. you move the repo), the symlinks >> inside xen-unstable.hg/stubdom/libxc-x86_[32|64]/ all become broken, which >> breaks distclean because make attempts to clean inside those first and fails to >> find Makefile (which is also a symlink).Signed-off-by: Andrei Lifchits <andrei.lifchits@citrix.com>> Would it be possible to arrange for the symlinks to be relative in the > first place?Good idea, I''ll look into it when I have time (there are a lot of those symlinks in various places).>> >> diff -r 66f563be41d9 -r 8f69a0bcab52 stubdom/Makefile >> --- a/stubdom/Makefile Tue Feb 19 10:49:53 2013 +0100 >> +++ b/stubdom/Makefile Wed Feb 20 16:36:40 2013 +0000 >> @@ -501,7 +501,7 @@ clean: >> $(MAKE) -C vtpmmgr clean >> rm -fr grub-$(XEN_TARGET_ARCH) >> rm -f $(STUBDOMPATH) >> - [ ! -d libxc-$(XEN_TARGET_ARCH) ] || $(MAKE) DESTDIR= -C libxc-$(XEN_TARGET_ARCH) clean >> + [ ! -e libxc-$(XEN_TARGET_ARCH)/Makefile ] || $(MAKE) DESTDIR= -C libxc-$(XEN_TARGET_ARCH) clean >> -[ ! -d ioemu ] || $(MAKE) DESTDIR= -C ioemu clean >> -[ ! -d xenstore ] || $(MAKE) DESTDIR= -C xenstore clean >> >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xen.org >> http://lists.xen.org/xen-devel > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
Ian Jackson
2013-Feb-22 16:41 UTC
Re: [PATCH] build: Fix distclean when repo location changes
Andrei Lifchits writes ("Re: [Xen-devel] [PATCH] build: Fix distclean when repo location changes"):> On Wed, Feb 20, 2013 at 5:01 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote: > > On Wed, 2013-02-20 at 16:47 +0000, Andrei Lifchits wrote: > >> If the path to xen-unstable.hg changes (i.e. you move the repo), the symlinks > >> inside xen-unstable.hg/stubdom/libxc-x86_[32|64]/ all become broken, which > >> breaks distclean because make attempts to clean inside those first and fails to > >> find Makefile (which is also a symlink). > > Signed-off-by: Andrei Lifchits <andrei.lifchits@citrix.com>Thanks, I''ve applied the patch.> > Would it be possible to arrange for the symlinks to be relative in the > > first place? > > Good idea, I''ll look into it when I have time (there are a lot of > those symlinks in various places).Right. As I say I don''t think this is a thing that should be expected to be work but I won''t block you from working on it :-). Making "distclean" work after the tree is moved might be easier than making just "make" still work; the latter would involve making sure that all the -Is etc. were relative, as those paths end up in .d files. Ian.