Bug 732475 - %postun libs not empty
Summary: %postun libs not empty
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Dave Malcolm
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-22 15:20 UTC by Andreas Schwab
Modified: 2011-08-22 19:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-08-22 19:39:42 UTC

Attachments (Terms of Use)

Description Andreas Schwab 2011-08-22 15:20:39 UTC
A scriptlet that uses ldconfig as program must be empty.

$ rpm -q --scripts python-libs
postinstall program: /sbin/ldconfig
postuninstall scriptlet (using /sbin/ldconfig):

# ======================================================
# Manifests of the various subpackages
# ======================================================

Comment 1 Dave Malcolm 2011-08-22 17:07:24 UTC
Thanks for reporting this.

The relevant fragment of the specfile looks like this:

[...begin quote...]

# ======================================================
# Scriptlets
# ======================================================

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

# ======================================================
# Manifests of the various subpackages
# ======================================================

%defattr(-, root, root, -)

[...end quote...]

Clearly rpm is interpreting everything leading up to the "%files" as part of the %postun.

Comment 2 Dave Malcolm 2011-08-22 17:27:14 UTC
Looking in rpm-, the relevant code that parses scriptlets is:
  int parseScript(rpmSpec spec, int parsePart)
My reading is that it reads lines, adding them to the scriptlet, until it reaches one containing a "part token" e.g. %files (c.f. isPart() within parseSpec.c)

Comment 3 Dave Malcolm 2011-08-22 19:39:42 UTC
Fix committed/pushed to git for python and python3 specfiles (I'm trying to gradually make these specfiles more easily diff-able against each other, and these comment headers were part of this).

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