Bug 15032 - 5beta2 upgrade: urpmi error: ERROR: 'script' failed for an rpm which is not installed
Summary: 5beta2 upgrade: urpmi error: ERROR: 'script' failed for an rpm which is not i...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: High normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
: 14979 (view as bug list)
Depends on:
Blocks: 15013
  Show dependency treegraph
 
Reported: 2015-01-13 13:32 CET by claire robinson
Modified: 2015-02-26 23:08 CET (History)
6 users (show)

See Also:
Source RPM: urpmi-8.03-1.mga5.src.rpm
CVE:
Status comment:


Attachments
report.bug.xz (137.68 KB, application/x-xz)
2015-01-13 13:38 CET, claire robinson
Details
/root/drakx/ddebug.log (190.54 KB, application/gzip)
2015-02-04 13:27 CET, olivier charles
Details

Description claire robinson 2015-01-13 13:32:00 CET
This appears to be a urpmi error. Using a freshly installed mga4 64 default kde install, which had been fully updated as a base to perform an upgrade test using mga5 beta 2 classic dvd 64.

It ended with an error of script failed but it failed for an rpm which is not even installed.

I'll attach ddebug.log but the transaction is below.


* workaround bug in rpmlib by removing /mnt/var/lib/rpm/__db*
* opening rpmdb (root=/mnt, write=1)
* trans: scheduling update of lib64avahi-common3-0.6.31-15.mga5.x86_64 (id=1872, file=/tmp/image/media/core/lib
64avahi-common3-0.6.31-15.mga5.x86_64.rpm)
* trans: scheduling update of gnome-themes-standard-3.14.2.3-1.mga5.x86_64 (id=4030, file=/tmp/image/media/core
/gnome-themes-standard-3.14.2.3-1.mga5.x86_64.rpm)
* trans: scheduling update of lib64gtk-gir3.0-3.14.6-1.mga5.x86_64 (id=993, file=/tmp/image/media/core/lib64gtk
-gir3.0-3.14.6-1.mga5.x86_64.rpm)
* trans: scheduling update of adwaita-gtk2-theme-3.14.2.3-1.mga5.x86_64 (id=221, file=/tmp/image/media/core/adw
aita-gtk2-theme-3.14.2.3-1.mga5.x86_64.rpm)
* trans: scheduling update of gtk+3.0-3.14.6-1.mga5.x86_64 (id=4000, file=/tmp/image/media/core/gtk+3.0-3.14.6-
1.mga5.x86_64.rpm)
* trans: scheduling update of adwaita-icon-theme-3.14.1-1.mga5.noarch (id=1352, file=/tmp/image/media/core/adwa
ita-icon-theme-3.14.1-1.mga5.noarch.rpm)
* trans: scheduling update of xdg-user-dirs-gtk-0.10-4.mga5.x86_64 (id=2857, file=/tmp/image/media/core/xdg-use
r-dirs-gtk-0.10-4.mga5.x86_64.rpm)
* trans: scheduling update of lib64gtk+3_0-3.14.6-1.mga5.x86_64 (id=656, file=/tmp/image/media/core/lib64gtk+3_
0-3.14.6-1.mga5.x86_64.rpm)
* trans: scheduling update of lib64wayland-cursor0-1.6.0-2.mga5.x86_64 (id=3295, file=/tmp/image/media/core/lib
64wayland-cursor0-1.6.0-2.mga5.x86_64.rpm)
* trans: scheduling update of lib64avahi-client3-0.6.31-15.mga5.x86_64 (id=871, file=/tmp/image/media/core/lib6
4avahi-client3-0.6.31-15.mga5.x86_64.rpm)
* trans: scheduling update of lib64cups2-2.0.1-2.mga5.x86_64 (id=1307, file=/tmp/image/media/core/lib64cups2-2.
0.1-2.mga5.x86_64.rpm)
* advertising /mnt/tmp/drakx-images/03_IM_mageia.png
* urpmi error: ERROR: 'script' failed for lib64SDL_mixer1.2_0-1.2.12-9.mga5.x86_64: 
* workaround bug in rpmlib by removing /mnt/var/lib/rpm/__db*
* opening rpmdb (root=/mnt, write=1)


Reproducible: 

Steps to Reproduce:
claire robinson 2015-01-13 13:32:20 CET

Blocks: (none) => 15013

Comment 1 claire robinson 2015-01-13 13:38:41 CET
Created attachment 5811 [details]
report.bug.xz

ddebug.log was a bit big but verified report.bug contained the error so here is report.bug.xz
claire robinson 2015-01-13 13:40:45 CET

Hardware: i586 => x86_64
CC: (none) => ennael1, thierry.vignaud, tmb

Comment 2 claire robinson 2015-01-13 13:41:21 CET
# rpm -qa | grep SDL
lib64SDL1.2_0-1.2.15-15.mga5
lib64SDL_sound1.0_1-1.0.3-16.mga5
lib64SDL_gfx14-2.0.24-3.mga4
lib64SDL_gfx15-2.0.25-4.mga5
Comment 3 David Walser 2015-01-13 16:45:09 CET
I hadn't previously noticed this, but I also got this with one VM that I upgraded with urpmi rather than the installer, and it was again on the ncl-common package for me.  I'll mark Bug 14979 as a duplicate of this.

