[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: etch -> lenny upgrade fails, because @INC does not contain 5.10 paths



On Wed, Oct 08, 2008 at 08:29:02PM +0200, Agustin Martin wrote:

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

Me may be lucky and do not need any of this. See below for a possible fix.

On Tue, Oct 07, 2008 at 05:51:20PM +0200, Daniel Leidert wrote:
> Hi all,
> 
> Examining bug #482140 I found, that update-xmlcatalog fails during
> dist-upgrade from Etch to Lenny with an Error, that Functions.pm cannot
> be found in @INC (the same goes for defoma-app, IIRC there Copy.pm was
> not found). The paths in @INC were only the generic paths and the 5.8
> paths, but the 5.10 paths were missing.
> 
> I wonder, how to solve the problem. The problem is reprosucible in my
> pbuilder (Etch-)CHROOT doing:
> 
> apt-get install docbook-xml vim
> apt-get install gnome

Finally reproduced. Do not know what gnome triggers here, probably changes
package installation ordering, causing the error condition. Trying without
gnome installed I could not reproduce the error.

The *good news* are that seems I have a patch to xml-core that makes this
bug not being triggered, at least with gnome. An xml-core package with
the changes is available through

deb http://people.debian.org/~agmartin/debian-store/experimental ./

For inclusion with 'apt-key add', repository is signed with my Debian key,
available from the Debian keyring. It contains a number of changes that
should IMHO, go into xml-core,

* tools/update-xmlcatalog:
  - Use perl-base File::Spec rather than perl-modules File::Spec::Functions.
  - Call catfile as a File::Spec method instead of as a function.
* debian/rules:
  - Pass -d option to dh_perl, we no longer use anything outside perl-base.

This is important, because, unless I am wrong it was the only call to something
outside perl-base. Seems that after the change all perl modules used in
xml-core update-xmlcatalogs

File::Spec
Getopt::Long
vars

are now in perl-base (or in debhelper for Debian::Debhelper::Dh_Lib use in
dh_installxmlcatalogs), so we can drop the dependency on full perl (better
pass -d option to dh_perl, so looks for versioned dependency in perl-base
if any)

*This really needs to be double-checked*, but seems I did not miss any non
perl-base module.

* debian/rules:
  - Make sure auto-generated man pages are removed on clean target.
* tools/update-xmlcatalog:
  - Be more verbose if error is signalled on already registered entity.

As you see above, I added a couple of things in the patch. Make failure a bit
more verbose and remove auto-generated man pages from clean target.

Note that I finally used the File::Spec->catfile way, so full portability is
preserved. 

I am not a perl wizard, so I keep debian-perl cc'ed in case people there
see problems I am missing.

Not sure that this will fix all uses, but seems that at least works well
with the interaction with gnome.

For further checking, and may be (I hope not) to identify other scenarios
for this bug, I am Bcc'ing the people that reported reproducing the bug, in
case they want to try with my package. Sorry if I missed someone.

As told above, my repo is signed with my gpg key, available at the Debian
keyring.

Patch is attached.

-- 
Agustin
diff -Nru xml-core-0.11/debian/changelog xml-core-0.11.0.amd1/debian/changelog
--- xml-core-0.11/debian/changelog	2007-04-16 19:18:15.000000000 +0200
+++ xml-core-0.11.0.amd1/debian/changelog	2008-10-09 19:29:59.000000000 +0200
@@ -1,3 +1,15 @@
+xml-core (0.11.0.amd1) unstable; urgency=low
+
+  * tools/update-xmlcatalog:
+    - Use perl-base File::Spec rather than perl-modules File::Spec::Functions.
+    - Call catfile as a File::Spec method instead of as a function.
+    - Be more verbose if error is signalled on already registered entity.
+  * debian/rules:
+    - Pass -d option to dh_perl, we no longer use anything outside perl-base.
+    - Make sure auto-generated man pages are removed on clean target.
+
+ -- Agustin Martin Domingo <agmartin@debian.org>  Thu, 09 Oct 2008 19:29:59 +0200
+
 xml-core (0.11) unstable; urgency=low
 
   [ Daniel Leidert ]
diff -Nru xml-core-0.11/debian/rules xml-core-0.11.0.amd1/debian/rules
--- xml-core-0.11/debian/rules	2007-04-14 21:40:30.000000000 +0200
+++ xml-core-0.11.0.amd1/debian/rules	2008-10-09 19:28:07.000000000 +0200
@@ -16,6 +16,7 @@
 clean:
 		dh_testdir
 		dh_testroot
+		rm -f tools/update-xmlcatalog.8 debhelper/dh_installxmlcatalogs.1
 		dh_clean
 		rm -f build-stamp install-stamp
 
@@ -47,7 +48,7 @@
 		dh_compress
 		dh_fixperms
 		dh_installdeb
-		dh_perl
+		dh_perl -d
 		dh_gencontrol
 		dh_md5sums
 		dh_builddeb
diff -Nru xml-core-0.11/tools/update-xmlcatalog xml-core-0.11.0.amd1/tools/update-xmlcatalog
--- xml-core-0.11/tools/update-xmlcatalog	2007-04-14 21:43:46.000000000 +0200
+++ xml-core-0.11.0.amd1/tools/update-xmlcatalog	2008-10-09 19:10:55.000000000 +0200
@@ -121,7 +121,7 @@
 use strict;
 
 ## ----------------------------------------------------------------------
-use File::Spec::Functions;
+use File::Spec;
 use Getopt::Long;
 
 ## ----------------------------------------------------------------------
@@ -196,7 +196,7 @@
     {
 	if ( defined( $package ) )
 	{
-	    my $catalog = catfile( $catalog_dir, "$package.xml" );
+	    my $catalog = File::Spec->catfile( $catalog_dir, "$package.xml" );
 	    if ( ! -f $catalog )
 	    {
 		print STDERR "$name: error: package catalog $catalog not found\n";
@@ -261,7 +261,7 @@
 {
     if ( defined( $root ) )
     {
-	my $catalog = catfile( $catalog_dir, 'catalog' );
+	my $catalog = File::Spec->catfile( $catalog_dir, 'catalog' );
 	if ( ! -f $catalog )
 	{
 	    print STDERR "$name: error: root catalog $catalog not found\n";
@@ -275,7 +275,7 @@
     }
     elsif ( defined( $package ) )
     {
-	my $catalog = catfile( $catalog_dir, "$package.xml" );
+	my $catalog = File::Spec->catfile( $catalog_dir, "$package.xml" );
 	if ( ! -f $catalog )
 	{
 	    print STDERR "$name: error: package catalog $catalog not found\n";
@@ -333,8 +333,8 @@
 if ( defined( $root ) )
 {
     $catalog = 'catalog';
-    $catalog_data = catfile( $catalog_data_dir, $catalog );
-    $catalog = catfile( $catalog_dir, $catalog );
+    $catalog_data = File::Spec->catfile( $catalog_data_dir, $catalog );
+    $catalog = File::Spec->catfile( $catalog_dir, $catalog );
     my $start = $type;
     $start .= 'Id' unless $type eq 'uri';
     $start .= 'StartString';
@@ -347,8 +347,8 @@
 }
 elsif ( defined( $package ) )
 {
-    $catalog_data = catfile( $catalog_data_dir, $package );
-    $catalog = catfile( $catalog_dir, "$package.xml" );
+    $catalog_data = File::Spec->catfile( $catalog_data_dir, $package );
+    $catalog = File::Spec->catfile( $catalog_dir, "$package.xml" );
     my $start = $type;
     $start .= 'Id' unless $type eq 'uri';
     $start .= 'StartString';
@@ -364,7 +364,7 @@
     $catalog = $local;
     $catalog_data = $local;
     $catalog_data =~ tr|/|_|;
-    $catalog_data = catfile( $catalog_data_dir, $catalog_data );
+    $catalog_data = File::Spec->catfile( $catalog_data_dir, $catalog_data );
     my $start = ( $type eq 'uri' ) ? 'name' : $type;
     $start .= 'Id' unless $type eq 'uri';
     $id = "$start=\"$id\"";
@@ -415,12 +415,15 @@
     {
 	if ( $catalog{ $key } ne $entry )
 	{
-	    print STDERR "$name: error: entity already registered\n";
+	    print STDERR "$name: Error: entity already registered with a different value\n";
+	    print STDERR " Entity   : [$key]\n";
+	    print STDERR " Old value: [$catalog{$key}]\n";
+	    print STDERR " New value: [$entry]\n";
 	    return;
 	}
 	else
 	{
-	    print STDERR "$name: notice: entity already registered\n"
+	    print STDERR "$name: notice: entity already registered with the same value\n"
 		if $verbose;
 	    return 1;
 	}

Reply to: