--- trunk/mage/usr/lib/mage/smage2.sh 2011/12/28 10:41:44 1573 +++ trunk/mage/usr/lib/mage/smage2.sh 2011/12/28 10:51:52 1577 @@ -325,7 +325,6 @@ src_prepare() { echo "no src_prepare defined" - sleep 2 return 0 } @@ -333,7 +332,13 @@ src_compile() { echo "no src_compile defined" - sleep 2 + return 0 +} + +# dummy function, used if that does not exist in smage file +src_check() +{ + echo "no src_check defined" return 0 } @@ -341,7 +346,6 @@ src_install() { echo "no src_install defined" - sleep 2 return 0 } @@ -1447,6 +1451,7 @@ # fixes some issues with these functions export -f src_prepare || die "src_prepare export failed" export -f src_compile || die "src_compile export failed" +export -f src_check || die "src_check export failed" export -f src_install || die "src_install export failed" # fixes some compile issues @@ -1464,9 +1469,6 @@ # setup ccache [[ ${SMAGE_USE_CCACHE} = true ]] && setup_ccache_environment -# small sleep to show our settings -sleep 1 - # clean up builddir if a previously one exist if [ -d ${BUILDDIR} ] then @@ -1493,12 +1495,6 @@ rm -rf ${BUILDDIR}/${PKGNAME} fi -# cleans up timestamp if one exists -if [ -f /var/tmp/timestamp ] -then - mage rmstamp -fi - # setup build logging [[ ! -d /var/log/smage ]] && install -d /var/log/smage echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log @@ -1511,6 +1507,17 @@ die_pipestatus 0 "src_compile failed" step_by_step $_ +# only run checks if requested +if [[ ${MAGE_CHECK} != true ]] +then + echo "MAGE_CHECK not requested; src_check() will not be run!" | ${SMAGE_LOG_CMD} + step_by_step src_check +else + src_check | ${SMAGE_LOG_CMD} + die_pipestatus 0 "src_check failed" + step_by_step $_ +fi + # build several subpackages if [[ -n ${SPLIT_PACKAGES} ]] then