Rt-importer in 4.2.2 with a typo?

Hi,

I was trying to migrate from mysql to pgsql with a 4.2.2 installation.

The 4.2.2 installation ran just fine.

I then had to run ./configure again with --with-db-type=Pg to get the
missing dependencies via ‘make fixdeps’.

I then ran rt-serializer --clone --directory /root/rt422-mysql/
which completed just fine after bumping up the VM to 2gigs of memory

Next up I prepared the pgsql database:

rt-setup-database --action=create,acl,schema
#as per documentation, no action=init for a clone

Now I tried to import that:

rt-importer /root/rt422-mysql/

However, this almost immediately fails with:

[11764] [Mon Feb 10 18:12:01 2014] [warning]:
Can’t read /root/rt422-mysql/root/rt422-mysql/001.dat: No such file or
directory at /opt/rt4/sbin/…/lib/RT/Migrate/Importer/File.pm line 102.
(/opt/rt4/sbin/…/lib/RT/Migrate/Importer/File.pm:97)

As you can see it doubles the path because its looking for 001.dat in
the wrong place. Is this a typo somewhere within the rt-importer script
or did I do something wrong?

Kind regards,
ms

Now I tried to import that:

rt-importer /root/rt422-mysql/

However, this almost immediately fails with:

[11764] [Mon Feb 10 18:12:01 2014] [warning]:
Can’t read /root/rt422-mysql/root/rt422-mysql/001.dat: No such file or
directory at /opt/rt4/sbin/…/lib/RT/Migrate/Importer/File.pm line 102.
(/opt/rt4/sbin/…/lib/RT/Migrate/Importer/File.pm:97)

Sounds like the bug fixed in this branch, which should get merged down
for 4.2.3, but you can patch it in manually (or use a relative path
for now).

https://github.com/bestpractical/rt/compare/4.2;importer-abs-paths

-kevin