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

Raphael Hertzog hertzog at debian.org
Wed Oct 8 07:50:02 UTC 2008


On Tue, 07 Oct 2008, Daniel Leidert wrote:
> Remove the `|| true' statements in /var/lib/dpkg/info/docbook-xml.prerm
> and add an `set -ex' at the top and you will get the error doing:

A prerm cannot rely on packages being configured unless you predepend on
them. But predependencies are to be avoided. Ideally you only use stuff
from Essential in such scripts or you have sane fallback in case you
encounter problems.

> Pre-Depends: perl, perl-modules
> 
> for xml-core and I hope, it works. But I'm not sure. What is your
> opinion?

It should work but I wouldn't go for this solution. See below.

On Wed, 08 Oct 2008, Damyan Ivanov wrote:
> -=| Agustin Martin, Wed, Oct 08, 2008 at 12:45:30AM +0200 |=-
> > Looking at /usr/sbin/update-xmlcatalog, seems that only
> > File::Spec::Functions function used is 'catfile' whose calls should be
> > pretty simple to replace,
> > 
> > >From File::Spec::Unix (where File::Spec::Functions points to)
> > 
> > catfile Concatenate one or more directory names and a filename to form
> >         a complete path ending with a filename
> > 
> > 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("/", @_); }
	};
    }
}

Cheers,
-- 
Raphaël Hertzog

Le best-seller français mis à jour pour Debian Etch :
http://www.ouaza.com/livre/admin-debian/





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