failed to upgrade : "update-xmlcatalog: error: entity already registered"

Bug #256131 reported by Sam Liddicott on 2008-08-08
364
This bug affects 4 people
Affects Status Importance Assigned to Milestone
docbook-xml (Debian)
Fix Released
Unknown
rarian (Ubuntu)
High
Martin Pitt
Intrepid
High
Martin Pitt
xml-core (Ubuntu)
High
Martin Pitt
Intrepid
High
Martin Pitt

Bug Description

Binary package hint: update-manager

I think this was because one of the other sub-packages failed to upgrade, see #256130

ProblemType: Package
Architecture: i386
DistroRelease: Ubuntu 8.10
ErrorMessage: ErrorMessage: SystemError in cache.commit(): E:Sub-process /usr/bin/dpkg returned an error code (1)

NonfreeKernelModules: nvidia ath_hal
Package: update-manager 1:0.93.3
PackageArchitecture: all
SourcePackage: update-manager
Title: package update-manager 1:0.93.3 failed to install/upgrade: ErrorMessage: SystemError in cache.commit(): E:Sub-process /usr/bin/dpkg returned an error code (1)
Uname: Linux 2.6.24-20-generic i686

My first solution:
After Upgrade form Hardy:
sudo aptitude remove rarian-Compat
sudo aptitude install scrolkeeper
sudo aptitude update
(Finish packages not configured Ok)
Then uninstall Scrolkeeper and install rarian-compat)

Sam Liddicott (sam-liddicott) wrote :
Brian Murray (brian-murray) wrote :

Found in apt.log:

Installing nvidia-177-kernel-source as dep of nvidia-glx-177
Installing dkms as dep of nvidia-177-kernel-source
Installing rarian-compat as dep of ubuntu-desktop
Setting NOT as auto-installed (direct dep of pkg in APT::Never-MarkAuto-Section)

Michael Vogt (mvo) wrote :

Here is the error:

