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-changelog

[Xen-changelog] [xen-unstable] tools/remus: fix build in (symlinked) rea

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools/remus: fix build in (symlinked) read-only source tree
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 Feb 2010 01:55:16 -0800
Delivery-date: Wed, 10 Feb 2010 01:55:45 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1265793556 0
# Node ID 10a54ab636070d5a7ab52ced41fc753f3370c407
# Parent  a3fa6d444b25daeb0faeb5f24c887a183edba1eb
tools/remus: fix build in (symlinked) read-only source tree

Modifying source files should generally be avoided; if it is being
done, care should at least be taken to not attempt writes to read-only
files.

While at it, also force the whole ugly construct to fail if any of its
commands fails.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 tools/remus/imqebt/Makefile |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff -r a3fa6d444b25 -r 10a54ab63607 tools/remus/imqebt/Makefile
--- a/tools/remus/imqebt/Makefile       Wed Feb 10 09:18:43 2010 +0000
+++ b/tools/remus/imqebt/Makefile       Wed Feb 10 09:19:16 2010 +0000
@@ -52,11 +52,12 @@ build: $(PROGRAMS)
 # a little scripting for a static binary, making one for ebtables-restore
 # should be completely analogous
 imqebt: extensions/ebt_*.c extensions/ebtable_*.c ebtables.c communication.c 
ebtables-standalone.c getethertype.c libebtc.c useful_functions.c
-       cp ebtables-standalone.c ebtables-standalone.c_ ; \
-       cp include/ebtables_u.h include/ebtables_u.h_ ; \
-       sed "s/ main(/ pseudomain(/" ebtables-standalone.c > 
ebtables-standalone.c__ ; \
-       mv ebtables-standalone.c__ ebtables-standalone.c ; \
+       set -e ; \
+       mv ebtables-standalone.c ebtables-standalone.c_ ; \
+       sed "s/ main(/ pseudomain(/" ebtables-standalone.c_ > 
ebtables-standalone.c ; \
        printf "\nint main(int argc, char *argv[])\n{\n "  >> 
ebtables-standalone.c ; \
+       mv include/ebtables_u.h include/ebtables_u.h_ ; \
+       cat include/ebtables_u.h_ >include/ebtables_u.h ; \
        for arg in $(EXT_FUNC) \
        ; do \
        sed s/_init/_$${arg}_init/ extensions/ebt_$${arg}.c > 
extensions/ebt_$${arg}.c_ ; \

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools/remus: fix build in (symlinked) read-only source tree, Xen patchbot-unstable <=