Bug 433579 - Requires(post) does not bring in library dependencies at the right time
Requires(post) does not bring in library dependencies at the right time
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: bash (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Roman Rakus
Fedora Extras Quality Assurance
NEEDSRETESTING
: Reopened
: 468827 468923 (view as bug list)
Depends On:
Blocks: F10Preview
  Show dependency treegraph
 
Reported: 2008-02-19 23:46 EST by Orion Poplawski
Modified: 2014-01-12 19:07 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-29 03:17:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2008-02-19 23:46:26 EST
Description of problem:

I'm doing a livecd build against rawhide.  I'm seeing the following messages
during install:

  Installing: tcsh                         ################### [ 322/1182]grep:
error while loading shared libraries: libpcre.so.0: cannot open shared object
file: No such file or directory
grep: error while loading shared libraries: libpcre.so.0: cannot open shared
object file: No such file or directory
  Installing: mlocate                      ################### [
384/1182]/bin/grep: error while loading shared libraries: libpcre.so.0: cannot
open shared object file: No such file or directory
  Installing: coreutils                    ################### [
415/1182]/bin/grep: error while loading shared libraries: libpcre.so.0: cannot
open shared object file: No such file or directory
  Installing: fontconfig                   ################### [ 417/1182]grep:
error while loading shared libraries: libpcre.so.0: cannot open shared object
file: No such file or directory
  Installing: rpm                          ################### [ 437/1182]grep:
error while loading shared libraries: libpcre.so.0: cannot open shared object
file: No such file or directory
  Installing: nss_ldap                     ################### [ 558/1182]grep:
error while loading shared libraries: libpcre.so.0: cannot open shared object
file: No such file or directory
  Installing: initscripts                  ################### [ 591/1182]fgrep:
error while loading shared libraries: libpcre.so.0: cannot open shared object
file: No such file or directory
  Installing: torque                       ################### [
643/1182]/bin/grep: error while loading shared libraries: libpcre.so.0: cannot
open shared object file: No such file or directory
  Installing: microcode_ctl                ################### [ 658/1182]grep:
error while loading shared libraries: libpcre.so.0: cannot open shared object
file: No such file or directory
  Installing: pcre                         ################### [ 675/1182] 

Now, tcsh has:

Requires(post): grep

and grep has a requirement on libpcre.so.0, but pcre isn't getting installed
until later in the transaction.

Version-Release number of selected component (if applicable):
rpm-4.4.2.2-13.fc9
Comment 1 Orion Poplawski 2008-03-31 13:39:27 EDT
I'm seeing these now in regular anaconda installs of rawhide:

Installing coreutils-6.10-16.fc9.i386
/bin/grep: error while loading shared libraries: libpcre.so.0: cannot open
shared object file: No such file or directory

coreutils does a:

Requires(post): grep

So it is doing the right thing by requiring grep, but not all of grep's
dependencies are installed yet.

rpm-4.4.2.3-0.5.rc1.i386

I really think this should be a release blocker as this could leave the
installed system in a strange state if %post scripts fail strangely.
Comment 2 Bug Zapper 2008-05-14 01:17:50 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 3 Mogens Kjaer 2008-05-20 04:49:47 EDT
Is there any trick that puts pcre earlier in the installation?
Comment 4 Jeff Johnson 2008-05-20 19:34:10 EDT
No tricks, just standard distro QA.

tcsh has
    Requires(post): grep

grep has
    Requires: libpcre.so.0

pcre has
    Provides: libpcre.so.0

If pcre-7.3-3.fc9 is not installed before grep-2.5.1-59.fc9, which is installed
before tcsh-6.15-4.fc9, then either
   1) there are dependency loops (which cause the above dependencies to be ignored while ordering).
   2) something else has been broken in rpm-4.4.2.3-2.fc9

Comment 5 Mogens Kjaer 2008-05-21 00:59:48 EDT
How do I tell if it is 1) or 2)?

