Summary: | devel/qt5: POST-DEINSTALL errors when deinstalling | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | jakub_lach |
Component: | Individual Port(s) | Assignee: | freebsd-kde (group) <kde> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | adridg, kde, tcberner |
Priority: | --- | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
jakub_lach
2022-03-27 12:09:39 UTC
Similarly, removing qt5-declarative shows POST-DEINSTALL script failed as well. Actually all of the Qt5 packages do this. I guess it's a recent(ish) change to pkg to print the failure message. The post-deinstall script looks like this (extracted from the pkg database): ``` #!/bin/sh qi="/usr/local/include/qt5" qc="$qi/QtCore/qconfig-modules.h" qm="declarative-test" case $2 in POST-DEINSTALL) [ \! -e "$qc" ] && touch "$qc" sed "/qconfig-$qm\.h/ d" "$qc" [ \! -e "$qi/QtCore/qconfig.h" ] && \ [ \! -s "$qc" ] && ( rm -f "$qc" rmdir "$qi/QtCore" rmdir "$qi" ) > /dev/null 2>&1 ;; esac ``` What's going "wrong" is after the sed, it checks if QtCore/qconfig.h no-longer-exists. It does, so `[ ! -e "$qi/QtCore/qconfig.h" ]` is false; that pipeline exits with a non-zero code. There's nothing **after** that pipeline to reset the exit code, and so the result of the whole script is non-zero -- and pkg prints a failure. (I see now that Jakub's original message already points to "all the Qt5 packages" and I only noticed the message in 47/47 for declarative test) Fixed in 613a0476fffb84ebab668d4737575c1280024b2e although I didn't bump any packages. The post-deinstall message is harmless (for the qt5 packages anyway). |