-# on fedora 8 or above, we use libnl from the stock repos
-# on centos5 we build it locally
-function pl_getKexcludes () {
- distroname=$1; shift
- case $distroname in
- ### assuming all distros run at least 2.6.32
- f*)
- echo 'kernel* util-vserver* iptables iptables-ipv6 iproute drupal' ;;
- centos5)
- echo 'kernel kernel-vserver kernel-devel kernel-headers kernel-debuginfo util-vserver* iptables iproute drupal inotify-tools* libnl' ;;
- sl*)
- echo 'kernel kernel-debug kernel-debug-devel kernel-devel kernel-doc kernel-firmware kernel-headers iptables iproute' ;;
- *)
- echo "pl_DISTRO_NAME=$pl_DISTRO_NAME not supported in getexcludes.sh" ; exit 1 ;;
- esac
+# yum exclusions are now defined in yumexclude.pkgs
+# so they can now depend both on the linux distro and the pl distro
+function pl_yumexclude () {
+ keyword=$1; shift
+ fcdistro=$1; shift
+ pldistro=$1; shift
+ builddir=$1; shift
+ # search for file "yumexclude.pkgs"
+ yumexclude_file=$(pl_locateDistroFile $builddir $pldistro "yumexclude.pkgs")
+ #
+ # check if pkgs.py is in PATH
+ type -p pkgs.py >& /dev/null || export PATH=$builddir:$PATH
+
+ # parse it
+ pl_parsePkgs $keyword $fcdistro $pldistro $yumexclude_file || \
+ { echo pl_yumexclude failed with fcdistro=$fcdistro and pldistro=$pldistro; return 1 ; }