From: Christian Hofstaedtler Date: Sun, 11 Dec 2011 03:09:06 +0000 (+0100) Subject: Tighten replacement operation for SNAPSHOT class X-Git-Tag: v0.17.1~61 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=9213b27d4652975396f2b01691a27bb48641c735 Tighten replacement operation for SNAPSHOT class Only match not-commented cdn.debian.net URLs. This way SNAPSHOT should only ever affect the repository URL that was the build source. It's still a hack. --- diff --git a/etc/grml/fai/config/scripts/GRMLBASE/33-aptsetup b/etc/grml/fai/config/scripts/GRMLBASE/33-aptsetup index c8c348f..c38a28e 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/33-aptsetup +++ b/etc/grml/fai/config/scripts/GRMLBASE/33-aptsetup @@ -10,8 +10,9 @@ set -e if ifclass SNAPSHOT ; then set -u - debianlist="${target}/etc/apt/sources.list.d/debian.list" - perl -pi -e 's#(deb.* )(.*://.*?)( .*)$#$1http://snapshot.debian.org/archive/debian/'$(date +%Y%m%d)'/$3#' ${debianlist} + perl -pi -e 'BEGIN { $d="'$(date +%Y%m%d)'"; } s#^(\s+)(deb.* )(.*://cdn.*?)( + .*)$#$1$2http://snapshot.debian.org/archive/debian/$d/$4#' \ + "${target}/etc/apt/sources.list.d/debian.list" fi ## END OF FILE #################################################################