Assignee: bugsquad => thierry.vignaud
CC: (none) => luigiwalser
Hardware: x86_64 => All
Source RPM: (none) => urpmi-8.03-1.mga5.src.rpm

Comment 4 David Walser 2015-01-13 16:45:58 CET
*** Bug 14979 has been marked as a duplicate of this bug. ***
Comment 5 Thierry Vignaud 2015-01-14 21:24:06 CET
The urpmi message reveals a real error.
We've an issue when rpm calls the 'error' callback where we fails to identify the right package.
It's one of that transaction that fails.
The package really needs to be fixed...

Assignee: thierry.vignaud => bugsquad
Source RPM: urpmi-8.03-1.mga5.src.rpm => (none)

Comment 6 David Walser 2015-01-14 21:26:47 CET
(In reply to Thierry Vignaud from comment #5)
> The urpmi message reveals a real error.
> We've an issue when rpm calls the 'error' callback where we fails to
> identify the right package.
> It's one of that transaction that fails.
> The package really needs to be fixed...

What package needs to be fixed?  The one it's reporting is totally bogus.  It wasn't installed at all (so it wasn't part of the transaction).
Comment 7 David Walser 2015-01-14 21:29:13 CET
Also, regardless of whether there's a package with a script that's failing (I always figured there was), the fact that the package is being misidentified is still a bug, either in urpmi or rpm.
Comment 8 David Walser 2015-01-14 21:49:01 CET
(In reply to David Walser from comment #6)
> (In reply to Thierry Vignaud from comment #5)
> > The urpmi message reveals a real error.
> > We've an issue when rpm calls the 'error' callback where we fails to
> > identify the right package.
> > It's one of that transaction that fails.
> > The package really needs to be fixed...
> 
> What package needs to be fixed?  The one it's reporting is totally bogus. 
> It wasn't installed at all (so it wasn't part of the transaction).

OK, so I believe the package is adwaita-icon-theme.  It appears nearby above the ERROR message about ncl-common on all three machines I saw this issue on.  That would be Bug 14971.

As for the misidentification of the package, since rpm doesn't know anything about hdlists such that it could pull a package name and version that's not part of the transaction out of thin air, wouldn't urpmi *have* to be the culprit?
Comment 9 David Walser 2015-01-14 21:53:02 CET
Claire, I think you may have attached the report.bug from the wrong machine, as the error isn't in that log you attached.  However, in the one you pasted in Comment 0, I also see adwaita-icon-theme, so I think we've at least identified the package with the failing scriptlet.

This bug however is about the misidentification of the package.  I don't see how anything other than urpmi could be responsible for that.

Source RPM: (none) => urpmi-8.03-1.mga5.src.rpm

Comment 10 claire robinson 2015-01-14 23:10:44 CET
Oops. Sorry. It was in ddebug.log and report.bug but not the report.bug.xz which just seems to show the mga4 install. The upgrade is long gone but I'll do it again tomorrow.

Thierry removed himself from the bug some time ago btw but I agree with you about urpmi. I can't see how it could be anything else. An off by one error or similar.
Comment 11 David Walser 2015-01-14 23:16:57 CET
Thierry is still CC'd, so hopefully he'll have a look into the issue.  It certainly makes it more difficult for us to debug these scriptlet issues as we test on our way to mga5.
Comment 12 Thomas Backlund 2015-01-14 23:25:20 CET
(In reply to claire robinson from comment #10)
> 
> Thierry removed himself from the bug some time ago btw but I agree with you
> about urpmi. I can't see how it could be anything else. An off by one error
> or similar.


If you look how package install works, urpmi is a hdlist reader  / rpm work feeder...

it passes a list of rpms to rpm for install, and reads the feedback it gets from rpm ... so the "off-by-one" can wery much be rpm not tracking the error vs package properly...

I'll see if I can reproduce it so we can get input from Panu about it...
Comment 13 David Walser 2015-01-14 23:27:51 CET
But why would urpmi be feeding to rpm the name of a package that it is not installing?
Comment 14 Thierry Vignaud 2015-01-15 09:00:47 CET
The real issue is that rpmlib offers us to register whatever key we want for packages we're installing/upgrading.
Urpmi pass the package index (which is basically a number incremented from 0 when reading packages from synthesis, so its depends on its place in a given synthesis file and of the order of media in /etc/urpmi/media.cfg)

but when rpm removes a package, rpmlib blindly passes the package header.
urpmi tries to interprint the header pointer as an integer index, which often results in "0" and thus it warn about the first package in $urpm->{depslist}
Comment 15 olivier charles 2015-02-04 00:25:33 CET
Ran into same issue with Mageia5 beta3 upgrade with classical iso (64bits)

"Une erreur est survenue

ERROR 'script' failed for thunderbird-uk 31.04.0-1.mga5.noarch"

though thunderbird was not installed on Mageia4 from which I upgraded.

After OKing this message, installation process completed and MGA5x64 upgrade was functionnal.

CC: (none) => olchal

Comment 16 claire robinson 2015-02-04 09:44:11 CET
Until there is a fix, you'll need to look in /root/drakx/ddebug.log and find the rpm transaction which caused the script failed message. Search for that message.

The preceding transaction, usually around 8 rpms has one with a failing script. Previously identified adwaita-icon-theme but that was beta 2, several weeks ago.

Priority: Normal => release_blocker

Comment 17 olivier charles 2015-02-04 13:27:10 CET
Created attachment 5854 [details]
/root/drakx/ddebug.log


Here in attachment I put ddebug.log as Claire pointed I could find what caused the error.

I can only see one in line 13231 :
* urpmi error: ERROR: 'script' failed for thunderbird-uk-31.4.0-1.mga5.noarch: 
* workaround bug in rpmlib by removing /mnt/var/lib/rpm/__db*
* opening rpmdb (root=/mnt, write=1)

which is the same than message error I got when upgrading.
Comment 18 David Walser 2015-02-04 13:35:08 CET
Comment on attachment 5854 [details]
/root/drakx/ddebug.log

And just a few lines above that, you can see that it's adwaita-icon-theme.  I wouldn't have expected anything else.
Rémi Verschelde 2015-02-05 20:54:33 CET

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=14971

Comment 19 Mageia Robot 2015-02-05 23:46:33 CET
commit 521de2161bd4dad784d8a9b4add9ad6e83e269ba
Author: Pascal Terjan <pterjan@...>
Date:   Thu Feb 5 22:45:58 2015 +0000

    Don't give a wrong package name when it is unknown in a callback (mga#15032)
---
 Commit Link:
   http://gitweb.mageia.org/software/rpm/urpmi/commit/?id=521de2161bd4dad784d8a9b4add9ad6e83e269ba
Comment 20 Pascal Terjan 2015-02-06 02:22:56 CET
I commited a first "fix" to get rid of the wrong package name by not giving one when we don't know it.
Not very helpful but at list not misleading.
Comment 21 Thierry Vignaud 2015-02-06 08:36:10 CET
'unknown' would be better for the package name I think
Comment 22 Pascal Terjan 2015-02-06 14:05:28 CET
(In reply to Thierry Vignaud from comment #21)
> 'unknown' would be better for the package name I think

Just change it then :)

CC: (none) => pterjan

Comment 23 Thierry Vignaud 2015-02-18 10:49:00 CET
This cannot be a release blocker.
On one hand there's a packaging issue and on the other hand we cannot identify the bogus packages in urpmi when the error callback is called about a package that is being uninstalled.

For the former, /root/drakx/install.log should help pinpoint the bogus package.

Priority: release_blocker => Normal

Comment 24 David Walser 2015-02-18 14:41:23 CET
The packaging issue is Bug 14971 and will hopefully be fixed soon with an update to the mga4 package.

This bug is about RPM giving the wrong package name, and if it's not a release blocker, it at least should be high priority, as it will make it practically impossible to get good bug reports if there are any other upgrade issues, so we won't be able to fix any others (hopefully there aren't any more).

Priority: Normal => High

Comment 25 Mageia Robot 2015-02-26 19:19:20 CET
commit b0cd1853933d8c68610c9e173721525c6a17e8ce
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Mon Feb 23 10:58:56 2015 +0100

    callbacks now get pkg name instead of just pkg id
    
    thus fixing unknown package name on erases (mga#15032)
---
 Commit Link:
   http://gitweb.mageia.org/software/rpm/perl-URPM/commit/?id=b0cd1853933d8c68610c9e173721525c6a17e8ce
Comment 26 Mageia Robot 2015-02-26 19:20:58 CET
commit 3d9a2bcd451b1e0f0ee9b6afe93d01c16c37a124
Author: unknown <ex.thierry.vignaud@...>
Date:   Mon Feb 23 10:54:37 2015 +0100

    always display the right package name on errors
    
    fixes mga#15032 and also simplify...
    needs URPM >= 5.04
---
 Commit Link:
   http://gitweb.mageia.org/software/rpm/urpmi/commit/?id=3d9a2bcd451b1e0f0ee9b6afe93d01c16c37a124
Comment 27 Thierry Vignaud 2015-02-26 21:26:24 CET
Closing

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 28 Luc Menut 2015-02-26 21:42:52 CET
urpmi segfault with perl-URPM-5.04 and urpmi-8.04 .
Thomas has restored perl-URPM-5.03-1.mga5 and urpmi-8.03-1.mga5 on the mirrors (cf. -dev ML).

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 29 Pascal Terjan 2015-02-26 22:54:54 CET
I fixed the segfault in perl-URPM-5.05
Comment 30 Thierry Vignaud 2015-02-26 23:08:32 CET
Closing

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.