From: S.Çağlar Onur Date: Thu, 14 Jan 2010 22:41:50 +0000 (+0000) Subject: Fix the regex else vtest-init-vserver.sh generates following file X-Git-Tag: 4.3-rc16~13 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6b90efd88093c9dd55453f22884e066be5377c51;hp=05eef1196fa9a6843b2f11ba376bf82f47712d72;p=build.git Fix the regex else vtest-init-vserver.sh generates following file # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the exclude=kernel kernel-vserver kernel-devel kernel-headers kernel-debuginfo util-vserver* iptables iproute drupal inotify-tools* libnl # remarked out baseurl= line instead. # # [...] and fails; [...] Loaded plugins: fastestmirror Config Error: File contains no section headers. file: file://///etc/yum.repos.d/CentOS-Base.repo, line: 9 'exclude=kernel kernel-vserver kernel-devel kernel-headers kernel-debuginfo util-vserver* iptables iproute drupal inotify-tools* libnl\n' ++ failure ++ echo 'vtest-init-vserver.sh : Bailing out' vtest-init-vserver.sh : Bailing out ++ exit 1 --- diff --git a/build.common b/build.common index 3d227982..172cee25 100644 --- a/build.common +++ b/build.common @@ -731,6 +731,6 @@ function yumconf_exclude () { repo=$1; shift kexclude_line="$1" ; shift - sed -i -e "/baseurl=.*$/i\\ + sed -i -e "/#baseurl=.*$/i\\ $kexclude_line" $repo }