diff options
author | Wade Berrier <wade@mono-cvs.ximian.com> | 2008-04-18 21:14:58 +0400 |
---|---|---|
committer | Wade Berrier <wade@mono-cvs.ximian.com> | 2008-04-18 21:14:58 +0400 |
commit | 88e8f55d6b908b7c4e4f6504b948d165aa2940f7 (patch) | |
tree | bb50ac5599e25e5990a1e934404eaf1c224d95f9 /scripts/mono-find-requires.in | |
parent | cac60aed4d774f8f7be2ad0a086bcf2d5b03ef0e (diff) |
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.
svn path=/trunk/mono/; revision=101137
Diffstat (limited to 'scripts/mono-find-requires.in')
-rw-r--r-- | scripts/mono-find-requires.in | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/mono-find-requires.in b/scripts/mono-find-requires.in index fca4c1442eb..452456ed5e9 100644 --- a/scripts/mono-find-requires.in +++ b/scripts/mono-find-requires.in @@ -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) # |