[ooo-build-commit] patches/dev300

Jan Holesovsky kendy at kemper.freedesktop.org
Fri Jul 3 01:38:18 PDT 2009


 patches/dev300/apply                           |    4 +++
 patches/dev300/dmake-space-in-envvar-name.diff |   29 +++++++++++++++++++++++++
 2 files changed, 33 insertions(+)

New commits:
commit 559eafcea92b54ea246fb020ae1124658051c63b
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri Jul 3 10:36:07 2009 +0200

    Don't break dmake with (broken, but possible) space in envvar name.
    
    * patches/dev300/apply:
    * patches/dev300/dmake-space-in-envvar-name.diff: Add.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index ef7247b..e795a98 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1109,6 +1109,10 @@ soltools-mkdepend-getline.diff, aradke
 # localize fails with duplicated symlinks
 transex3-localize-find.diff, i#102296, pmladek
 
+# don't break dmake with environment variables containing space in the name
+# [which is a broken setup, but apparently most apps don't break with that ;-)] 
+dmake-space-in-envvar-name.diff, i#101786, jholesov
+
 [ Gcc44 ]
 buildfix-sw-printf.diff, ccheney
 
diff --git a/patches/dev300/dmake-space-in-envvar-name.diff b/patches/dev300/dmake-space-in-envvar-name.diff
new file mode 100644
index 0000000..5c90a3b
--- /dev/null
+++ b/patches/dev300/dmake-space-in-envvar-name.diff
@@ -0,0 +1,29 @@
+--- dmake/getinp.c.orig	2009-07-03 10:24:03.000000000 +0200
++++ dmake/getinp.c	2009-07-03 10:28:16.000000000 +0200
+@@ -88,17 +88,23 @@ FILE *fil;
+       /* Reading the internal rule table.  Set rule_ind to zero after the
+        * last entry so that ReadEnvironment() works as expected every time. */
+ 
+-      while( (p = Rule_tab[ rule_ind++ ]) != NIL(char) )
++      while( (p = Rule_tab[ rule_ind++ ]) != NIL(char) ) {
+ 	 /* The last test in this if *p != '~', handles the environment
+ 	  * passing conventions used by MKS to pass arguments.  We want to
+ 	  * skip those environment entries. Also CYGWIN likes to export '!'
+-	  * prefixed environment variables that cause severe pain, axe them too */
+-	 if( !Readenv || (Readenv && (strchr(p,'=') != NIL(char)) && *p!='~' && *p!='!')){
++	  * prefixed environment variables that cause severe pain, axe them too.
++	  * And finally it is possible to do "env 'GGG HHH'='some value' bash"
++	  * which causes that there are env variables with spaces in the name
++	  * defined which causes dmake to malfunction too */
++	 char *equal = strchr(p,'=');
++	 char *space = strchr(p,' ');
++	 if( !Readenv || (Readenv && (equal != NIL(char)) && (space == NIL(char) || space > equal) && *p!='~' && *p!='!')){
+ 	    strcpy( buf, p );
+ 
+ 	    DB_PRINT( "io", ("Returning [%s]", buf) );
+ 	    DB_RETURN( FALSE );
+ 	 }
++      }
+ 
+       rule_ind = 0;
+ 


More information about the ooo-build-commit mailing list