Setting up rarian-compat (0.8.0-1ubuntu2) ...
update-xmlcatalog: error: entity already registered
dpkg: error processing rarian-compat (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of capplets-data:
 capplets-data depends on scrollkeeper; however:
  Package scrollkeeper is not installed.
  Package rarian-compat which provides scrollkeeper is not configured yet.
dpkg: error processing capplets-data (--configure):
 dependency problems - leaving unconfigured

I reassign to rarian-compat

Cyberax (alex-besogonov) wrote :

This bug broke upgrade from Hardy to Intrepid. Please, fix it.

The problem is in this strings in postinst script:

update-xmlcatalog --add --type uri --id "http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/" --package rarian-compat --local /usr/share/xml/scrollkeeper/dtds/catalog.xml
update-xmlcatalog --add --type uri --id "http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/" --package rarian-compat --root

Changed in rarian:
importance: Undecided → Low
Ori Avtalion (salty-horse) wrote :

If ubuntu-desktop depends on this package, shouldn't the importance be higher than Low?

Ori Avtalion (salty-horse) wrote :

During my upgrade from Hardy to Intrepid, I also received the "entity already registered" error Michael reported.
After the upgrade aborted, I downloaded the 0.8.1-1ubuntu1 package, installed manually with dpkg, and it worked fine. All dependencies could then be resolved.

Jean-Baptiste Lallement (jibel) wrote :

confirming this issue with one more report. Cf bug 274226

Changed in rarian:
status: New → Confirmed
Taylor Braun-Jones (nocnokneo) wrote :

This was also a show stopper for me upgrading from hardy to intrepid. as Ori notes, I was able to get past it by downloading rarian-compat_0.8.1-1ubuntu1_amd64.deb from http://packages.ubuntu.com but this would be a complete show stopper for the average user. Seems like it should be at least priority 'High'

The same happened here when upgrading from hardy to intrepid beta.
It left me with an unusable system.
I followed trjonescp instructions, then ran dpkg --configure -a
Everything seems to work ok now.

Can anyone with this issue provide the file /etc/xml/catalog from *hardy* (before the upgrade) ?

Thanks in advance.

AndrewJ (andrew-jonsson) wrote :

Also broke my gnome when trying to upgrade to the beta. =(

JB: Is this what you are searching for?

Thanks Andrew.

Here is what's happening:
- The scrollkeeper entry should unregistered in scrollkeeper prerm script.
- But for some reason the call to update-xmlcatalog fails with the following perl error:

Removing scrollkeeper ...
Can't locate File/Spec/Functions.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/sbin/update-xmlcatalog line 124.
BEGIN failed--compilation aborted at /usr/sbin/update-xmlcatalog line 124.
Can't locate File/Spec/Functions.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/sbin/update-xmlcatalog line 124.
BEGIN failed--compilation aborted at /usr/sbin/update-xmlcatalog line 124.

- Then, the call to update-xmlcatalog during rarian installation fails because it can't register the same entity for different packages.

Now we have to find out why it can't locate Functions.pm

If, by chance, someone has a version of hardy before the upgrade, can you please provide the output of the following commands :
- dpkg -S Functions.pm
- apt-cache policy perl-modules

Thanks.

Changed in rarian:
importance: Low → High
milestone: none → ubuntu-8.10
Matt Zimmerman (mdz) on 2008-10-06
Changed in rarian:
status: Confirmed → Triaged
Charles Curley (charlescurley) wrote :

root@dragon:~# dpkg -S Functions.pm
perl-modules: /usr/share/perl/5.8.8/Pod/Functions.pm
perl-modules: /usr/share/perl/5.8.8/File/Spec/Functions.pm
root@dragon:~# apt-cache policy perl-modules
perl-modules:
  Installed: 5.8.8-12
  Candidate: 5.8.8-12
  Version table:
 *** 5.8.8-12 0
        500 http://mirrors.xmission.com hardy/main Packages
        100 /var/lib/dpkg/status
root@dragon:~# uname -a
Linux dragon 2.6.24-19-generic #1 SMP Wed Aug 20 22:56:21 UTC 2008 i686 GNU/Linux
root@dragon:~#

This on a 8.04 system as upgraded.

Charles Curley (charlescurley) wrote :

On 8.04 as upgraded:

root@dragon:~# locate Functions.pm
/usr/share/perl/5.8.8/File/Spec/Functions.pm
/usr/share/perl/5.8.8/Pod/Functions.pm
root@dragon:~#

On 8.10 as upgraded:

root@grissom:~/gpsdrive-2.10pre6/build# locate Functions.pm
/usr/share/perl/5.10.0/File/Spec/Functions.pm
/usr/share/perl/5.10.0/Pod/Functions.pm
/usr/share/perl5/Dpkg/Source/Functions.pm
root@grissom:~/gpsdrive-2.10pre6/build#

perl @INC problem?

Charles Curley (charlescurley) wrote :

I was able to recover a Gnome installation with the following:

* Reboot to the broken installation, and SSH in.

* Install scrollkeeper (probably unnecessary). This forced removal of rarian and a lot of Gnome.

* Purge all of scrollkeeper (aptitude purge ...).

* Install rarian-compat.

* Install ubuntu-desktop. Can take a while.

Malte Cornils (malte) wrote :

This is probably the same bug as Debian bug 482140 - see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482140

Some workarounds are discussed in that bug report. Can anyone check whether this is the same bug?

Thanks Malte.

I was not sure until the recent posts http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482140#222 and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482140#237 . This is indeed the same bug.

Changed in docbook-xml:
status: Unknown → Confirmed
Martin Pitt (pitti) on 2008-10-09
Changed in rarian:
assignee: nobody → pitti
status: Triaged → In Progress
Arun (arunck) wrote :

Hi! I saw some comment in the error log that some database (xml) has similar entry while installing Rarian-compat. This prevents all other Gnome components & Desktop to be installed. As a reason I dont see anything in Gnome desktop.

I manually removed all rarian by 'apt-get remove rarian*' and re-installed the component. Now all are working fine.

Trust someone would look into this issue with priority and fix it before going to final release.

Problem observed here. I tried to upgrade to Intrepid using `update-manager -d`, but encountered this error. Gnome is in a bad state now (I have to go to a virtual console and type `DISPLAY=0:0 gnome-panel&` to get gnome-panel to start.)
At the moment I am trying the method described by Charles Curley.

Matthias Niess (mniess) wrote :

I had the same problem. As soon as the upgrade reached the configuration of rarian-compat it stopped with an error. All further errors were because of dependencies to scrollkeeper, which is provided by rarian-compat.

As others I installed scrollkeeper, finished the dist-upgrade and then installed ubuntu-desktop (thus removing scrollkeeper and reinstalling rarian-compat).

I had this problem with a clean install of hardy and another computer which had the netbook-remix repo enabled. I read through the logs in /var/log/dist-upgrade but the only information I could get from them was that it stopped at rarian-compat.

As a follow-up to my problem, installing scrollkeeper and then
ubuntu-desktop did get me a running Intrepid.

I had the additional problem that I only have the linux-386 package, and
not the linux (generic) package... This left me with an Intrepid but
with only the (not so fun) 2.6.25 kernel, as the linux-386 package must
still be referencing an older kernel. That should probably be a
separate bug.

-----Original Message-----
From: mniess <email address hidden>
Reply-To: Bug 256131 <email address hidden>
To: <email address hidden>
Subject: [Bug 256131] Re: failed to upgrade : "update-xmlcatalog: error:
entity already registered"
Date: Mon, 13 Oct 2008 16:49:48 -0000

I had the same problem. As soon as the upgrade reached the configuration
of rarian-compat it stopped with an error. All further errors were
because of dependencies to scrollkeeper, which is provided by rarian-
compat.

As others I installed scrollkeeper, finished the dist-upgrade and then
installed ubuntu-desktop (thus removing scrollkeeper and reinstalling
rarian-compat).

I had this problem with a clean install of hardy and another computer
which had the netbook-remix repo enabled. I read through the logs in
/var/log/dist-upgrade but the only information I could get from them was
that it stopped at rarian-compat.

muzzamo (murray-waters) wrote :

Am getting this error when upgrading from hardy to intrepid today (Oct 14th).

Martin Pitt (pitti) on 2008-10-14
Changed in docbook-xml:
assignee: nobody → pitti
importance: Undecided → High
milestone: none → ubuntu-8.10
status: New → In Progress
Martin Pitt (pitti) wrote :

I analyzed this and the Debian bug, and they indeed have the same root cause, although the bug manifests itself a bit differently on hardy->intrepid, since docbook-xml has the same version as in hardy, and we change scrollkeeper to rarian-compat.

This recipe reproduces it in Ubuntu in a clean hardy pbuilder:

apt-get -y --force-yes install docbook-xml gpgv scrollkeeper
sed -i 's/hardy/intrepid/g' /etc/apt/sources.list; apt-get update
apt-get -y -d install perl-modules rarian-compat
cd /var/cache/apt/archives
dpkg --unpack perl-modules_5.10.0-*.deb
dpkg --unpack rarian-compat_*.deb
# -> BEGIN failed--compilation aborted at /usr/sbin/update-xmlcatalog line 124.
apt-get -f install
# -> update-xmlcatalog: error: entity already registered

Martin Pitt (pitti) wrote :

OK, so in ubuntu we don't need to touch docbook-xml, but we need to make rarian-compat depend on the fixed version of update-xmlcatalog.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xml-core - 0.11ubuntu1

---------------
xml-core (0.11ubuntu1) intrepid; urgency=low

  Grab patch from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482140#270
  to make update-xmlcatalog work with just perl-base. (LP: #256131)

  [ Agustin Martin Domingo ]
  * 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.

 -- Martin Pitt <email address hidden> Tue, 14 Oct 2008 11:56:52 +0200

Changed in xml-core:
status: In Progress → Fix Released
Martin Pitt (pitti) wrote :

As for the rarian fix, I propose this patch. It introduces a pre-depends:, thus I will discuss it at ubuntu-devel@ first.

Martin Pitt (pitti) on 2008-10-14
Changed in rarian:
status: In Progress → Fix Committed

I'm currently preparing xml-core 0.12 - however, I will do some testing before uploading.

nabdan (nabil2) wrote :

Thanks Charles it works :)

 Charles Curley wrote on 2008-10-08: (permalink)
I was able to recover a Gnome installation with the following:
* Reboot to the broken installation, and SSH in.
* Install scrollkeeper (probably unnecessary). This forced removal of rarian and a lot of Gnome.
* Purge all of scrollkeeper (aptitude purge ...).
* Install rarian-compat.
* Install ubuntu-desktop. Can take a while.

Horusint (horusint) on 2008-10-14
description: updated

Martin,

I've caught this one this morning in bug 283544 . Do you think this is a side effect of the previous patch ?

Setting up xml-core (0.11ubuntu1) ...

Setting up rarian-compat (0.8.1-1ubuntu1) ...
update-xmlcatalog: Error: entity already registered with a different value
 Entity : [delegateURI uriStartString="http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/"]
 Old value: [catalog="file:///etc/xml/scrollkeeper.xml"]
 New value: [catalog="file:///etc/xml/rarian-compat.xml"]
dpkg: error processing rarian-compat (--configure):
 subprocess post-installation script returned error exit status 1

Martin Pitt (pitti) wrote :

Jean-Baptiste Lallement [2008-10-15 6:16 -0000]:
> I've caught this one this morning in bug 283544 . Do you think this is a

The only side effect is that the error message is now more clear. It
seems that when you upgraded your system, some prerm scripts failed to
unregister the old documents.

Yes, it fails to unregister the old documents because scrollkeeper prerm still fails to execute update-xmlcatalog .

===
Removing scrollkeeper ...
Can't locate File/Spec/Functions.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/sbin/update-xmlcatalog line 124.
BEGIN failed--compilation aborted at /usr/sbin/update-xmlcatalog line 124.
Can't locate File/Spec/Functions.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/sbin/update-xmlcatalog line 124.
BEGIN failed--compilation aborted at /usr/sbin/update-xmlcatalog line 124.
===

Then xml-core fails to unregister itself for the same reason.

===
Preparing to replace xml-core 0.11 (using .../xml-core_0.11ubuntu1_all.deb) ...
Can't locate File/Spec/Functions.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/sbin/update-xmlcatalog line 124.
BEGIN failed--compilation aborted at /usr/sbin/update-xmlcatalog line 124.
Can't locate File/Spec/Functions.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/sbin/update-xmlcatalog line 124.
BEGIN failed--compilation aborted at /usr/sbin/update-xmlcatalog line 124.
Can't locate File/Spec/Functions.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/sbin/update-xmlcatalog line 124.
BEGIN failed--compilation aborted at /usr/sbin/update-xmlcatalog line 124.
Can't locate File/Spec/Functions.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/sbin/update-xmlcatalog line 124.
BEGIN failed--compilation aborted at /usr/sbin/update-xmlcatalog line 124
===

And then rarian installation fails with the error mentioned above.

The new version of xml-core should be installed before the removal of scrollkeeper otherwise scrollkeeper can't unregister it's documents and then rarian installation fails .

Ed Covert (ebcovert3) wrote :

Mine worked as described:

Thanks Charles it works :)

 Charles Curley wrote on 2008-10-08: (permalink)
I was able to recover a Gnome installation with the following:
* Reboot to the broken installation, and SSH in.
* Install scrollkeeper (probably unnecessary). This forced removal of rarian and a lot of Gnome.
* Purge all of scrollkeeper (aptitude purge ...).
* Install rarian-compat.
* Install ubuntu-desktop. Can take a while.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rarian - 0.8.1-1ubuntu2

---------------
rarian (0.8.1-1ubuntu2) intrepid; urgency=low

  * Add "Pre-Depends: xml-core (>= 0.11ubuntu1)" to make sure to use an
    update-xmlcatalog which does not break during upgrades. (LP: #256131)

 -- Martin Pitt <email address hidden> Tue, 14 Oct 2008 12:18:41 +0200

Changed in rarian:
status: Fix Committed → Fix Released
Charles Curley (charlescurley) wrote :

I confirm that it works. I hit this bug originally with a fit-pc. Yesterday I upgraded an identical machine (except that I had applied further Hardy updates) over the network, and did not hit this issue.

Thank you all.

Changed in docbook-xml:
status: Confirmed → Fix Released
To post a comment you must log in.