diff options
author | Wade Berrier <wade@mono-cvs.ximian.com> | 2008-01-23 19:04:58 +0300 |
---|---|---|
committer | Wade Berrier <wade@mono-cvs.ximian.com> | 2008-01-23 19:04:58 +0300 |
commit | 91a6e17f15c003d7cae6daf4ad481abf518013c1 (patch) | |
tree | f489df6cd3db60243299df615b6089a515a4188d /scripts/mono-find-requires.in | |
parent | e0b7c8720a84b445a158308295ea4b9a6c50f708 (diff) |
Print a warning to stderr instead of generating invalid deps containing
"no package provides <blah>"
svn path=/trunk/mono/; revision=93665
Diffstat (limited to 'scripts/mono-find-requires.in')
-rw-r--r-- | scripts/mono-find-requires.in | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/scripts/mono-find-requires.in b/scripts/mono-find-requires.in index 420275d7a6d..5cacf48e58b 100644 --- a/scripts/mono-find-requires.in +++ b/scripts/mono-find-requires.in @@ -4,8 +4,9 @@ # # Authors: # Ben Maurer (bmaurer@ximian.com) +# Wade Berrier (wberrier@novell.com) # -# (C) 2005 Novell (http://www.novell.com) +# (C) 2008 Novell (http://www.novell.com) # IFS=$'\n' @@ -69,6 +70,9 @@ REQUIRES=$( } ') 2> /dev/null done +) + +rpm_config_REQUIRES=$( # Parse the xml .config files to see what native binaries we call into # TODO: also check monodis --moduleref for i in "${configlist[@]}"; do @@ -110,12 +114,25 @@ REQUIRES=$( } } if(!ignore) { - system("rpm -q --whatprovides --queryformat \"%{NAME}\n\" ""\""req"'$libext'""\"") + print req"'$libext'" } } ' $i 2>/dev/null done ) +# Resolve provides to packages, warning on missing to stderr +config_REQUIRES=$( + for i in ${rpm_config_REQUIRES[@]} ; do + out=$(rpm -q --whatprovides --queryformat "%{NAME}\n" $i) + if [ $? -eq 0 ] ; then + echo $out + else + # echo to stderr + echo "mono-find-requires: Warning, could not find package that provides: $i" >&2 + fi + done +) + # 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... @@ -140,9 +157,10 @@ PROVIDES=$( # in PROVIDES. While RPM functions correctly when such deps exist, # they make the metadata a bit bloated. # +# TODO: make this use the mono-find-provides script, to share code # Filter out dups from both lists -REQUIRES=$(echo "$REQUIRES" | sort | uniq) +REQUIRES=$(echo "$REQUIRES" "$config_REQUIRES" | sort | uniq) PROVIDES=$(echo "$PROVIDES" | sort | uniq) # |