[xml/sgml-pkgs] Bug#482140: etch -> lenny upgrade fails, because @INC does not contain 5.10 paths

Agustin Martin agustin.martin at hispalinux.es
Wed Oct 8 18:29:02 UTC 2008


On Wed, Oct 08, 2008 at 09:50:02AM +0200, Raphael Hertzog wrote:
> On Wed, 08 Oct 2008, Damyan Ivanov wrote:
> > -=| Agustin Martin, Wed, Oct 08, 2008 at 12:45:30AM +0200 |=-
> > > I am attaching a fully untested quick and dirty patch, intending to get rid
> > > of File::Spec::Functions by replacing 'catfile' calls. 
> > 
> > File::Spec provides a portable way of creating filesystem paths. Your 
> > patch would break portability.
> 
> Not a big deal I would say. But if it's important then you can always use
> this non-portable function as a fallback only:
> 
> BEGIN {
>     eval 'use File::Spec';
>     if ($@) {
> 	eval q{
> 	    sub catfile { return join("/", @_); }
> 	};
>     }
> }

I like this one, although I guess you mean 'File::Spec::Functions'
instead of 'File::Spec'. 

This script is Debian-only, so full portability is not that important.
But if people strongly thinks otherwise, and 'File::Spec', from perl-base,
is properly available during all the upgrade, using it and
'File::Spec->catfile', like in attached patch, is another approach. 

This, regarding modifications to update-xmlcatalog in the short term. After
lenny this probably needs to be rewritten to work from postinst as Niko
suggests.

However, that is only one part of the problem. The other part is what
happens if docbook-xml is unpacked before new xml-core is unpacked and
before perl-modules is configured. Seems that unpacking is done in
alphabetical order (and seems that people finds this problem in
docbook-xml because it goes early in the alphabetical list), and thus,
docbook-xml goes before xml-core (at least in normal apt-get runs, did
not try with dist-upgrade), and so prerm is run with old xml-core script,
failing. I wonder why this sometimes does not fail.

I am afraid the only way to make sure is following Niko proposal about
pre-dependencies on a newer and fixed xml-core.

-- 
Agustin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: update-xmlcatalog.spec-catfile-method.diff
Type: text/x-diff
Size: 2446 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/debian-xml-sgml-pkgs/attachments/20081008/2b4eefd8/attachment.diff 


More information about the debian-xml-sgml-pkgs mailing list