return 0
}
-# vserver expects something like fc4 or f7
+# vserver expects something like f8 or centos5
function pl_getReleaseName () {
distro=$1; shift
release=$1; shift
case $distro in
[Ff]edora*)
- if [ "$release" -le 6 ] ; then
- releasename=fc$release
- else
- releasename=f$release
- fi ;;
+ releasename=f$release
+ ;;
[Cc]entOS*)
old_IFS="$IFS"
IFS="."
return 0
}
+function pl_getKexcludes () {
+ distroname=$1; shift
+ case $distroname in
+ f*)
+ echo 'kernel* util-vserver* iptables iproute inotify-tools* libnl*'
+ ;;
+ centos*)
+ echo 'kernel* util-vserver* iptables iproute inotify-tools* libnl*'
+ ;;
+ *)
+ echo "pl_DISTRO_NAME=$pl_DISTRO_NAME not supported in getexcludes.sh"
+ ;;
+ esac
+}
+
# figure out which redhat distro we are using (fedora, centos, redhat)
pl_DISTRO=$(pl_getDistro)
# the release number (plain number)
pl_DISTRO_RELEASE=$(pl_getRelease)
-# the release name - for vserver build - like fc4, f8 or centos4
+# the release name - for vserver build ...
pl_DISTRO_NAME=$(pl_getReleaseName $pl_DISTRO $pl_DISTRO_RELEASE)
+# the packages to exclude
+pl_KEXCLUDES=$(pl_getKexcludes $pl_DISTRO_NAME)
+
# get path to appropriate yumgroups.xml file
# Thierry: quick & dirty improvement
-# this file is updated by the toplevel build, from groups/<pldistro>.xml
+# this file is updated by the toplevel build, from the .pkgs files
pl_DISTRO_YUMGROUPS="../../../RPMS/yumgroups.xml"
function pl_process_fedora_options () {
basearch=$pl_DISTRO_ARCH
# Get options
-### mirrors=""
-### while getopts "l:r:a:vh" opt ; do
while getopts "vh" opt ; do
case $opt in
-### l) mirrors="$mirrors $OPTARG" ;;
-### r) releasever=$OPTARG ;;
-### a) basearch=$OPTARG ;;
v) verbose=1; set -x ;;
h|*) mkfedora_usage ;;
esac
fcdistro=${pl_DISTRO_NAME}
pkgs_packages=$(pl_parsePkgs package $fcdistro $pldistro $pkgsfile)
pkgs_groups=$(pl_parsePkgs group $fcdistro $pldistro $pkgsfile)
- # packages to exclude - obsolete, was maybe useful when installing a group
+ # packages to exclude
pkgs_excludes=$(pl_parsePkgs exclude $fcdistro $pldistro $pkgsfile)
+ # what can get trashed to save space
pkgs_junk=$(pl_parsePkgs junk $fcdistro $pldistro $pkgsfile)
+ # but not this
pkgs_precious=$(pl_parsePkgs precious $fcdistro $pldistro $pkgsfile)
- # formerly related to mkfedora -k
- pkgs_kexcludes=$(pl_parsePkgs kexclude $fcdistro $pldistro $pkgsfile)
+ # formerly related to mkfedora -k : packages to take from our own build
+ # and thus need be excluded frem the stock repos
+ pkgs_kexcludes="$pl_KEXCLUDES"
# get mirrors if not specified with -l
if [ -z "$mirrors" ] ; then
mirrorsfile=$(pl_locateDistroFile ../build/ $pldistro "$pldistro.mirrors")