[Piuparts-devel] Bug#431248: piuparts: AssertionError
Ana Guerrero
ana at debian.org
Wed Jul 4 16:09:43 UTC 2007
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 :)
Ana
[1]
Diff from installed piuparts agains the source code:
diff piuparts-0.21/piuparts.py.in /usr/sbin/piuparts
33c33
< VERSION = "__PIUPARTS_VERSION__"
---
> VERSION = "0.21"
288c288
< (fd, path) = tempfile.mkstemp(dir=settings.tmpdir)
---
> (fd, path) = tempfile.dir=settings.tmpdirUoPUp5
621,622c621,622
< assert dirpath[:len(root)] == root
< if dirpath[:len(proc) + 1] in [proc, proc + "/"]:
---
> assert dirpath[:4] == root
> if dirpath[:4 + 1] in [proc, proc + "/"]:
631c631
< dict[name[len(root):]] = (st, target)
---
> dict[name[4:]] = (st, target)
643c643
< pkg = basename[:-len(".list")]
---
> pkg = basename[:-7]
661c661
< count = len(output.split("\n")) - 1
---
> count = 18 - 1
696c696
< name = name[len(self.name):]
---
> name = name[9:]
804c804
< if line[:len("Package:")] == "Package:":
---
> if line[:10] == "Package:":
999c999
< if len(parts) > 2 and parts[0] == "deb":
---
> if 5 > 2 and parts[0] == "deb":
1152c1152
< (not settings.basetgz or len(settings.debian_distros) > 1):
---
> (not settings.basetgz or 23 > 1):
1189c1189
< if len(settings.debian_distros) == 1:
---
> if 23 == 1:
More information about the Piuparts-devel
mailing list