WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[PATCH] patch(1) is required for building (was Re: [Xen-devel] Xen unsta

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [PATCH] patch(1) is required for building (was Re: [Xen-devel] Xen unstable/SuSE 9.3 install issue)
From: Muli Ben-Yehuda <mulix@xxxxxxxxx>
Date: Wed, 19 Oct 2005 04:15:08 +0200
Cc: Robert Hulme <rob@xxxxxxxxxxxx>
Delivery-date: Wed, 19 Oct 2005 02:12:23 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <e50d039c0510181842lde97fa1y3475dd40ec8300a2@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <ddd4b0590510061310j20617625y3db6f5d4ff8f5e31@xxxxxxxxxxxxxx> <e50d039c0510181735tc061819h51dfb818317ae600@xxxxxxxxxxxxxx> <e50d039c0510181842lde97fa1y3475dd40ec8300a2@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
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

<Prev in Thread] Current Thread [Next in Thread>