Description of problem: Running transaction Reinstalling: binutils-2.27-8.fc26.x86_64 1/2 Erasing : binutils-2.27-8.fc26.x86_64 2/2 /sbin/ldconfig: relative path `1' used to build cache warning: %postun(binutils-2.27-8.fc26.x86_64) scriptlet failed, exit status 1 Non-fatal POSTUN scriptlet failure in rpm package binutils Non-fatal POSTUN scriptlet failure in rpm package binutils Verifying : binutils-2.27-8.fc26.x86_64 1/2 Verifying : binutils-2.27-8.fc26.x86_64 2/2 Version-Release number of selected component (if applicable): binutils-2.27-8.fc26 How reproducible: Always Steps to Reproduce: 1. dnf reinstall binutils Actual results: Errors during package upgrade Expected results: No errors Additional info: http://pkgs.fedoraproject.org/cgit/rpms/binutils.git/tree/binutils.spec#n545 says: %postun -p /sbin/ldconfig should say: %postun /sbin/ldconfig
*** Bug 1379117 has been marked as a duplicate of this bug. ***
https://fedoraproject.org/wiki/Packaging:Scriptlets says %postun -p /sbin/ldconfig is recommended. So, either the packaging guidelines are incorrect and should be fixed (and tons of packages that do this), or rpm just shouldn't pass any arguments to scriptlets with -p /sbin/ldconfig
You are right that %postun -p /sbin/ldconfig is recommended if the only thing you are doing in the scriptlet is calling /sbin/ldconfig. This is not the case here. The %post scriptlet, which also calls /sbin/ldconfig in addition to having a lot of other lines of shell script does it correctly: http://pkgs.fedoraproject.org/cgit/rpms/binutils.git/tree/binutils.spec#n514 Using -p /sbin/ldconfig with a non-empty scriptlet containing shell code is equivalent to trying to run #! /sbin/ldconfig <scriptlet code goes here> I.e. you are telling rpm to try to tell the /sbin/ldconfig binary to interpret shell script code, which fails miserably. %postun without a -p option is equivalent to the default %postun -p /bin/bash, i.e. what is run is #! /bin/bash <scriptlet code goes here> If you are only calling /sbin/ldconfig it is more efficient to use -p /sbin/ldconfig with an empty scriptlet, since you then skip the shell invocation. But if there are other things that you want to do in the scriptlet in addition to the call to /sbin/ldconfig you need it.
Should be fixed in: binutils-2.27-9.fc26
*** Bug 1379344 has been marked as a duplicate of this bug. ***