--- trunk/mage-buildserver/buildserver-compile-smage.sh 2014/08/10 19:33:52 2729 +++ trunk/mage-buildserver/buildserver-compile-smage.sh 2014/08/10 19:35:40 2730 @@ -59,6 +59,7 @@ for arch in ${BUILD_ARCH[*]} do echo "SMAGEFILE=\"${SMAGEFILE}\"" > ${BUILDROOT}/${arch}/.runrc + echo "BUILDSERVER_CONFIG_DIR=\"${BUILDSERVER_CONFIG_DIR}\"" >> ${BUILDROOT}/${arch}/.runrc cat >> ${BUILDROOT}/${arch}/.runrc << "EOF" env-rebuild source /etc/profile @@ -201,7 +202,7 @@ done echo "----------------------" -echo "DEBUG: paused"; read +#echo "DEBUG: paused"; read # override packages path SAVED_PKGDIR="${PKGDIR}" @@ -279,22 +280,28 @@ pcat="$(magename2pcat ${pkg})" pver="$(magename2pver ${pkg})" pbuild="$(magename2pbuild ${pkg})" - if is_installed ${pcat}/${pname}-${pver}-${pbuild} + if [ -f ${BUILDSERVER_CONFIG_DIR}/protected/${pname} ] then - if [[ -z ${uninstall_list} ]] + echo "'${pcat}/${pname}-${pver}-${pbuild}' is protected - ignoring" + else + if is_installed ${pcat}/${pname}-${pver}-${pbuild} then - uninstall_list="${pcat}/${pname}-${pver}-${pbuild}" + if [[ -z ${uninstall_list} ]] + then + uninstall_list="${pcat}/${pname}-${pver}-${pbuild}" + else + uninstall_list="${uninstall_list} ${pcat}/${pname}-${pver}-${pbuild}" + fi else - uninstall_list="${uninstall_list} ${pcat}/${pname}-${pver}-${pbuild}" + echo "'${pcat}/${pname}-${pver}-${pbuild}' not installed - ignoring" + fi + + if [[ -n ${uninstall_list} ]] + then + uninstall_packages "${uninstall_list}" || die "cleaning buildroot: ${pkg}" + else + echo "uninstall_list is empty for pkg '${pcat}/${pname}-${pver}-${pbuild}' - doing nothing" fi - else - echo "'${pcat}/${pname}-${pver}-${pbuild}' not installed - ignoring" - fi - if [[ -n ${uninstall_list} ]] - then - uninstall_packages "${uninstall_list}" || die "cleaning buildroot: ${pkg}" - else - echo "uninstall_list is empty for pkg '${pcat}/${pname}-${pver}-${pbuild}' - doing nothing" fi done