Index: Mk/Scripts/qa.sh =================================================================== --- Mk/Scripts/qa.sh +++ Mk/Scripts/qa.sh @@ -822,10 +822,47 @@ return $rc } +gemdeps() +{ + if [ "${PKGBASE%%-*}" = "rubygem" ]; then + msg=$( + while read -r l; do + name=${l%% *} + vers=${l#* } + while read -r v; do + bad=$( + echo "puts 'BAD' if not Gem::Dependency.new('$name','$v').match?('$name','$( + ${LOCALBASE}/bin/gem list -e "$name" \ + | sed "s|.*(\(.*\))|\1|" + )')" \ + | ${LOCALBASE}/bin/ruby + ) + if [ "$bad" ]; then + printf 'RubyGem dependency <%s ["%s"]> is not satisfied\n' "$name" "$v" + fi + done <<-EOF + $(while echo "$vers" | grep -q '"'; do + echo "$vers" | cut -d '"' -f2 + vers=$(echo "$vers"|cut -d '"' -f3-) + done) + EOF + done <<-EOF + $(find ${STAGEDIR}${PREFIX} -type f \ + -path '*/specifications/*\.gemspec' \ + -exec grep -a add_runtime_dependency {} + \ + | sed 's|.*<\(.*\)>.*\[\(.*\)\])|\1 \2|') + EOF + ) + if [ "${msg}" ]; then + echo "${msg}" + return 1 + fi + fi +} checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo" checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo" -checks="$checks proxydeps sonames perlcore no_arch" +checks="$checks proxydeps sonames perlcore no_arch gemdeps" ret=0 cd ${STAGEDIR}