Bug 23482 - urpmi error: ERROR: 'script' failed for sed-4.5-1.mga7.x86_64
Summary: urpmi error: ERROR: 'script' failed for sed-4.5-1.mga7.x86_64
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-24 21:56 CEST by Bit Twister
Modified: 2018-09-02 04:53 CEST (History)
5 users (show)

See Also:
Source RPM: shadow-utils-4.4-5.mga7
CVE:
Status comment:


Attachments
Latest net install ddebug.log (313.86 KB, application/octet-stream)
2018-08-30 21:04 CEST, Bit Twister
Details
report.bug log (365.02 KB, application/octet-stream)
2018-08-30 21:16 CEST, Bit Twister
Details
examples of loops when installing basesystem (6.10 KB, text/plain)
2018-09-02 04:40 CEST, Thierry Vignaud
Details
logs when librpm's loop breaking puts sed earlier (57.93 KB, application/x-xz)
2018-09-02 04:45 CEST, Thierry Vignaud
Details

Description Bit Twister 2018-08-24 21:56:04 CEST
Description of problem: mga7 dev0

   grep post\(sed-4.5-1 ddebug.log | wc -l
   109
package install failures 

See attached log
https://bugs.mageia.org/attachment.cgi?id=10333&action=edit

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


How reproducible: always


Steps to Reproduce:
1. see bug 23481 steps
2.
3.
Bit Twister 2018-08-25 07:41:35 CEST

Component: RPM Packages => Installer

Comment 1 Bit Twister 2018-08-26 07:39:52 CEST
it appears drakx-installer-rescue-1.59-1.mga7 resolved the problem.

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

Comment 2 Bit Twister 2018-08-30 04:06:21 CEST
Problem is back in the
Aug 29 21:47 Mageia-Cauldron-netinstall-nonfree-x86_64.iso release.

# grep %post ddebug.log | wc -l
103

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

Comment 3 Marja Van Waes 2018-08-30 20:52:48 CEST
(In reply to Bit Twister from comment #2)
> Problem is back in the
> Aug 29 21:47 Mageia-Cauldron-netinstall-nonfree-x86_64.iso release.
> 
> # grep %post ddebug.log | wc -l
> 103

Please attach report.bug.xz from the last attempt
https://wiki.mageia.org/en/Triage_guide#Traditional_installer

I doubt the problem is with the iso, but _if_ it is, then we need stage1.log, too, which is included in report.bog.

Summary: ERROR: 'script' failed for sed-4.5-1.mga7.x86_64 => urpmi error: ERROR: 'script' failed for sed-4.5-1.mga7.x86_64
CC: (none) => isobuild, marja11
Assignee: bugsquad => mageiatools

Comment 4 Bit Twister 2018-08-30 21:04:59 CEST
Created attachment 10341 [details]
Latest net install ddebug.log
Comment 5 Bit Twister 2018-08-30 21:16:44 CEST
Created attachment 10342 [details]
report.bug  log
Comment 6 David Walser 2018-08-31 23:31:58 CEST
I wish urpmi would simply say in that error *which* script failed instead of making us dig through logs every time.

It looks like it's %post (actually that's the only possibility here), which is just %_install_info, apparently erroring out with 127, which either means install-info isn't installed or one of its libraries is missing.  It did see the Requires(post): info-install, so I'm guessing there's a dependency loop that needs broken to get everything installed in the right order.
Comment 7 Bit Twister 2018-09-01 03:10:48 CEST
(In reply to David Walser from comment #6)
> I wish urpmi would simply say in that error *which* script failed instead of
> making us dig through logs every time.

I hear that. Seems like an easy macro to glance up the stack to get the previous command.  I also dislike the fail to remove a non existent file messages.
What is wrong with adding -f to the remove command. :(


> It looks like it's %post (actually that's the only possibility here), which
> is just %_install_info, apparently erroring out with 127, which either means
> install-info isn't installed or one of its libraries is missing.  It did see
> the Requires(post): info-install, so I'm guessing there's a dependency loop
> that needs broken to get everything installed in the right order.

I just thought it odd it was ok, then broke, then ok then broke again.

I really wanted to go through my 83 open bugs to see how many I can close.

looks like all I can do is keep trying clean installs until it clears up again.
Comment 8 Thomas Backlund 2018-09-01 10:01:30 CEST
(In reply to Bit Twister from comment #7)
> (In reply to David Walser from comment #6)
> > I wish urpmi would simply say in that error *which* script failed instead of
> > making us dig through logs every time.
> 
> I hear that. Seems like an easy macro to glance up the stack to get the
> previous command.  I also dislike the fail to remove a non existent file
> messages.
> What is wrong with adding -f to the remove command. :(
> 

adding "-f" would only hide a packaging  (or installer) bug, not fix it ...

CC: (none) => tmb

Comment 9 Martin Whitaker 2018-09-01 19:37:37 CEST
(In reply to Bit Twister from comment #7)
> (In reply to David Walser from comment #6)
> I just thought it odd it was ok, then broke, then ok then broke again.

That's to be expected if there is a dependency loop. The packages in the loop will get installed in a random order.

And indeed, if we look in the log under 'rpms sorted by dependencies:' we see

  sed+shadow-utils+makedev+info-install

showing the packages in the loop.

CC: (none) => mageia

Comment 10 Thierry Vignaud 2018-09-02 04:35:32 CEST
urpmi supports --deploops
draks supports the "deploops" option:
- either in auto_inst.cfg.pl
- or on the ISO command line*
- or with drakx-in-chroot

Then look for "Strongly Connected Components" in logs.

Component: Installer => RPM Packages
CC: (none) => thierry.vignaud

Comment 11 Thierry Vignaud 2018-09-02 04:40:36 CEST
Created attachment 10347 [details]
examples of loops when installing basesystem

This has been generated using:

mkdir R
sudo eatmydata urpmi --root R --debug-librpm --deploops -v basesystem 2>&1 | tee R.LOG)

Not all loops are harmful, but some may
Comment 12 Thierry Vignaud 2018-09-02 04:41:17 CEST
In case of sed, librpm will as always in such case have to break the cycle somewhere.
Here depending on how librpm breaks the loop, sed can be installed too
early and boum
Here it's installed late, so everything is OK:

warning: 1 Strongly Connected Components
warning: SCC #1: 4 members (3 external dependencies)
warning:        makedev-4.4-23.mga7.noarch
warning:                => shadow-utils-2:4.4-5.mga7.x86_64
warning:        info-install-6.5-3.mga7.x86_64
warning:                => makedev-4.4-23.mga7.noarch
warning:        sed-4.5-1.mga7.x86_64
warning:                => info-install-6.5-3.mga7.x86_64
warning:        shadow-utils-2:4.4-5.mga7.x86_64
warning:                => sed-4.5-1.mga7.x86_64
D: ========== tsorting packages (order, #predecessors, #succesors, depth)
D:     0    0    2    1   +lib64pam0-1.3.0-7.mga7.x86_64
D:     1    0    1    2     +lib64pam_userpass1-1.0.2-13.mga7.x86_64
D:     2    0    1    1   +lib64lzma5-5.2.4-1.mga7.x86_64
D:     3    0    1    2     +xz-5.2.4-1.mga7.x86_64
D:     4    1    1    1   +shadow-utils-2:4.4-5.mga7.x86_64
D:     5    0    1    2     +makedev-4.4-23.mga7.noarch
D:     6    0    1    3       +info-install-6.5-3.mga7.x86_64
D:     7    0    1    4         +sed-4.5-1.mga7.x86_64
D: sanity checking 8 elements
Comment 13 Thierry Vignaud 2018-09-02 04:45:11 CEST
Created attachment 10348 [details]
logs when librpm's loop breaking puts sed earlier

Here the random cycle breaking puts sed early and boom:
(breaking the cycle is random has librpm has to pick some place where to break the dumb loop)

warning: 1 Strongly Connected Components
warning: SCC #1: 4 members (0 external dependencies)
warning: 	shadow-utils-2:4.4-5.mga7.x86_64
warning: 		=> sed-4.5-1.mga7.x86_64
warning: 	makedev-4.4-23.mga7.noarch
warning: 		=> shadow-utils-2:4.4-5.mga7.x86_64
warning: 	info-install-6.5-3.mga7.x86_64
warning: 		=> makedev-4.4-23.mga7.noarch
warning: 	sed-4.5-1.mga7.x86_64
warning: 		=> info-install-6.5-3.mga7.x86_64
D: ========== tsorting packages (order, #predecessors, #succesors, depth)
D:     0    1    1    1   +sed-4.5-1.mga7.x86_64
D:     1    0    1    2     +shadow-utils-2:4.4-5.mga7.x86_64
D:     2    0    1    3       +makedev-4.4-23.mga7.noarch
D:     3    0    1    4         +info-install-6.5-3.mga7.x86_64
D:     4    0    1    1   +lib64pkgconf3-1.4.2-3.mga7.x86_64
D:     5    0    1    2     +pkgconf-1.4.2-3.mga7.x86_64
D:     6    0    1    1   +pkgconf-m4-1.4.2-3.mga7.noarch
D:     7    0    0    2     +pkgconf-pkg-config-1.4.2-3.mga7.x86_64

(...)

D: %post(sed-4.5-1.mga7.x86_64): scriptlet start
fdio:       2 writes,      129 total bytes in 0.000009 secs
D: %post(sed-4.5-1.mga7.x86_64): execv(/bin/sh) pid 5771
+ [[ -f /usr/share/info/sed.info.xz ]]
+ /sbin/install-info /usr/share/info/sed.info.xz --dir=/usr/share/info/dir
/var/tmp/rpm-tmp.XciaQI: line 2: /sbin/install-info: No such file or directory
D: %post(sed-4.5-1.mga7.x86_64): waitpid(5771) rc 5771 status 7f00
warning: %post(sed-4.5-1.mga7.x86_64) scriptlet failed, exit status 127
D: Plugin: calling hook scriptlet_post in syslog plugin
ERROR: 'script' failed for sed-4.5-1.mga7.x86_64
Comment 14 Thierry Vignaud 2018-09-02 04:47:02 CEST
An easy fix would be to switch to %posttrans instead of %post...

Another would be to fix shadow-utils requires:
Requires(posttrans) instead of Requires(post)
Comment 15 Thierry Vignaud 2018-09-02 04:52:07 CEST
And of course this has nothing to do with installed or urpmi but with packaing hicups
Fixed in shadow-utils-4.4-6.mga7

Resolution: (none) => FIXED
Source RPM: (none) => shadow-utils-4.4-5.mga7
Status: REOPENED => RESOLVED

Comment 16 Thierry Vignaud 2018-09-02 04:53:21 CEST
(In reply to Thierry Vignaud from comment #11)
> Not all loops are harmful, but some may

eg if no scriptlet is run, then we don't care about it

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