Index: Mk/Scripts/qa.sh =================================================================== --- Mk/Scripts/qa.sh +++ Mk/Scripts/qa.sh @@ -822,10 +822,45 @@ return $rc } +gemdeps() +{ + local msg + if [ "${PKGBASE%%-*}" = "rubygem" ]; then + while read -r l; do + if [ -n "${l}" ]; then + name=${l%% *} + vers=${l#* } + while read -r v; do + while read -r p; do + ${LOCALBASE}/bin/ruby -e "puts 'OK' if Gem::Dependency.new('${name}','${v}').match?('${name}','${p}')" + done <<-EOF | grep -qFx OK || msg="${msg}RubyGem dependency (${name} ["${v}"]) is not satisfied\n" + $(${LOCALBASE}/bin/gem list -e "${name}" \ + | sed "s|.*(\(.*\))|\1|" \ + | tr -d ' ' \ + | tr , '\n') + EOF + done <<-EOF + $(while echo "${vers}" | grep -q '"'; do + echo "${vers}" | cut -d '"' -f2 + vers=$(echo "${vers}"|cut -d '"' -f3-) + done) + EOF + fi + done <<-EOF + $(grep -a 'add_dependency' ${STAGEDIR}${PREFIX}/lib/ruby/gems/*/specifications/${PKGBASE#rubygem-}*.gemspec \ + | sed 's|.*<\(.*\)>.*\[\(.*\)\])|\1 \2|' \ + | sort -u) + EOF + if [ -n "${msg}" ]; then + printf "${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}