* [PATCH] yet another package check
@ 2006-12-14 14:06 Jan Beulich
2006-12-14 14:22 ` Christoph Egger
0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2006-12-14 14:06 UTC (permalink / raw)
To: xen-devel
As before, the file added to tools/check/ must be given exec permission.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Index: 2006-12-11/tools/Makefile
===================================================================
--- 2006-12-11.orig/tools/Makefile 2006-12-04 08:49:57.000000000 +0100
+++ 2006-12-11/tools/Makefile 2006-12-14 14:25:02.000000000 +0100
@@ -36,7 +36,7 @@ all: check
$(MAKE) ioemu
.PHONY: install
-install: check
+install: check_install
@set -e; for subdir in $(SUBDIRS-y); do \
$(MAKE) -C $$subdir $@; \
done
@@ -58,6 +58,10 @@ distclean: clean
check:
$(MAKE) -C check
+.PHONY: check_install
+check_install: check
+ $(MAKE) -C check install
+
.PHONY: check_clean
check_clean:
$(MAKE) -C check clean
Index: 2006-12-11/tools/check/check_python_xml
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ 2006-12-11/tools/check/check_python_xml 2006-12-14 14:05:30.000000000 +0100
@@ -0,0 +1,16 @@
+#!/bin/bash
+# CHECK-INSTALL
+
+function error {
+ echo
+ echo " *** Check for python-xml package FAILED"
+ exit 1
+}
+
+python -c '
+import os.path, sys
+for p in sys.path:
+ if os.path.exists(p + "/xml/dom/minidom.py"):
+ sys.exit(0)
+sys.exit(1)
+' || error
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] yet another package check
2006-12-14 14:06 [PATCH] yet another package check Jan Beulich
@ 2006-12-14 14:22 ` Christoph Egger
2006-12-14 14:27 ` Guillaume Rousse
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Egger @ 2006-12-14 14:22 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel
Why do you write non-portable shell scripts?
Some time ago, I made these portable:
check_brctl
check_iproute
check_libvncserver
check_python
check_sdl
check_zlib_devel
check_zlib_lib
For now, the non-portable scripts are:
check_crypto_lib
check_openssl_devel
check_python_devel
check_udev
check_x11_devel
Can you make them portable (again), please?
On Thursday 14 December 2006 15:06, you wrote:
> As before, the file added to tools/check/ must be given exec permission.
>
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
>
> Index: 2006-12-11/tools/Makefile
> ===================================================================
> --- 2006-12-11.orig/tools/Makefile 2006-12-04 08:49:57.000000000 +0100
> +++ 2006-12-11/tools/Makefile 2006-12-14 14:25:02.000000000 +0100
> @@ -36,7 +36,7 @@ all: check
> $(MAKE) ioemu
>
> .PHONY: install
> -install: check
> +install: check_install
> @set -e; for subdir in $(SUBDIRS-y); do \
> $(MAKE) -C $$subdir $@; \
> done
> @@ -58,6 +58,10 @@ distclean: clean
> check:
> $(MAKE) -C check
>
> +.PHONY: check_install
> +check_install: check
> + $(MAKE) -C check install
> +
> .PHONY: check_clean
> check_clean:
> $(MAKE) -C check clean
> Index: 2006-12-11/tools/check/check_python_xml
> ===================================================================
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ 2006-12-11/tools/check/check_python_xml 2006-12-14 14:05:30.000000000
> +0100 @@ -0,0 +1,16 @@
> +#!/bin/bash
> +# CHECK-INSTALL
> +
> +function error {
> + echo
> + echo " *** Check for python-xml package FAILED"
> + exit 1
> +}
> +
> +python -c '
> +import os.path, sys
> +for p in sys.path:
> + if os.path.exists(p + "/xml/dom/minidom.py"):
> + sys.exit(0)
> +sys.exit(1)
> +' || error
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] yet another package check
2006-12-14 14:22 ` Christoph Egger
@ 2006-12-14 14:27 ` Guillaume Rousse
2006-12-14 14:32 ` Christoph Egger
0 siblings, 1 reply; 6+ messages in thread
From: Guillaume Rousse @ 2006-12-14 14:27 UTC (permalink / raw)
To: xen-devel
Christoph Egger wrote:
> Why do you write non-portable shell scripts?
>
> Some time ago, I made these portable:
>
> check_brctl
> check_iproute
> check_libvncserver
> check_python
I don't know if this one has been rewritten since stable version, but
here is a patch I recently submited to the user list, to rely on python
instead of ugly grep:
diff -Naur xen-3.0.3_0-src/tools/check/check_python
xen-3.0.3_0-src.better-python-check/tools/check/check_python
--- xen-3.0.3_0-src/tools/check/check_python 2006-10-15
14:22:03.000000000 +0200
+++ xen-3.0.3_0-src.better-python-check/tools/check/check_python
2006-12-11 16:26:01.000000000 +0100
@@ -7,4 +7,4 @@
exit 1
}
-python -V 2>&1 | cut -d ' ' -f 2 | grep -q '^2.[2345]' || error
+python -c 'import sys; sys.exit(sys.version_info[0] < 2 or
sys.version_info[1] < 2);' || error
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] yet another package check
2006-12-14 14:27 ` Guillaume Rousse
@ 2006-12-14 14:32 ` Christoph Egger
2006-12-14 15:23 ` Jan Beulich
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Egger @ 2006-12-14 14:32 UTC (permalink / raw)
To: xen-devel
On Thursday 14 December 2006 15:27, Guillaume Rousse wrote:
> Christoph Egger wrote:
> > Why do you write non-portable shell scripts?
> >
> > Some time ago, I made these portable:
> >
> > check_brctl
> > check_iproute
> > check_libvncserver
> > check_python
>
> I don't know if this one has been rewritten since stable version, but
> here is a patch I recently submited to the user list, to rely on python
> instead of ugly grep:
>
> diff -Naur xen-3.0.3_0-src/tools/check/check_python
> xen-3.0.3_0-src.better-python-check/tools/check/check_python
> --- xen-3.0.3_0-src/tools/check/check_python 2006-10-15
> 14:22:03.000000000 +0200
> +++ xen-3.0.3_0-src.better-python-check/tools/check/check_python
> 2006-12-11 16:26:01.000000000 +0100
> @@ -7,4 +7,4 @@
> exit 1
> }
>
> -python -V 2>&1 | cut -d ' ' -f 2 | grep -q '^2.[2345]' || error
> +python -c 'import sys; sys.exit(sys.version_info[0] < 2 or
> sys.version_info[1] < 2);' || error
This is the adaption for -unstable:
diff -r 360eb996fa38 tools/check/check_python
--- a/tools/check/check_python Wed Dec 13 16:13:26 2006 +0000
+++ b/tools/check/check_python Thu Dec 14 15:31:18 2006 +0100
@@ -3,7 +3,7 @@
RC=0
-python -V 2>&1 | cut -d ' ' -f 2 | grep -q '^2.[2345]' || RC=1
+python -c 'import sys; sys.exit(sys.version_info[0] < 2 or
sys.version_info[1] < 2);' || RC=1
if test ${RC} -ne 0; then
echo
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] yet another package check
2006-12-14 14:32 ` Christoph Egger
@ 2006-12-14 15:23 ` Jan Beulich
2006-12-14 17:38 ` Brendan Cully
0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2006-12-14 15:23 UTC (permalink / raw)
To: xen-devel; +Cc: Christoph Egger
>This is the adaption for -unstable:
>
>diff -r 360eb996fa38 tools/check/check_python
>--- a/tools/check/check_python Wed Dec 13 16:13:26 2006 +0000
>+++ b/tools/check/check_python Thu Dec 14 15:31:18 2006 +0100
>@@ -3,7 +3,7 @@
>
> RC=0
>
>-python -V 2>&1 | cut -d ' ' -f 2 | grep -q '^2.[2345]' || RC=1
>+python -c 'import sys; sys.exit(sys.version_info[0] < 2 or
>sys.version_info[1] < 2);' || RC=1
>
> if test ${RC} -ne 0; then
> echo
What's wrong with using functions in shell scripts?
Jan
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] yet another package check
2006-12-14 15:23 ` Jan Beulich
@ 2006-12-14 17:38 ` Brendan Cully
0 siblings, 0 replies; 6+ messages in thread
From: Brendan Cully @ 2006-12-14 17:38 UTC (permalink / raw)
To: Jan Beulich; +Cc: Christoph Egger, xen-devel
On Thursday, 14 December 2006 at 15:23, Jan Beulich wrote:
> >This is the adaption for -unstable:
> >
> >diff -r 360eb996fa38 tools/check/check_python
> >+++ b/tools/check/check_python Thu Dec 14 15:31:18 2006 +0100
> >@@ -3,7 +3,7 @@
> >
> > RC=0
> >
> >-python -V 2>&1 | cut -d ' ' -f 2 | grep -q '^2.[2345]' || RC=1
> >+python -c 'import sys; sys.exit(sys.version_info[0] < 2 or
> >sys.version_info[1] < 2);' || RC=1
> >
> > if test ${RC} -ne 0; then
> > echo
>
> What's wrong with using functions in shell scripts?
error () {
}
is a lot more portable than
function error {
}
FWIW.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-12-14 17:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-14 14:06 [PATCH] yet another package check Jan Beulich
2006-12-14 14:22 ` Christoph Egger
2006-12-14 14:27 ` Guillaume Rousse
2006-12-14 14:32 ` Christoph Egger
2006-12-14 15:23 ` Jan Beulich
2006-12-14 17:38 ` Brendan Cully
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.