Hello,
the “-p /sbin/ldconfig” syntax triggers a special behavior in RPM if the scriptlet is otherwise empty. In your case, the “%post libs” scriptlet also actually, surprising as it may seem, includes the following lines:
##-----------------------------------------------------------------------------
## All %files should be placed here and keep them sorted##
and hence is not empty. So RPM skips the special behavior, and executes /sbin/ldconfig with the usual additional value of $1 as described in https://fedoraproject.org/wiki/Packaging:ScriptletSnippets?rd=Packaging/ScriptletSnippets .
What you have done is a correct workaround, though by bypassing the special treatment of /sbin/ldconfig the package installation will be somewhat less efficient because /sbin/ldconfig will be executed more times than necessary. Another, more efficient, but more difficult to maintain, alternative is to avoid comments within the scriptlet sections by somehow reordering the spec file.
Mirek
Hi All,
Recently we came across a issue i.e. bz [1] , where ldconfig returned error as below on Fedora 20 machine (same issue is present in other Fedora variants too).
"yum remove glusterfs-libs" giving some Non-fatal POSTUN scriptlet failure. /sbin/ldconfig: relative path `0' used to build cache warning: %postun(glusterfs-libs-3.6.0-0.1.beta1.fc20.x86_64) scriptlet failed, exit status 1 Non-fatal POSTUN scriptlet failure in rpm package glusterfs-libs-3.6.0-0.1.beta1.fc20.x86_64The fix to this issue is replacing "%post libs -p /sbin/ldconfig" in to two lines [3]. But according to Fedora documentation [2] "%post libs -p /sbin/ldconfig" is the right way to do it. Which is not working for us. Seems like it is changed now but the documentation is not updated.
Thoughts?
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1145992
[2] https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Shared_libraries
[3] http://review.gluster.org/#/c/8836/2/glusterfs.spec.in
Thanks,
Lala--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct