* gregor herrmann <gre...@debian.org>, 2012-10-22, 18:43:
-kjb_version=1:$${source:Version}
+kjb_version=1:$(shell dpkg-parsechangelog | sed -n 's/Version: //p')

The "Version: " string could occur in the changelog, causing a little explosion:

$ dch --bin-NMU 'I added Version: here to break this package'
$ dpkg-buildpackage -B
[...]
dh_gencontrol -a -- -v'1:1.0.0-15.1+b1    * I added here to break this package'
dh_md5sums -a
dh_builddeb -a
dpkg-deb: error: parsing file 'debian/python-kjbuckets/DEBIAN/control' near 
line 3 package 'python-kjbuckets':
error in Version string '1:1.0.0-15.1+b1    * I added here to break this 
package': version string has embedded spaces
dh_builddeb: dpkg-deb --build debian/python-kjbuckets .. returned exit code 2
make: *** [binary-arch] Error 1

Oops. Nice catch, thanks.

I greppd through a couple of source packages, and I found all kind of interesting regexps for this case. But I think anchoring the regexp at the beginning of the string should be enough?

dpkg-parsechangelog | sed -n 's/^Version: //p'

Yes, this one should be fine.

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to