rpm-software-management / dnf5

Next-generation RPM package management system
Other
244 stars 83 forks source link

offline: Do not print _execute warning if run during reboot #1806

Open m-blaha opened 4 hours ago

m-blaha commented 4 hours ago

dnf5 writes the

Warning: the `_execute` command is for internal use only and is not intended to be run directly by the user. To initiate the system upgrade/offline transaction, you should run `dnf5 offline reboot`.

warning to the journal even if the _execute command was run correctly using dnf5 offline reboot. This might confuse users trying to debug failed system upgrade.

The warning should be printed only if the user tries to run dnf5 offline _execute from the command line.

See https://bugzilla.redhat.com/show_bug.cgi?id=2322527

ppisar commented 3 hours ago

Do you mean if stdin or stdout is a TTY?

ppisar commented 3 hours ago

I'd rather remove the warning completely, in all cases.

m-blaha commented 2 hours ago

Do you mean if stdin or stdout is a TTY?

Yes, this was the first possible solution I came up with :) But complete removal of the warning is also valid.