From a2d1f4d2a6cb4acbab5c299e4ccc6d8c8ffc8603 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Sun, 11 Oct 2015 23:31:56 +0000 Subject: debian/pbuilder.config: fix detection of mirror through /etc/apt/sources.list.d/* at install time Now it supports * all files ending with *.list (before we checked *.sources.list) * multiple files Thanks: jre for the patch Closes: 772062 Gbp-Dch: Short --- debian/pbuilder.config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/pbuilder.config b/debian/pbuilder.config index 4d2fe4b..b07a40d 100755 --- a/debian/pbuilder.config +++ b/debian/pbuilder.config @@ -60,7 +60,9 @@ EOF SRCLISTDIR=/etc/apt/sources.list.d MIRRORSITE=$( ( [ -f /etc/apt/sources.list ] && cat /etc/apt/sources.list || true ; - [ -f $SRCLISTDIR/*.sources.list ] && cat $SRCLISTDIR/*.sources.list || true ) \ + for FILE in $(ls $SRCLISTDIR/*.list 2>/dev/null); do + [ ! -f "$FILE" ] || cat "$FILE"; + done || true ) \ | grep -E '^deb[[:space:]]+(ftp|http):' | head -n 1 | awk '{print $2;}' ) while [ -z "$MIRRORSITE" ] ; do -- cgit v1.2.3