Skip to content

rpm script output not always printed #4468

Open
@champtar

Description

@champtar

rpm scripts outputs are often not printed, so we potentially missing important errors or warnings

Host system details
Alma 8.8 build host (rpm-ostree 2022.10...)

Expected vs actual behavior

# rpm-ostree compose tree --unified-core

Checking out packages... done
Running pre scripts... 18 done
⠙ Running post scripts... zlib
readline.post: install-info: No such file or directory for /usr/share/info/history.info
⠒ Running post scripts... readline
⠂ Running post scripts... nettle
⠂ Running post scripts... file-libs
[...]
⠓ Running post scripts... grub2-tools
grub2-tools.post: install-info: No such file or directory for /usr/share/info/grub2.info.gz
⠉ Running post scripts... cockpit-ws

Expected:
ALL ouputs from rpm scripts are printed (put |& cat after the command)

Input state hash: XXX
Relabeling...done
Checking out packages...done
Running pre scripts...18 done
Running post scripts...done
Running posttrans scripts...24 done
Writing rpmdb...done
readline.post: install-info: No such file or directory for /usr/share/info/history.info
readline.post: install-info: No such file or directory for /usr/share/info/rluserman.info
sed.post: install-info: No such file or directory for /usr/share/info/sed.info.gz
nettle.post: install-info: No such file or directory for /usr/share/info/nettle.info
grep.post: install-info: No such file or directory for /usr/share/info/grep.info.gz
diffutils.post: install-info: No such file or directory for /usr/share/info/diffutils.info
gettext.post: install-info: No such file or directory for /usr/share/info/gettext.info.gz
binutils.post: install-info: No such file or directory for /usr/share/info/as.info.gz
binutils.post: install-info: No such file or directory for /usr/share/info/binutils.info.gz
binutils.post: install-info: No such file or directory for /usr/share/info/gprof.info.gz
binutils.post: install-info: No such file or directory for /usr/share/info/ld.info.gz
binutils.post: install-info: No such file or directory for /usr/share/info/standards.info.gz
systemd-udev.post: Failed to create directory /var/lib/systemd: Read-only file system
device-mapper-event.post: rpm-ostree-systemctl: Ignored non-preset command: enable dm-event.socket
chrony.post: rpm-ostree-systemctl: Ignored non-preset command: daemon-reload
wget.post: install-info: No such file or directory for /usr/share/info/wget.info.gz
grub2-tools.post: install-info: No such file or directory for /usr/share/info/grub2.info.gz
grub2-tools.post: install-info: No such file or directory for /usr/share/info/grub2-dev.info.gz
cockpit-ws.post: libsemanage.semanage_direct_install_info: Overriding cockpit module at lower priority 100 with module at priority 200.
lvm2.post: rpm-ostree-systemctl: Ignored non-preset command: enable lvm2-monitor.service
lvm2.post: rpm-ostree-systemctl: Ignored non-preset command: enable lvm2-lvmpolld.socket
epel-release.post: Many EPEL packages require the CodeReady Builder (CRB) repository.
epel-release.post: It is recommended that you run /usr/bin/crb enable to enable the CRB repository.
Regenerating rpmdb for target
Relabeling...done
Executing postprocessing script

note that when using the workaround the *.post outputs are printed pretty late (should be between post and posttrans lines)

Steps to reproduce it
Replace bwrap with a small script to log, look at the logs

mv /usr/bin/bwrap /usr/bin/bwrap-original
cat > /usr/bin/bwrap <<'EOF'
#!/bin/bash
mkdir -p /tmp/bwrap-logs
bwrap-original "$@" |& tee /tmp/bwrap-logs/$$
EOF

As a workaround you can also add |& cat after the command

I think we need to stop the spinner and or flush stdout and or set the buffering mode to line somewhere.

Would you like to work on the issue?
No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions