Bug#514656: pbuilder: does not handle comments in debian/control correctly
Adeodato Simó
dato at net.com.org.es
Mon Feb 9 22:03:31 UTC 2009
Package: pbuilder
Version: 0.185
Severity: important
Tags: patch
Hello,
I don't use pbuilder myself, but a user who tried to build one of my
packages reported this problem to me, and after inspection I think it is
a bug in pbuilder.
The involved package is amule, which used to have a debian/control in
the form of:
-8<-
Source: amule
...
Build-Depends:
autotools-dev,
debhelper,
quilt,
##
libwxgtk2.8-dev,
etc
-8<-
With this, pbuilder died for this user with:
dpkg-deb: parse error, in file
`/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy/DEBIAN/control'
near line 7 package `pbuilder-satisfydepends-dummy':
`Depends' field, invalid package name `##': must start with an alphanumeric
It was pointed out to me that such use of the '#' character in
debian/control is not correct: according to deb-control(5), comments
are allowed, but the hash character must not be preceded by whitespaced.
Hence, I fixed my debian/control to read:
-8<-
Source: amule
...
Build-Depends:
autotools-dev,
debhelper,
quilt,
##
libwxgtk2.8-dev,
etc
-8<-
But the error persisted. I would say that it's get_control_re() fault,
that does not support comments. Adding this to that function should
work:
cat "$control" |
awk '
BEGIN { source=1 }
/^$/ { source=0 }
/^Source:/ { source=1 }
/^[^ ]*:/ { p=0 }
+ /^#/ { next }
tolower($0) ~ /^'"$re"':/ { p=1 }
{ if (p && source) { print $0 } }' |
sed 's/^[^: ]*://'
I've CC'ed in this bug to the user that had this problem. Maybe he can
confirm whether this patch fixes the issue for him.
Thanks,
--
Adeodato Simó dato at net.com.org.es
Debian Developer adeodato at debian.org
- You look beaten.
- I just caught Tara laughing with another man.
- Are you sure they weren't just... kissing or something?
- No, they were laughing.
-- Denny Crane and Alan Shore
More information about the Pbuilder-maint
mailing list