[PATCH] Allow arbitrary whitespace in sources.list. Ref: #598316

Matt Palmer mpalmer at hezmatt.org
Mon Dec 13 06:04:45 UTC 2010


An overly restrictive regex means that people who like very neat
sources.list files get penalised.  Not any more.
---
 debian/pbuilder.config |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/debian/pbuilder.config b/debian/pbuilder.config
index 2e50015..d98f5f6 100755
--- a/debian/pbuilder.config
+++ b/debian/pbuilder.config
@@ -67,7 +67,7 @@ EOF
             MIRRORSITE=$(
                 ( [ -f /etc/apt/sources.list ] && cat /etc/apt/sources.list || true ;
                   [ -f $SRCLISTDIR/*.sources.list ] && cat $SRCLISTDIR/*.sources.list || true ) \
-                | grep -E '^deb (ftp|http):' | head -n 1 | awk '{print $2;}'
+                | grep -E '^deb[[:space:]]+(ftp|http):' | head -n 1 | awk '{print $2;}'
                 )
             while [ -z "$MIRRORSITE" ] ; do
                 db_input high pbuilder/nomirror || true
-- 
1.5.6.5


--yEPQxsgoJgBvi8ip
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0002-Fix-typo-in-pbuilder.config-comment.-Ref-598316.patch"



More information about the Pbuilder-maint mailing list