2008-04-18 Wade Berrier <wberrier@novell.com>
authorWade Berrier <wade@mono-cvs.ximian.com>
Fri, 18 Apr 2008 17:14:58 +0000 (17:14 -0000)
committerWade Berrier <wade@mono-cvs.ximian.com>
Fri, 18 Apr 2008 17:14:58 +0000 (17:14 -0000)
       * scripts/mono-find-requires.in: Add env var to ignore scanning
       of .config files.
       Fix extra whitespace when no config reqs are found.

svn path=/trunk/mono/; revision=101137

ChangeLog
scripts/mono-find-requires.in

index 4973ac1ca43959a192ec975a6343f4ac896f7965..3b67a73c9660a9bfdb092ab3daa8f657369d0722 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-18  Wade Berrier  <wberrier@novell.com>
+
+       * scripts/mono-find-requires.in: Add env var to ignore scanning
+       of .config files.
+       Fix extra whitespace when no config reqs are found.
+
 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
 
        * configure.in: Enable the valgrind header check on amd64 too.
index fca4c1442eba283218c0a9e47abad5e30243db1e..452456ed5e96d754d5f9aa5b4f68790e5ac80529 100644 (file)
@@ -21,6 +21,9 @@ configlist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.config\$"))
 # Set the prefix, unless it is overriden (used when building mono rpms)
 : ${prefix=@prefix@}
 
+# Can override .config scanning if specified
+: ${IGNORE_CONFIG_SCAN=0}
+
 libdir=$prefix/@reloc_libdir@
 bindir=$prefix/bin
 
@@ -72,6 +75,8 @@ REQUIRES=$(
        done
 )
 
+if [ $IGNORE_CONFIG_SCAN -eq 0 ] ; then
+
 rpm_config_REQUIRES=$(
        # Parse the xml .config files to see what native binaries we call into
        # TODO: also check monodis --moduleref
@@ -122,9 +127,14 @@ rpm_config_REQUIRES=$(
 
 # Resolve provides to packages, warning on missing to stderr
 config_REQUIRES=$(
+       first=1 # avoid an empty line if no .config reqs are found
        for i in ${rpm_config_REQUIRES[@]} ; do
                out=$(rpm -q --whatprovides --queryformat "%{NAME}\n" $i)
                if [ $? -eq 0 ] ; then
+                       if [ $first -eq 1 ] ; then
+                              echo ""
+                              first=0
+                       fi
                        echo $out
                else
                        # echo to stderr
@@ -133,6 +143,8 @@ config_REQUIRES=$(
        done
 )
 
+fi
+
 # Note about above:
 #  Use to do: system("rpm -q --whatprovides --queryformat \"%{NAME}\n\" ""\""req"'$libext'""\"")
 #  rpmlint prefers to have lib names instead of package names.  There was a reason I was using package names but it slips me now...
@@ -160,8 +172,7 @@ PROVIDES=$(
 # TODO: make this use the mono-find-provides script, to share code
 
 # Filter out dups from both lists
-REQUIRES=$(echo "$REQUIRES
-$config_REQUIRES"  | sort | uniq)
+REQUIRES=$(echo "$REQUIRES $config_REQUIRES"  | sort | uniq)
 PROVIDES=$(echo "$PROVIDES" | sort | uniq)
 
 #