Bug 21215

Summary: Dependency loop between libgtk+2.0_0's %post and libgtk+-x11-2.0_0. (ERROR: 'script' failed for libgtk+2...." during install)
Product: Mageia Reporter: Ben McMonagle <westel>
Component: RPM PackagesAssignee: GNOME maintainers <gnome>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: release_blocker CC: ngompa13, olav, rpmstack
Version: 6Keywords: 6final
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: gtk+2.0 CVE:
Status comment: Dependency loop: libgtk+2.0_0's %post requires libgtk+-x11-2.0_0, which requires libgtk+2.0_0
Attachments: all DE install report for i586
Proposed patch to prevent circular dep in %post

Description Ben McMonagle 2017-07-10 09:37:37 CEST
Description of problem: choose and install all DE, servers and workstations less development and network computer(client) from below i586 .iso. at near competion of install, a notice appears : ERROR: 'script' failed for libgtk+2.0_0-2.24.31-2.mga6.i586. clicking on "ok" then presents the configuration page. install then proceeds as normal

Mageia-6-i586-DVD.iso
DATE.txt: Sat Jul  8 10:32:36 CEST 2017


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.choose and install all DE, servers and workstations less development and network computer(client)
2. at near completion of install, an error message appears: "ERROR: 'script' failed for libgtk+2.0_0-2.24.31-2.mga6.i586."
3.
Comment 1 Ben McMonagle 2017-07-10 09:38:36 CEST
Created attachment 9479 [details]
all DE install report for i586
Ben McMonagle 2017-07-10 09:39:41 CEST

Keywords: (none) => 6final

Comment 2 Rémi Verschelde 2017-07-10 11:14:32 CEST
Relevant error from the debug.log:

"""
/usr/lib/gtk-2.0/bin/gtk-query-immodules-2.0: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
%post(libgtk+2.0_0-2.24.31-2.mga6.i586) scriptlet failed, exit status 127
"""

and:

"""
* chosen libgtk+-x11-2.0_0-2.24.31-2.mga6.i586 for libgtk-x11-2.0.so.0
* selecting libgtk+-x11-2.0_0-2.24.31-2.mga6.i586
* requiring gtk+2.0[>= 2.24.31-2.mga6],libgtk+2.0_0[== 2.24.31] for libgtk+-x11-2.0_0-2.24.31-2.mga6.i586
"""

Failure happens here: http://svnweb.mageia.org/packages/cauldron/gtk%2B2.0/current/SPECS/gtk%2B2.0.spec?view=markup#l169

The relevant Requires(post) is there, but it creates a dependency loop: http://svnweb.mageia.org/packages/cauldron/gtk%2B2.0/current/SPECS/gtk%2B2.0.spec?view=markup#l160


Should that %post be changed to a %posttrans to ensure that both libraries are installed before running that script?

Priority: Normal => release_blocker
CC: (none) => rpmstack
Assignee: bugsquad => gnome
Status comment: (none) => Dependency loop: libgtk+2.0_0's %post requires libgtk+-x11-2.0_0, which requires libgtk+2.0_0
Source RPM: libgtk+2.0_0-2.24.31-2.mga6.i586? => gtk+2.0

Rémi Verschelde 2017-07-10 11:16:13 CEST

Summary: ERROR: 'script' failed for libgtk+2...." during install => Dependency loop between libgtk+2.0_0's %post and libgtk+-x11-2.0_0. (ERROR: 'script' failed for libgtk+2...." during install)

Comment 3 David Walser 2017-07-10 12:02:56 CEST
The %posttrans idea might work.  Otherwise, it might just be a circular deps issue.  %{libname_x11} Requires %{libname} and vise versa.  The %{libname_x11} Requires %{libname} should be removed.
Comment 4 Neal Gompa 2017-07-10 12:36:35 CEST
Unless it actually does require %libname, at which point then converting to %posttrans is the right way to fix it.

CC: (none) => ngompa13

Comment 5 Rémi Verschelde 2017-07-10 12:44:22 CEST
I think it likely that %{libname_x11} *does* require %{libname}. The problem is that the %post of %{libname} requires %{libname_x11} too for one command, so either that %post should be move in %{libname_x11} (might make sense), or it should be made a %posttrans yes.
Comment 6 Rémi Verschelde 2017-07-10 21:26:08 CEST
Created attachment 9482 [details]
Proposed patch to prevent circular dep in %post

Please review my proposed patch, %posttrans does not have "$1 == 2" as %post does to check if it's a package upgrade, so I had to remove the check. I hope it wouldn't introduce an issue.

https://fedoraproject.org/wiki/Packaging:Scriptlets
Comment 7 Olav Vitters 2017-07-10 21:34:50 CEST
I also noticed that this same command is ran during a %filetriggerin.

IMO instead of this patch, split it out into two:
1. %post to remove the directory (or whatever); no require
2. %posttrans to run the command; WITH require

CC: (none) => olav

Comment 8 Rémi Verschelde 2017-07-10 22:08:23 CEST
Good idea. I've pushed this as gtk+2.0-2.24.31-3.mga6: http://svnweb.mageia.org/packages?view=revision&revision=1109645

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