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 # ======================================================
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 # ====================================================== %files %defattr(-, root, root, -) %doc LICENSE README [...end quote...] Clearly rpm is interpreting everything leading up to the "%files" as part of the %postun.
Looking in rpm-4.9.1.1/build/parseSpec.c, 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)
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).