And more specifically, how do I fix the problem?

As it is now, I can't rebuild a Live-CD with a changed package list.

During installation of the rpm package I get:

Installing: rpm                          ################### [ 756/1730]grep:
error while loading shared libraries: libpcre.so.0: cannot open shared object
file: No such file or directory

During the Live-CD %post section I get errors from rpm:

rpmdb: Program version 4.3 doesn't match environment version
error: db4 error(-30974) from dbenv->open: DB_VERSION_MISMATCH: Database
environment version mismatch
error: cannot open Packages index using db3 -  (-30974)
error: cannot open Packages database in /var/lib/rpm
error: /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora: import failed.

I have a manual installation of the Sun Java JRE .rpm, this fails with
the same error message.

I assume that these errors are due to the fact that the post script
of the rpm installation hasn't been run.

How do I fix this problem?
Comment 6 Orion Poplawski 2008-10-10 11:55:35 EDT
I'm still seeing this building a livecd on current rawhide:

  Installing: tcsh                         ################### [ 172/1215]
grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory

pcre is finally installed later:

  Installing: pcre                         ################### [ 535/1215]
Comment 7 John Poelstra 2008-10-10 18:23:29 EDT
This bug has been triaged
Comment 8 Orion Poplawski 2008-10-27 17:37:44 EDT
A new manifestation:

Installing bash-3.2-28.fc10.x86_64
/bin/sh: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
warning: %post(bash-3.2-28.fc10.x86_64) scriptlet failed, exit status 127
Comment 9 Orion Poplawski 2008-10-28 15:15:57 EDT
Interestingly, all of the other pcre messages are now gone.  Perhaps coincidence, perhaps related.
Comment 10 Jesse Keating 2008-10-28 15:42:39 EDT
While I think this is a bit of a pile-on bug, the current issue with the bash circular dep is one that concerns me for F10 Preview, so I'm adding it to the blocker.
Comment 11 Panu Matilainen 2008-10-28 17:17:13 EDT
Yes this is starting to be way too much of a pile-on bug... so lets forget about the older issues that apparently are gone now (as per comment #9), the pcre thing was almost certainly a dependency loop somewhere too.

Most likely this recent bash change:
https://www.redhat.com/archives/fedora-extras-commits/2008-October/msg06379.html

-Requires(post): ncurses

Removing the (post) bit removes the hint that rpm needs for correctly snipping the dependency loop. And over to bash.

Oh and FWIW, bash being one of those early "bootstrap" packages, it's %post would be prime candidate for using the embedded Lua for it's actions, it'd avoid these kind of issues completely as -p <lua> doesn't need any external dependencies to work.
Comment 12 Panu Matilainen 2008-10-28 17:19:10 EDT
*** Bug 468827 has been marked as a duplicate of this bug. ***
Comment 13 Jesse Keating 2008-10-28 17:34:26 EDT
I'm adding back the Requires(post) on ncurses-libs since that's what we actually need in %post.  Easier than re-writing it in LUA, which could be done post-f10.  Build going into koji shortly, will need testing when done.
Comment 14 Jesse Keating 2008-10-28 17:59:48 EDT
http://koji.fedoraproject.org/koji/taskinfo?taskID=909965 has the build if anybody wants to try and verify it.
Comment 15 Jesse Keating 2008-10-28 19:11:05 EDT
Verified fixed, and now tagged for F10.
Comment 16 Roman Rakus 2008-10-29 06:48:37 EDT
*** Bug 468923 has been marked as a duplicate of this bug. ***
Comment 18 Jesse Keating 2009-01-29 03:17:38 EST
I got some help and replaced the %post in bash with a <lua> script so that bash doesn't require anything external.  I think I forgot to remove the Requires(post) but that's OK for now.  The buildsystem is again functional.

It had stopped working because we upgraded to a yum that treated errors in %post as fatal.

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