Bug ID: 1926533
Summary: Postinstall scripts are failable, fail during KDE
netinst (due to dependency loop most likely)
QA Contact: extras-qa(a)fedoraproject.org
CC: airlied(a)redhat.com, ajax(a)redhat.com,
Target Milestone: ---
In current Fedora Rawhide, KDE network installs fail with a scriptlet error in
an xorg-x11-fonts subpackage:
16:36:01,304 INF dnf.rpm: mkfontscale: error while loading shared libraries:
libfreetype.so.6: cannot open shared object file: No such file or directory
warning: %post(xorg-x11-fonts-ISO8859-1-100dpi-7.5-27.fc34.noarch) scriptlet
failed, exit status 127
16:36:01,310 ERR dnf.rpm: Error in POSTIN scriptlet in rpm package
Dependencies should be in place, AFAICT: xorg-x11-fonts subpackages require
'mkfontdir', which is in the same package as mkfontscale (xorg-x11-font-utils)
and that package requires libfreetype.so.6. What's likely happening is a
dependency loop that dnf has to break somehow. This isn't uncommon on initial
install, something like A requires B requires C requires A, and in order to do
anything, dnf has to pick *some* dependency to disregard. Probably because of
some loop like this, it's ordering install of xorg-x11-fonts-ISO8859-1-100dpi
before install of freetype, and so its %post script fails.
We could look for and try to fix that loop, but note the packaging guidelines
"All scriptlets MUST exit with the zero exit status. Because RPM in its default
configuration does not execute shell scriptlets with the -e argument to the
shell, excluding explicit exit calls (frowned upon with a non-zero argument!),
the exit status of the last command in a scriptlet determines its exit status.
Most commands in the snippets in this document have a “|| :” appended to them,
which is a generic trick to force the zero exit status for those commands
whether they worked or not. Usually the most important bit is to apply this to
the last command executed in a scriptlet, or to add a separate command such as
plain “:” or “exit 0” as the last one in a scriptlet. Note that depending on
the case, other error checking/prevention measures may be more appropriate.
Non-zero exit codes from scriptlets can break installs/upgrades/erases such
that no further actions will be taken for that package in a transaction (see
Ordering), which may for example prevent an old version of a package from being
erased on upgrades, leaving behind duplicate rpmdb entries and possibly stale,
unowned files on the filesystem. There are some cases where letting the
transaction to proceed when some things in scriptlets failed may result in
partially broken setup. It is however often limited to that package only
whereas letting a transaction to proceed with some packages dropped out on the
fly is more likely to result in broader system wide problems."
basically, by policy scriptlets should be written to return 0 even if they
don't work. These scriptlets aren't respecting that. Given that not running
mkfontdir likely doesn't have any calamitous consequences, I think it would
make sense to go with the guidelines and amend all the scriptlets to add `|| :`
at the end (which will cause them to exit 0 even if the command failed).
You are receiving this mail because:
You are on the CC list for the bug.