Index: Mk/Scripts/qa.sh =================================================================== --- Mk/Scripts/qa.sh +++ Mk/Scripts/qa.sh @@ -822,10 +822,44 @@ return $rc } +# If an non rubygem-port has a 'Gemfile' file +# it is checked with bundle to be sure +# all dependencies are satisfied. +# Without the check missing/wrong dependencies +# are just found when executing the application +gemfiledeps() +{ + # check is only done for non rubygem-* ports + if [ "${PKGBASE%%-*}" != "rubygem" ]; then + # locate the Gemfile(s) + while read -r GemfilePath; do + + # No results presents a blank line from heredoc. + [ -z "GemfilePath" ] && continue + + # if there is none everything is fine - stop here + [ ! -f "GemfilePath" ] && return 0; + + # use bundle to check if Gemfile is satisfied + bundle check --dry-run --gemfile GemfilePath + + # if bundle returns 1 the Gemfile is not satisfied + # and so stage-qa isn't also + if [ $? -eq 1 ]; then + return 1; + fi + + done <<-EOF + $(find ${STAGEDIR} -name Gemfile) + EOF + fi + return 0 +} + 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 gemfiledeps" ret=0 cd ${STAGEDIR}