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

[PATCH] patch(1) is required for building (was Re: [Xen-devel] Xen unstable/SuSE 9.3 install issue)



On Wed, Oct 19, 2005 at 02:42:25AM +0100, Robert Hulme wrote:

> > I am having a similar compile problem. My woes seem to begin when it
> > can't find smp_alt.h (which I've checked and does not exist).

> Thanks to muli on the IRC channel this problem is now resolved.
> 
> The problem is that the build was failing as it wasn't running patch
> as it wasn't installed.
> 
> I assume this is a bug? Shouldn't the buildscript fail if patch is not
> installed? I'll enter it into the bugtracker.

Here's a quick patch to stop the build if patch(1) fails for some
reason. Tested on x86 with and without patch(1).

Signed-Off-By: Muli Ben-Yehuda <mulix@xxxxxxxxx>

# HG changeset patch
# User Muli Ben-Yehuda <mulix@xxxxxxxxx>
# Node ID 11e4f65368c2a8d1c583ad19621c58d155d0cd20
# Parent  446aa56ca4fee7d3ea2badfb59e8bb3540b507ae
building the kernels should fail if patch(1) is not available when
patching the kernel, rather than failing later when trying to build
the unpatched kernel. 
- set -e
- avoid two subshells so that make notices our exit status

diff -r 446aa56ca4fee7d3ea2badfb59e8bb3540b507ae -r 
11e4f65368c2a8d1c583ad19621c58d155d0cd20 buildconfigs/Rules.mk
--- a/buildconfigs/Rules.mk     Mon Oct 17 12:50:28 2005
+++ b/buildconfigs/Rules.mk     Wed Oct 19 02:10:00 2005
@@ -80,10 +80,11 @@
        rm -f patches/*/.makedep
 
 ref-%/.valid-ref: pristine-%/.valid-pristine
+       set -e
        rm -rf $(@D)
        cp -al $(<D) $(@D)
-       ([ -d patches/$* ] && \
-         for i in patches/$*/*.patch ; do ( cd $(@D) ; patch -p1 <../$$i || 
exit 1 ) ; done) || true
+       [ -d patches/$* ] || exit 1
+       for i in patches/$*/*.patch ; do cd $(@D) ; patch -p1 <../$$i || exit 
1; done
        touch $@ # update timestamp to avoid rebuild
 endif

-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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