--- trunk/mage/usr/lib/mage/pkg_all_sources.sh 2012/01/13 18:31:48 1641 +++ trunk/mage/usr/lib/mage/pkg_all_sources.sh 2012/01/13 18:37:52 1642 @@ -1,7 +1,14 @@ #!/bin/bash # build all source packages for given distribution -if [[ $(id -u) != 0 ]] +: ${MAGERC="/etc/mage.rc"} + +source /etc/mage.rc.global +source ${MAGERC} +source ${MLIBDIR}/mage4.functions.sh +source ${MLIBDIR}/smage2.functions.sh + +if ! have_root_privileges then echo "You must be r00t" exit 1 @@ -15,11 +22,6 @@ exit 1 fi -source /etc/mage.rc.global -source /etc/mage.rc - -sminclude() { true; } - blacklisted() { local EXCLUDED="${MROOT}/etc/mage-profile/package.blacklist-${ARCH}-${DISTRI}" @@ -29,7 +31,7 @@ local SMAGEFILE="$1" - source ${SMAGEFILE} + smagesource ${SMAGEFILE} local EXPCAT EXPNAME EXPVER EXPBUILD while read EXPCAT EXPNAME EXPVER EXPBUILD @@ -40,20 +42,20 @@ esac # exclude full pver - if [[ -n ${PCATEGORIE} ]] && [[ -n ${PNAME} ]] && + if [[ -n ${PCAT} ]] && [[ -n ${PNAME} ]] && [[ -n ${EXPCAT} ]] && [[ -n ${EXPNAME} ]] && [[ -n ${PVER} ]] && [[ -n ${PBUILD} ]] && [[ -n ${EXPVER} ]] && [[ -n ${EXPBUILD} ]] then - [[ ${EXPCAT}/${EXPNAME}-${EXPVER}-${EXPBUILD} = ${PCATEGORIE}/${PNAME}-${PVER}-${PBUILD} ]] && return 1 + [[ ${EXPCAT}/${EXPNAME}-${EXPVER}-${EXPBUILD} = ${PCAT}/${PNAME}-${PVER}-${PBUILD} ]] && return 1 fi # exclude pcat/pname only - if [[ -n ${PCATEGORIE} ]] && [[ -n ${PNAME} ]] && + if [[ -n ${PCAT} ]] && [[ -n ${PNAME} ]] && [[ -n ${EXPCAT} ]] && [[ -n ${EXPNAME} ]] && [[ -z ${EXPVER} ]] && [[ -z ${EXPBUILD} ]] then - [[ ${EXPCAT}/${EXPNAME} = ${PCATEGORIE}/${PNAME} ]] && return 1 + [[ ${EXPCAT}/${EXPNAME} = ${PCAT}/${PNAME} ]] && return 1 fi done << EOF $(cat ${EXCLUDED}; echo)