[Piuparts-devel] Bug#431248: piuparts: AssertionError

John Wright john at movingsucks.org
Wed Jul 4 16:51:53 UTC 2007


On Wed, Jul 04, 2007 at 06:09:43PM +0200, Ana Guerrero wrote:
> On Sun, Jul 01, 2007 at 04:45:44PM +1000, Aníbal Monsalve Salazar wrote:
> > I'm getting the following messages after upgrading piuparts today:
> > 
> > Traceback (most recent call last):
> >   File "/usr/sbin/piuparts", line 1232, in ?
> >     main()
> >   File "/usr/sbin/piuparts", line 1217, in main
> >     if install_and_upgrade_between_distros(args, packages):
> >   File "/usr/sbin/piuparts", line 936, in install_and_upgrade_between_distros
> >     root_info = chroot.save_meta_data()
> >   File "/usr/sbin/piuparts", line 621, in save_meta_data
> >     assert dirpath[:4] == root
> > AssertionError
> >
> 
> This bug is caused by m4. From piuparts-0.21/Makefile :
> 
> piuparts.py: piuparts.py.in
>     m4 -D __PIUPARTS_VERSION__=$$(dpkg-parsechangelog | grep ^Version: \
> 	    | cut -d' ' -f2) < $< > $@
> 
> m4 not only replaces __PIUPARTS_VERSION__ for the current version, it makes
> another weird substitutions in the piuparts.py that triggers this problem.
> [1]. If somebody speaks m4 and know what this happens please share it :D
> 
> So John, if you do not mind, i'm going to drop m4 and just use sed to make 
> this substitution :)

Yikes!  Yes, sed is fine with me...  Or, to keep using m4, we could use
the "-P" option, which forces m4 builtins (of which, apparently, len is
one) to be prefixed with "m4_".  Sorry about that.

John



More information about the Piuparts-devel mailing list