--- trunk/mage-buildserver/buildserver-prepare.sh 2014/08/28 09:38:38 2792 +++ trunk/mage-buildserver/buildserver-prepare.sh 2014/08/28 09:42:57 2793 @@ -7,6 +7,9 @@ source ${BUILDSERVER_LIB_DIR}/buildserver-functions.sh +ALL_ARCH_PACKAGES=( subversion openssh ) +NON_SRC_ARCH_PACKAGES=( "${BOOTSTRAP_DEVUTILS}" ccache python scanelf ) + # fallback if [[ -z ${MAGE_PROFILE} ]] then @@ -71,42 +74,19 @@ :> ${BUILDROOT}/${arch}/etc/env.d/00mage-buildserver echo "MAGE_BOOTSTRAP=\"true\"" >> ${BUILDROOT}/${arch}/etc/env.d/00mage-buildserver - # install subversion - if [ ! -f ${BUILDROOT}/.stamps/${arch}_subversion-ok ] - then - runarch "${arch}" mage install subversion || die "${arch} install subversion" - touch ${BUILDROOT}/.stamps/${arch}_subversion-ok - else - echo "Warning: subversion already installed for arch '${arch}'" - fi - - # install openssh - if [ ! -f ${BUILDROOT}/.stamps/${arch}_openssh-ok ] - then - runarch "${arch}" mage install openssh || die "${arch} install openssh" - touch ${BUILDROOT}/.stamps/${arch}_openssh-ok - else - echo "Warning: openssh already installed for arch '${arch}'" - fi + for pkg in ${ALL_ARCH_PACKAGES[*]} + do + runarch-pkg-install "${arch}" "${pkg}" + done + # exclude these pkg from src chroot if [[ ${arch} != src ]] then - if [ ! -f ${BUILDROOT}/.stamps/${arch}_common-devutils-ok ] - then - runarch "${arch}" mage install "${BOOTSTRAP_DEVUTILS}" || die "${arch} install '${BOOTSTRAP_DEVUTILS}'" - touch ${BUILDROOT}/.stamps/${arch}_common-devutils-ok - else - echo "Warning: '${BOOTSTRAP_DEVUTILS}' already installed for arch '${arch}'" - fi + for pkg in ${NON_SRC_ARCH_PACKAGES[*]} + do + runarch-pkg-install "${arch}" "${pkg}" + done - # install ccache - if [ ! -f ${BUILDROOT}/.stamps/${arch}_ccache-ok ] - then - runarch "${arch}" mage install ccache || die "${arch} install ccache" - touch ${BUILDROOT}/.stamps/${arch}_ccache-ok - else - echo "Warning: ccache already installed for arch '${arch}'" - fi # setup ccache if [ ! -f ${BUILDROOT}/.stamps/${arch}_setup-ccache-ok ] then