Package: pbuilder
Version: 0.215
Severity: normal
Tags: patch
Dear pbuilder maintainers and authors
To detect the default MIRRORSITE during installation, pbuilder also uses
files in /etc/apt/sources.list.d/.
Issue 1: *.sources.list instead of *.list
------------------------------------------
pbuilder requires them to end in *.sources.list. But sources.list(5)
nowadays states "File names need to end with .list [...]".
So pbuilder is to restrictive in selecting valid files here.
(Yes, the shorter suffix works with apt, I am using it.)
Issue 2: Only one file supported
--------------------------------
With multiple files in /etc/apt/sources.list.d/ I get:
Preconfiguring packages ...
/tmp/pbuilder.config.r1aFEU: 63: [:
/etc/apt/sources.list.d/debian.experimental.sources.list: unexpected
operator
Selecting previously unselected package pbuilder.
and debconf says:
"Configuring pbuilder.
Default mirror not found
Mirror information detection failed and the user provided no mirror
information.
Please enter valid mirror information."
Please find attached a patch which fixes both issues.
I successfully tested it with:
- empty /etc/apt/sources.list.d/
- multiple *.list files in /etc/apt/sources.list.d/
Thanks for pbuilder and all your work!
jre
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (900, 'testing'), (300, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.16-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages pbuilder depends on:
ii coreutils 8.23-3
ii debconf [debconf-2.0] 1.5.54
ii debianutils 4.4+b1
ii debootstrap 1.0.64
ii dpkg-dev 1.17.21
ii wget 1.16-1
Versions of packages pbuilder recommends:
ii devscripts 2.14.10
ii fakeroot 1.20.2-1
ii sudo 1.8.10p3-1
Versions of packages pbuilder suggests:
ii cowdancer 0.73
ii gdebi-core 0.9.5.5+nmu1
pn pbuilder-uml <none>
-- debconf information:
pbuilder/mirrorsite: http://http.debian.net/debian/
pbuilder/nomirror:
pbuilder/rewrite: false
diff --git a/debian/pbuilder.config b/debian/pbuilder.config
index e07db08..61c2391 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