Closed keszybz closed 1 year ago
May I ask for a compaction with DNF4? Does DNF4 return non 0 return code? The problem is that not all scriptlet failers are reported as a problem by RPM.
May I ask you for a simple reproducer?
With dnf
I get this output:
Running scriptlet: kernel-core-6.2.11-300.fc38.x86_64 97/97
kernel-install: Skipping execution because KERNEL_INSTALL_BYPASS=1
warning: %posttrans(kernel-core-6.2.11-300.fc38.x86_64) scriptlet failed, exit status 1
Error in POSTTRANS scriptlet in rpm package kernel-core
Running scriptlet: systemd-boot-unsigned-253.2-1.fc38.x86_64 97/97
So it seems that it does fail, but the error message and the return code got mislaid.
$ dnf5 -y --use-host-config --releasever=38 --installroot=/var/tmp/root1 --setopt=install_weak_deps=0 install kernel-core
>>> Stop post-install scriptlet: setup-0:2.14.3-2.fc38.noarch
[ 11/104] Installing filesystem-0:3.18-3.fc38.x86_64 100% | 1.0 MiB/s | 212.1 KiB | 00m00s
>>> Unpack errro: filesystem-0:3.18-3.fc38.x86_64
[ 1/104] Installing basesystem-0:11-15.fc38.noarch 100% | 20.2 KiB/s | 124.0 B | 00m00s
[ 2/104] Installing coreutils-common-0:9.1-11.fc38.x86_64 100% | 317.9 MiB/s | 10.8 MiB | 00m00s
[ 3/104] Installing pcre2-syntax-0:10.42-1.fc38.1.noarch 100% | 46.4 MiB/s | 237.6 KiB | 00m00s
[ 4/104] Installing tzdata-0:2023c-1.fc38.noarch 100% | 25.4 MiB/s | 1.9 MiB | 00m00s
[ 5/104] Installing kbd-misc-0:2.5.1-5.fc38.noarch 100% | 73.9 MiB/s | 2.6 MiB | 00m00s
[ 6/104] Installing kbd-legacy-0:2.5.1-5.fc38.noarch 100% | 38.8 MiB/s | 595.6 KiB | 00m00s
[ 7/104] Installing ncurses-base-0:6.4-3.20230114.fc38.noarch 100% | 36.8 MiB/s | 338.8 KiB | 00m00s
[ 8/104] Installing ncurses-libs-0:6.4-3.20230114.fc38.x86_64 100% | 163.7 MiB/s | 1.0 MiB | 00m00s
>>> Running pre-install scriptlet: glibc-0:2.37-1.fc38.x86_64
>>> Stop pre-install scriptlet: glibc-0:2.37-1.fc38.x86_64
[ 9/104] Installing glibc-0:2.37-1.fc38.x86_64 100% | 536.7 MiB/s | 6.4 MiB | 00m00s
>>> Unpack errro: glibc-0:2.37-1.fc38.x86_64
[ 1/104] Installing bash-0:5.2.15-3.fc38.x86_64 100% | 372.6 MiB/s | 8.2 MiB | 00m00s
>>> Running post-install scriptlet: bash-0:5.2.15-3.fc38.x86_64
>>> Stop post-install scriptlet: bash-0:5.2.15-3.fc38.x86_64
[ 2/104] Installing glibc-common-0:2.37-1.fc38.x86_64 100% | 168.7 MiB/s | 1.0 MiB | 00m00s
[ 3/104] Installing glibc-minimal-langpack-0:2.37-1.fc38.x86_64 100% | 121.1 KiB/s | 124.0 B | 00m00s
[ 4/104] Installing xz-libs-0:5.4.1-1.fc38.x86_64 100% | 103.3 MiB/s | 211.6 KiB | 00m00s
[ 5/104] Installing zlib-0:1.2.13-3.fc38.x86_64 100% | 101.8 MiB/s | 208.5 KiB | 00m00s
[ 6/104] Installing libuuid-0:2.38.1-4.fc38.x86_64 100% | 19.1 MiB/s | 39.1 KiB | 00m00s
[ 7/104] Installing libblkid-0:2.38.1-4.fc38.x86_64 100% | 112.9 MiB/s | 231.1 KiB | 00m00s
[ 8/104] Installing libzstd-0:1.5.5-1.fc38.x86_64 100% | 252.2 MiB/s | 774.6 KiB | 00m00s
[ 9/104] Installing libcap-0:2.48-6.fc38.x86_64 100% | 59.5 MiB/s | 182.9 KiB | 00m00s
[ 10/104] Installing libxcrypt-0:4.4.33-7.fc38.x86_64 100% | 89.2 MiB/s | 273.9 KiB | 00m00s
[ 11/104] Installing libfdisk-0:2.38.1-4.fc38.x86_64 100% | 186.2 MiB/s | 381.3 KiB | 00m00s
[ 12/104] Installing lz4-libs-0:1.9.4-2.fc38.x86_64 100% | 66.0 MiB/s | 135.2 KiB | 00m00s
[ 13/104] Installing systemd-libs-0:253.2-1.fc38.x86_64 100% | 261.7 MiB/s | 1.8 MiB | 00m00s
[ 14/104] Installing pcre2-0:10.42-1.fc38.1.x86_64 100% | 206.2 MiB/s | 633.5 KiB | 00m00s
[ 15/104] Installing grep-0:3.8-3.fc38.x86_64 100% | 139.5 MiB/s | 1.0 MiB | 00m00s
[ 16/104] Installing libattr-0:2.5.1-6.fc38.x86_64 100% | 14.6 MiB/s | 29.9 KiB | 00m00s
[ 17/104] Installing libacl-0:2.3.1-6.fc38.x86_64 100% | 20.1 MiB/s | 41.2 KiB | 00m00s
[ 18/104] Installing libeconf-0:0.4.0-5.fc38.x86_64 100% | 22.9 MiB/s | 46.9 KiB | 00m00s
[ 19/104] Installing libcap-ng-0:0.8.3-5.fc38.x86_64 100% | 38.2 MiB/s | 78.2 KiB | 00m00s
[ 20/104] Installing audit-libs-0:3.1-2.fc38.x86_64 100% | 99.9 MiB/s | 306.9 KiB | 00m00s
[ 21/104] Installing pam-libs-0:1.5.2-16.fc38.x86_64 100% | 69.7 MiB/s | 142.7 KiB | 00m00s
[ 22/104] Installing gmp-1:6.2.1-4.fc38.x86_64 100% | 196.0 MiB/s | 802.7 KiB | 00m00s
[ 23/104] Installing libsepol-0:3.5-1.fc38.x86_64 100% | 248.6 MiB/s | 763.6 KiB | 00m00s
[ 24/104] Installing libselinux-0:3.5-1.fc38.x86_64 100% | 87.4 MiB/s | 179.0 KiB | 00m00s
[ 25/104] Installing sed-0:4.8-12.fc38.x86_64 100% | 131.3 MiB/s | 806.7 KiB | 00m00s
[ 26/104] Installing libmount-0:2.38.1-4.fc38.x86_64 100% | 153.2 MiB/s | 313.8 KiB | 00m00s
[ 27/104] Installing bzip2-libs-0:1.0.8-13.fc38.x86_64 100% | 40.1 MiB/s | 82.1 KiB | 00m00s
[ 28/104] Installing libsmartcols-0:2.38.1-4.fc38.x86_64 100% | 67.6 MiB/s | 138.4 KiB | 00m00s
[ 29/104] Installing util-linux-core-0:2.38.1-4.fc38.x86_64 100% | 131.8 MiB/s | 1.3 MiB | 00m00s
[ 30/104] Installing readline-0:8.2-3.fc38.x86_64 100% | 161.6 MiB/s | 496.4 KiB | 00m00s
[ 31/104] Installing libcom_err-0:1.46.5-4.fc38.x86_64 100% | 33.6 MiB/s | 68.7 KiB | 00m00s
[ 32/104] Installing libsemanage-0:3.5-2.fc38.x86_64 100% | 73.0 MiB/s | 299.0 KiB | 00m00s
[ 33/104] Installing shadow-utils-2:4.13-6.fc38.x86_64 100% | 63.7 MiB/s | 4.0 MiB | 00m00s
>>> Running pre-install scriptlet: libutempter-0:1.2.1-8.fc38.x86_64
>>> Stop pre-install scriptlet: libutempter-0:1.2.1-8.fc38.x86_64
>>> Error in pre-install scriptlet: libutempter-0:1.2.1-8.fc38.x86_64 return code 2
[ 34/104] Installing findutils-1:4.9.0-3.fc38.x86_64 100% | 184.4 MiB/s | 1.5 MiB | 00m00s
[ 35/104] Installing mpfr-0:4.1.1-3.fc38.x86_64 100% | 330.2 MiB/s | 2.0 MiB | 00m00s
[ 36/104] Installing kbd-0:2.5.1-5.fc38.x86_64 100% | 141.9 MiB/s | 1.7 MiB | 00m00s
[ 37/104] Installing xz-0:5.4.1-1.fc38.x86_64 100% | 111.2 MiB/s | 1.1 MiB | 00m00s
[ 38/104] Installing procps-ng-0:3.3.17-9.fc38.x86_64 100% | 141.1 MiB/s | 1.0 MiB | 00m00s
[ 39/104] Installing dbus-common-1:1.14.6-1.fc38.noarch 100% | 366.2 KiB/s | 13.6 KiB | 00m00s
>>> Running post-install scriptlet: dbus-common-1:1.14.6-1.fc38.noarch
>>> Stop post-install scriptlet: dbus-common-1:1.14.6-1.fc38.noarch
>>> Error in post-install scriptlet: dbus-common-1:1.14.6-1.fc38.noarch return code 0
[ 40/104] Installing cpio-0:2.13-14.fc38.x86_64 100% | 174.0 MiB/s | 1.0 MiB | 00m00s
[ 41/104] Installing json-c-0:0.16-4.fc38.x86_64 100% | 39.0 MiB/s | 79.9 KiB | 00m00s
[ 42/104] Installing libargon2-0:20190702-2.fc38.x86_64 100% | 24.6 MiB/s | 50.4 KiB | 00m00s
[ 43/104] Installing libffi-0:3.4.4-2.fc38.x86_64 100% | 34.8 MiB/s | 71.3 KiB | 00m00s
[ 44/104] Installing p11-kit-0:0.24.1-6.fc38.x86_64 100% | 145.1 MiB/s | 1.6 MiB | 00m00s
[ 45/104] Installing libseccomp-0:2.5.3-4.fc38.x86_64 100% | 56.5 MiB/s | 173.5 KiB | 00m00s
[ 46/104] Installing expat-0:2.5.0-2.fc38.x86_64 100% | 7.3 MiB/s | 278.1 KiB | 00m00s
>>> Running pre-install scriptlet: dbus-broker-0:33-1.fc38.x86_64
>>> Stop pre-install scriptlet: dbus-broker-0:33-1.fc38.x86_64
>>> Error in pre-install scriptlet: dbus-broker-0:33-1.fc38.x86_64 return code 2
[ 47/104] Installing dbus-1:1.14.6-1.fc38.x86_64 100% | 121.1 KiB/s | 124.0 B | 00m00s
[ 48/104] Installing alternatives-0:1.22-1.fc38.x86_64 100% | 31.4 MiB/s | 64.4 KiB | 00m00s
[ 49/104] Installing libtasn1-0:4.19.0-2.fc38.x86_64 100% | 86.9 MiB/s | 178.0 KiB | 00m00s
[ 50/104] Installing p11-kit-trust-0:0.24.1-6.fc38.x86_64 100% | 12.0 MiB/s | 442.8 KiB | 00m00s
>>> Running post-install scriptlet: p11-kit-trust-0:0.24.1-6.fc38.x86_64
>>> Stop post-install scriptlet: p11-kit-trust-0:0.24.1-6.fc38.x86_64
>>> Error in post-install scriptlet: p11-kit-trust-0:0.24.1-6.fc38.x86_64 return code 0
[ 51/104] Installing openssl-libs-1:3.0.8-2.fc38.x86_64 100% | 354.9 MiB/s | 6.4 MiB | 00m00s
[ 52/104] Installing coreutils-0:9.1-11.fc38.x86_64 100% | 100.4 MiB/s | 5.6 MiB | 00m00s
>>> Running pre-install scriptlet: ca-certificates-0:2023.2.60-2.fc38.noarch
>>> Stop pre-install scriptlet: ca-certificates-0:2023.2.60-2.fc38.noarch
>>> Error in pre-install scriptlet: ca-certificates-0:2023.2.60-2.fc38.noarch return code 2
[ 53/104] Installing kmod-libs-0:30-4.fc38.x86_64 100% | 46.0 MiB/s | 141.4 KiB | 00m00s
[ 54/104] Installing gzip-0:1.12-3.fc38.x86_64 100% | 73.9 MiB/s | 378.3 KiB | 00m00s
[ 55/104] Installing kmod-0:30-4.fc38.x86_64 100% | 57.0 MiB/s | 233.3 KiB | 00m00s
[ 56/104] Installing cracklib-0:2.9.7-31.fc38.x86_64 100% | 35.7 MiB/s | 255.8 KiB | 00m00s
[ 57/104] Installing libpwquality-0:1.4.5-3.fc38.x86_64 100% | 60.2 MiB/s | 431.2 KiB | 00m00s
[ 58/104] Installing libdb-0:5.3.28-55.fc38.x86_64 100% | 305.9 MiB/s | 1.8 MiB | 00m00s
[ 59/104] Installing popt-0:1.19-2.fc38.x86_64 100% | 28.1 MiB/s | 143.9 KiB | 00m00s
[ 60/104] Installing keyutils-libs-0:1.6.1-6.fc38.x86_64 100% | 27.4 MiB/s | 56.1 KiB | 00m00s
[ 61/104] Installing libverto-0:0.3.2-5.fc38.x86_64 100% | 15.5 MiB/s | 31.7 KiB | 00m00s
[ 62/104] Installing libsigsegv-0:2.14-4.fc38.x86_64 100% | 25.1 MiB/s | 51.3 KiB | 00m00s
[ 63/104] Installing gawk-0:5.1.1-5.fc38.x86_64 100% | 183.5 MiB/s | 1.7 MiB | 00m00s
[ 64/104] Installing krb5-libs-0:1.20.1-8.fc38.x86_64 100% | 231.8 MiB/s | 2.1 MiB | 00m00s
[ 65/104] Installing libtirpc-0:1.3.3-1.fc38.x86_64 100% | 66.9 MiB/s | 205.4 KiB | 00m00s
[ 66/104] Installing libnsl2-0:2.0.0-5.fc38.x86_64 100% | 29.0 MiB/s | 59.4 KiB | 00m00s
[ 67/104] Installing cryptsetup-libs-0:2.6.1-1.fc38.x86_64 100% | 259.3 MiB/s | 2.1 MiB | 00m00s
[ 68/104] Installing device-mapper-libs-0:1.02.189-2.fc38.x86_64 100% | 134.5 MiB/s | 413.3 KiB | 00m00s
[ 69/104] Installing device-mapper-0:1.02.189-2.fc38.x86_64 100% | 116.4 MiB/s | 357.5 KiB | 00m00s
[ 70/104] Installing systemd-pam-0:253.2-1.fc38.x86_64 100% | 243.8 MiB/s | 998.6 KiB | 00m00s
[ 71/104] Installing authselect-0:1.4.2-2.fc38.x86_64 100% | 30.4 MiB/s | 155.7 KiB | 00m00s
[ 72/104] Installing pam-0:1.5.2-16.fc38.x86_64 100% | 76.9 MiB/s | 1.8 MiB | 00m00s
>>> Running pre-install scriptlet: authselect-libs-0:1.4.2-2.fc38.x86_64
>>> Stop pre-install scriptlet: authselect-libs-0:1.4.2-2.fc38.x86_64
>>> Error in pre-install scriptlet: authselect-libs-0:1.4.2-2.fc38.x86_64 return code 2
[ 73/104] Installing util-linux-0:2.38.1-4.fc38.x86_64 100% | 1.4 GiB/s | 11.1 MiB | 00m00s
>>> Unpack errro: util-linux-0:2.38.1-4.fc38.x86_64
[ 1/104] Installing systemd-0:253.2-1.fc38.x86_64 100% | 134.7 MiB/s | 13.5 MiB | 00m00s
>>> Running post-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Stop post-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Error in post-install scriptlet: systemd-0:253.2-1.fc38.x86_64 return code 0
[ 2/104] Installing systemd-udev-0:253.2-1.fc38.x86_64 100% | 148.1 MiB/s | 10.8 MiB | 00m00s
>>> Running post-install scriptlet: systemd-udev-0:253.2-1.fc38.x86_64
>>> Stop post-install scriptlet: systemd-udev-0:253.2-1.fc38.x86_64
>>> Error in post-install scriptlet: systemd-udev-0:253.2-1.fc38.x86_64 return code 0
[ 3/104] Installing libkcapi-0:1.4.0-5.fc38.x86_64 100% | 33.1 MiB/s | 101.5 KiB | 00m00s
[ 4/104] Installing libkcapi-hmaccalc-0:1.4.0-5.fc38.x86_64 100% | 13.0 MiB/s | 39.9 KiB | 00m00s
[ 5/104] Installing dracut-0:059-2.fc38.x86_64 100% | 46.1 MiB/s | 1.3 MiB | 00m00s
[ 6/104] Installing kernel-modules-core-0:6.2.11-300.fc38.x86_64 100% | 39.6 MiB/s | 36.4 MiB | 00m01s
[ 7/104] Installing kernel-core-0:6.2.11-300.fc38.x86_64 100% | 24.8 MiB/s | 22.0 MiB | 00m01s
>>> Running post-install scriptlet: kernel-core-0:6.2.11-300.fc38.x86_64
>>> Stop post-install scriptlet: kernel-core-0:6.2.11-300.fc38.x86_64
>>> Error in post-install scriptlet: kernel-core-0:6.2.11-300.fc38.x86_64 return code 0
>>> Running post-transaction scriptlet: kernel-modules-core-0:6.2.11-300.fc38.x86_64
>>> Stop post-transaction scriptlet: kernel-modules-core-0:6.2.11-300.fc38.x86_64
>>> Error in post-transaction scriptlet: kernel-modules-core-0:6.2.11-300.fc38.x86_64 return code 0
>>> Running post-transaction scriptlet: kernel-core-0:6.2.11-300.fc38.x86_64
>>> Stop post-transaction scriptlet: kernel-core-0:6.2.11-300.fc38.x86_64
>>> Error in post-transaction scriptlet: kernel-core-0:6.2.11-300.fc38.x86_64 return code 0
>>> Running trigger-install scriptlet: glibc-common-0:2.37-1.fc38.x86_64
>>> Stop trigger-install scriptlet: glibc-common-0:2.37-1.fc38.x86_64
>>> Running trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Stop trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Error in trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64 return code 0
>>> Running trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Stop trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Error in trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64 return code 0
>>> Running trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Stop trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Error in trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64 return code 0
>>> Running trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Stop trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Error in trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64 return code 0
>>> Running trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Stop trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Error in trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64 return code 0
>>> Running trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Stop trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64
>>> Error in trigger-install scriptlet: systemd-0:253.2-1.fc38.x86_64 return code 0
>>> Running trigger-install scriptlet: systemd-udev-0:253.2-1.fc38.x86_64
>>> Stop trigger-install scriptlet: systemd-udev-0:253.2-1.fc38.x86_64
>>> Error in trigger-install scriptlet: systemd-udev-0:253.2-1.fc38.x86_64 return code 0
>>> Running trigger-install scriptlet: systemd-udev-0:253.2-1.fc38.x86_64
>>> Stop trigger-install scriptlet: systemd-udev-0:253.2-1.fc38.x86_64
>>> Error in trigger-install scriptlet: systemd-udev-0:253.2-1.fc38.x86_64 return code 0
Transaction failed: Rpm transaction failed.
Note that it says "errro" in a few places.
Thank you very much for the new reproducer. Return codes are critical for many users, therefore changing priority to HIGH.
With
dnf
I get this output:Running scriptlet: kernel-core-6.2.11-300.fc38.x86_64 97/97 kernel-install: Skipping execution because KERNEL_INSTALL_BYPASS=1 warning: %posttrans(kernel-core-6.2.11-300.fc38.x86_64) scriptlet failed, exit status 1 Error in POSTTRANS scriptlet in rpm package kernel-core Running scriptlet: systemd-boot-unsigned-253.2-1.fc38.x86_64 97/97
So it seems that it does fail, but the error message and the return code got mislaid.
I tried to reproduce the issue with DNF4 and it reports warning: %posttrans(kernel-core-6.2.14-300.fc38.x86_64) scriptlet failed, exit status 1
but dnf return code was 0, therefore RPM itself does not recognize the scriptlet error as a critical error. I also tried the same operation using directly rpm and the RC was 0.
If I am not mistaken and I did not make any mistake with the reproducer, then this is not a bug in DNF or DNF5, but behavior of RPM. Please feel free to reopen the bug report if I overlooked something.
The message Error in trigger-install scriptlet: … return code 0
comes from dnf5
. This message doesn't make sense: "error, return code success".
it says "errro" in a few places.
This is still valid.
Please reopen.
(The middle line is highlighted in red.) 0 generally doesn't mean failure in shell scripts.