aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-10-11 23:31:56 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-10-11 23:31:56 +0000
commita2d1f4d2a6cb4acbab5c299e4ccc6d8c8ffc8603 (patch)
tree0c54bd32e09d74f9ee9953bfa868c7d48900ba37
parent85bd24d9cf9cccac94908d742ee616acd5465fbc (diff)
downloadpbuilder-a2d1f4d2a6cb4acbab5c299e4ccc6d8c8ffc8603.tar
pbuilder-a2d1f4d2a6cb4acbab5c299e4ccc6d8c8ffc8603.tar.gz
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 <jre.winesim@gmail.com> for the patch Closes: 772062 Gbp-Dch: Short
-rwxr-xr-xdebian/pbuilder.config4
1 files changed, 3 insertions, 1 deletions
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