parsing changelog
I'm updating my packages to gnat-4.6.
Part of my process is to run tests using the installed packages.
So, for the aunit package, I have a shell script like this:
#!/bin/bash
#
# install libaunit package (normally in the chroot that just built it),
# and run test using it.
# usage
# cd libaunit-<version>/debian
# debversion=*; sudo schroot ./test_installed.sh
# This re-installs the latest version.
sudo dpkg --install ../../libaunit3_1.03-${debversion}_i386.deb
sudo dpkg --install ../../libaunit1-dev_1.03-${debversion}_i386.deb
# tmp is owned by root; we need write permission
sudo chmod o+w tmp
rm -rf tmp/aunit_test
gnatmake -p -Paunit_test
tmp/aunit_test/harness
# end of file
Now I'm trying to compute the 'debversion' value in the rules file, to
fully automate this. 'debversion' is in changelog, so I start with
dpkg-parsechanglog, then use sed:
export debversion := $(shell dpkg-parsechangelog | sed -n -e "s/^Version: [0123456789.]+-\([0123456789]+\)$$/\1/p")
However, this doesn't work; 'debversion' is always a null string.
This is based on a similar expression for soversion, that does work:
soversion := $(shell sed -n -e "s/^Package: libaunit\([0123456789]\+\)$$/\1/p" debian/control)
(This is not in the current aunit package rules file; it is in the
current opentoken package rules file)
A related question: when I run the sed command for soversion in a bash
shell under emacs, it prints nothing. Which is very puzzling, and makes
this very hard to debug.
Any hints would be appreciated.
--
-- Stephe
Reply to: