This commit is contained in:
Jan Mette 2010-03-21 18:56:42 +00:00
parent 76d35aae64
commit ebddeb904d
2 changed files with 51 additions and 25 deletions

View File

@ -86,30 +86,32 @@ build_it()
if [ "$_build_autoinstall" = "1" ] ; then
# Look for the exact package names :
pushd ${_build_work}/${module} &>/dev/null || exit 1
# pushd ${_build_work}/${module} &>/dev/null || exit 1
#
# # get the pkgnames, different for an array and a bare string
# if [ `grep -e "^pkgname=" PKGBUILD | cut -d'=' -f2 | cut -c1` == "(" ] ; then
# # fetch the array
# _module_names=`pcregrep -M "^pkgname=\(.*(\n.*[^\)\n])*" PKGBUILD | sed s/"^[^\']*"//g | sed s/[^\']$//`
# else
# _module_names=("`grep -e "^pkgname=" PKGBUILD | cut -d'=' -f2`")
# fi
#
# # version and rel
# #_modver=`grep -e "^pkgver=" PKGBUILD | cut -d'=' -f2`
# #_modrel=`grep -e "^pkgrel=" PKGBUILD | cut -d'=' -f2`
#
# popd &>/dev/null
#
# # build a list of packages and install them at once
# _packages_to_install=
# for _m in $_module_names ; do
# #_pkg_full_name=`eval echo $_m-$_modver-$_modrel-*.pkg.*`
# _pkg_full_name=`eval echo $_m-*.pkg.*`
# _packages_to_install="$_packages_to_install $PKGDEST/$_pkg_full_name"
# done
# sudo pacman -Uf $_packages_to_install || exit 1
# get the pkgnames, different for an array and a bare string
if [ `grep -e "^pkgname=" PKGBUILD | cut -d'=' -f2 | cut -c1` == "(" ] ; then
# fetch the array
_module_names=`pcregrep -M "^pkgname=\(.*(\n.*[^\)\n])*" PKGBUILD | sed s/"^[^\']*"//g | sed s/[^\']$//`
else
_module_names=("`grep -e "^pkgname=" PKGBUILD | cut -d'=' -f2`")
fi
# version and rel
#_modver=`grep -e "^pkgver=" PKGBUILD | cut -d'=' -f2`
#_modrel=`grep -e "^pkgrel=" PKGBUILD | cut -d'=' -f2`
popd &>/dev/null
# build a list of packages and install them at once
_packages_to_install=
for _m in $_module_names ; do
#_pkg_full_name=`eval echo $_m-$_modver-$_modrel-*.pkg.*`
_pkg_full_name=`eval echo $_m-*.pkg.*`
_packages_to_install="$_packages_to_install $PKGDEST/$_pkg_full_name"
done
sudo pacman -Uf $_packages_to_install || exit 1
pacman -U _repo/build/${module}*.pkg.*
fi
popd &>/dev/null

View File

@ -54,7 +54,7 @@ increase_pkgrels() {
done
;;
support)
fixit)
title2 "Increasing support pkgrels"
for module in ${whattodo[*]}
do
@ -192,7 +192,31 @@ MODE=`echo $1`
# we take the repo name + the job/stage to reconstruct the variable name
# in $repo_pkgs.cfg and echo its contents... damn, eval is evil ;)
whattodo=($(eval echo "\${_build_${_cur_repo}_${MODE}[@]}"))
if [ "$_cur_repo" = "core" ] ; then
whattodo=($(eval echo "\${_build_core_${MODE}[@]}"))
elif [ "$_cur_repo" = "core-testing" ] ; then
whattodo=($(eval echo "\${_build_core_testing_${MODE}[@]}"))
elif [ "$_cur_repo" = "platform" ] ; then
whattodo=($(eval echo "\${_build_platform_${MODE}[@]}"))
elif [ "$_cur_repo" = "platform-testing" ] ; then
whattodo=($(eval echo "\${_build_platform_testing_${MODE}[@]}"))
elif [ "$_cur_repo" = "desktop" ] ; then
whattodo=($(eval echo "\${_build_desktop_${MODE}[@]}"))
elif [ "$_cur_repo" = "desktop-testing" ] ; then
whattodo=($(eval echo "\${_build_desktop_testing_${MODE}[@]}"))
elif [ "$_cur_repo" = "apps" ] ; then
whattodo=($(eval echo "\${_build_apps_${MODE}[@]}"))
elif [ "$_cur_repo" = "apps-testing" ] ; then
whattodo=($(eval echo "\${_build_apps_testing_${MODE}[@]}"))
fi
increase_pkgrels