Hi, When I issued the command sudo dnf upgrade needs-restarting, it updated and loaded all the repositories and said there was nothing to do.
When I issued the command immediately after the above one, sudo dnf needs-restarting, it updated and loaded all the repositories again and said "No core libraries or services have been updated since boot-up. Reboot should not be necessary".
When I issue the command immediately after the 2nd command above, sudo dnf upgrade, It loaded all the repositories and then said there were 193 packages to upgrade and 195 packages to replace.
Given that there were updates to put on why did the first command not put the updates on and then display whether or not as a result a restart was required and for which packages?
regards, Steve
On 11/3/24 1:35 PM, Stephen Morris wrote:
When I issued the command sudo dnf upgrade needs-restarting, it updated and loaded all the repositories and said there was nothing to do.
When I issued the command immediately after the above one, sudo dnf needs-restarting, it updated and loaded all the repositories again and said "No core libraries or services have been updated since boot-up. Reboot should not be necessary".
When I issue the command immediately after the 2nd command above, sudo dnf upgrade, It loaded all the repositories and then said there were 193 packages to upgrade and 195 packages to replace.
Given that there were updates to put on why did the first command not put the updates on and then display whether or not as a result a restart was required and for which packages?
Your first command was telling dnf to upgrade a package called "needs-restarting". You can only give dnf one command at a time.
Nothing to do with dnf5. That's how it's always worked.
On 4/11/24 08:52, Samuel Sieb wrote:
On 11/3/24 1:35 PM, Stephen Morris wrote:
When I issued the command sudo dnf upgrade needs-restarting, it updated and loaded all the repositories and said there was nothing to do.
When I issued the command immediately after the above one, sudo dnf needs-restarting, it updated and loaded all the repositories again and said "No core libraries or services have been updated since boot-up. Reboot should not be necessary".
When I issue the command immediately after the 2nd command above, sudo dnf upgrade, It loaded all the repositories and then said there were 193 packages to upgrade and 195 packages to replace.
Given that there were updates to put on why did the first command not put the updates on and then display whether or not as a result a restart was required and for which packages?
Your first command was telling dnf to upgrade a package called "needs-restarting". You can only give dnf one command at a time.
Nothing to do with dnf5. That's how it's always worked.
Does this mean that with the tracer addin no longer working there is no way to get the equivalent functionality with dnf at update time?
regards, Steve
On Sun, Nov 3, 2024 at 4:57 PM Stephen Morris steve.morris.au@gmail.com wrote:
[...]
Does this mean that with the tracer addin no longer working there is no way to get the equivalent functionality with dnf at update time?
According to the dnf5 man page, you should install the 'dnf5-plugins' package. Then the 'needs-restarting' command is available.
Also see https://dnf5.readthedocs.io/en/latest/dnf5.8.html and https://dnf5.readthedocs.io/en/latest/dnf5_plugins/needs_restarting.8.html#needs-restarting-plugin-ref-label.
Jeff
On 11/3/24 1:57 PM, Stephen Morris wrote:
On 4/11/24 08:52, Samuel Sieb wrote:
On 11/3/24 1:35 PM, Stephen Morris wrote:
When I issued the command sudo dnf upgrade needs-restarting, it updated and loaded all the repositories and said there was nothing to do.
When I issued the command immediately after the above one, sudo dnf needs-restarting, it updated and loaded all the repositories again and said "No core libraries or services have been updated since boot-up. Reboot should not be necessary".
When I issue the command immediately after the 2nd command above, sudo dnf upgrade, It loaded all the repositories and then said there were 193 packages to upgrade and 195 packages to replace.
Given that there were updates to put on why did the first command not put the updates on and then display whether or not as a result a restart was required and for which packages?
Your first command was telling dnf to upgrade a package called "needs- restarting". You can only give dnf one command at a time.
Nothing to do with dnf5. That's how it's always worked.
Does this mean that with the tracer addin no longer working there is no way to get the equivalent functionality with dnf at update time?
How did you do this before? The only difference between dnf4 and dnf5 is that dnf4 will actually tell you that there's no package called "needs-restarting" where dnf5 just says there's nothing to do. You also showed that the "needs-restarting" command is also working, so there's no issue here.
On Sun, 2024-11-03 at 17:02 -0500, Jeffrey Walton wrote:
On Sun, Nov 3, 2024 at 4:57 PM Stephen Morris steve.morris.au@gmail.com wrote:
[...]
Does this mean that with the tracer addin no longer working there is no way to get the equivalent functionality with dnf at update time?
According to the dnf5 man page, you should install the 'dnf5-plugins' package. Then the 'needs-restarting' command is available.
Also see https://dnf5.readthedocs.io/en/latest/dnf5.8.html and https://dnf5.readthedocs.io/en/latest/dnf5_plugins/needs_restarting.8.html#needs-restarting-plugin-ref-label.
As I posted in a separate thread on Friday last, I think that both the command 'tracer' and the corresponding dnf5 plugin are broken. I've been waiting to see if anyone contradicts this but so far no-one has, so I may post a BZ report. It seems to me a serious regression.
poc
On 4/11/24 09:09, Samuel Sieb wrote:
On 11/3/24 1:57 PM, Stephen Morris wrote:
On 4/11/24 08:52, Samuel Sieb wrote:
On 11/3/24 1:35 PM, Stephen Morris wrote:
When I issued the command sudo dnf upgrade needs-restarting, it updated and loaded all the repositories and said there was nothing to do.
When I issued the command immediately after the above one, sudo dnf needs-restarting, it updated and loaded all the repositories again and said "No core libraries or services have been updated since boot-up. Reboot should not be necessary".
When I issue the command immediately after the 2nd command above, sudo dnf upgrade, It loaded all the repositories and then said there were 193 packages to upgrade and 195 packages to replace.
Given that there were updates to put on why did the first command not put the updates on and then display whether or not as a result a restart was required and for which packages?
Your first command was telling dnf to upgrade a package called "needs- restarting". You can only give dnf one command at a time.
Nothing to do with dnf5. That's how it's always worked.
Does this mean that with the tracer addin no longer working there is no way to get the equivalent functionality with dnf at update time?
How did you do this before? The only difference between dnf4 and dnf5 is that dnf4 will actually tell you that there's no package called "needs-restarting" where dnf5 just says there's nothing to do. You also showed that the "needs-restarting" command is also working, so there's no issue here.
In dnf4 I was using the tracer plugin, which seems to not work in dnf5, so in dnf4 the needs-restarting was not required, although in dnf4 I don't remember seeing needs-restarting as a command when issuing dnf --help. With the plugins not working I was expecting to be able to issue both commands at once and get the equivalent functionality to the tracer plugin.
regards, Steve
On 11/3/24 2:20 PM, Stephen Morris wrote:
On 4/11/24 09:09, Samuel Sieb wrote:
On 11/3/24 1:57 PM, Stephen Morris wrote:
On 4/11/24 08:52, Samuel Sieb wrote:
On 11/3/24 1:35 PM, Stephen Morris wrote:
When I issued the command immediately after the above one, sudo dnf needs-restarting, it updated and loaded all the repositories again and said "No core libraries or services have been updated since boot-up. Reboot should not be necessary".
Does this mean that with the tracer addin no longer working there is no way to get the equivalent functionality with dnf at update time?
How did you do this before? The only difference between dnf4 and dnf5 is that dnf4 will actually tell you that there's no package called "needs-restarting" where dnf5 just says there's nothing to do. You also showed that the "needs-restarting" command is also working, so there's no issue here.
In dnf4 I was using the tracer plugin, which seems to not work in dnf5, so in dnf4 the needs-restarting was not required, although in dnf4 I don't remember seeing needs-restarting as a command when issuing dnf --help. With the plugins not working I was expecting to be able to issue both commands at once and get the equivalent functionality to the tracer plugin.
You do issue both commands, but not at the same time. You run "needs-restarting" after the upgrade. See what it said above when you tried running it.
On Mon, 2024-11-04 at 09:20 +1100, Stephen Morris wrote:
How did you do this before? The only difference between dnf4 and dnf5 is that dnf4 will actually tell you that there's no package called "needs-restarting" where dnf5 just says there's nothing to do. You also showed that the "needs-restarting" command is also working, so there's no issue here.
In dnf4 I was using the tracer plugin, which seems to not work in dnf5, so in dnf4 the needs-restarting was not required, although in dnf4 I don't remember seeing needs-restarting as a command when issuing dnf --help.
AFAIK 'dnf --help' only lists builtin commands, not plugins. Plugins are listed on the dnf man page (i.e. there is a fixed set available).
With the plugins not working I was expecting to be able to issue both commands at once and get the equivalent functionality to the tracer plugin.
Prior to F41 I used to use both the 'tracer' plugin and the separate 'tracer' command. IIRC the 'needs-restarting' command was an earlier version of a similar idea, but in F41 we now have 'dnf5-needs- restarting', which can also be invoked as a plugin (the --needs- restarting option).
The 'tracer' command does exist in F41, but doesn't work, and there is apparently no longer a 'tracer' plugin. The needs-restarting plugin doesn't work either.
poc
On Sun, 2024-11-03 at 14:37 -0800, Samuel Sieb wrote:
In dnf4 I was using the tracer plugin, which seems to not work in dnf5, so in dnf4 the needs-restarting was not required, although in dnf4 I don't remember seeing needs-restarting as a command when issuing dnf --help. With the plugins not working I was expecting to be able to issue both commands at once and get the equivalent functionality to the tracer plugin.
You do issue both commands, but not at the same time. You run "needs-restarting" after the upgrade. See what it said above when you tried running it.
BTW, the --needs-restarting option and separate command only claim to tell you if the system needs rebooting. With an additional option it will also tell you about system services that need restarting. In neither case will it report just any random process as the 'tracer' command does (when it works).
poc
On Sun, Nov 3, 2024 at 5:14 PM Patrick O'Callaghan pocallaghan@gmail.com wrote:
On Sun, 2024-11-03 at 17:02 -0500, Jeffrey Walton wrote:
On Sun, Nov 3, 2024 at 4:57 PM Stephen Morris steve.morris.au@gmail.com wrote:
[...]
Does this mean that with the tracer addin no longer working there is no way to get the equivalent functionality with dnf at update time?
According to the dnf5 man page, you should install the 'dnf5-plugins' package. Then the 'needs-restarting' command is available.
Also see https://dnf5.readthedocs.io/en/latest/dnf5.8.html and https://dnf5.readthedocs.io/en/latest/dnf5_plugins/needs_restarting.8.html#needs-restarting-plugin-ref-label.
As I posted in a separate thread on Friday last, I think that both the command 'tracer' and the corresponding dnf5 plugin are broken. I've been waiting to see if anyone contradicts this but so far no-one has, so I may post a BZ report. It seems to me a serious regression.
Looks OK to me for the case that no reboot is necessary. The behavior follows what the man page says.
$ dnf needs-restarting Updating and loading repositories: Fedora 41 - x86_64 100% | 10.8 MiB/s | 98.1 MiB | 00m09s Fedora 41 - x86_64 - Updates 100% | 11.4 MiB/s | 20.4 MiB | 00m02s Fedora 41 OpenH264 (from Cisco) - x86_ 100% | 6.0 KiB/s | 8.1 KiB | 00m01s Repositories loaded. No core libraries or services have been updated since boot-up. Reboot should not be necessary.
$ echo $? 0
But I don't have a machine that needs a reboot at the moment, so that case was not tested. A kernel update should tickle that case.
Jeff
On Sun, 2024-11-03 at 19:02 -0500, Jeffrey Walton wrote:
As I posted in a separate thread on Friday last, I think that both the command 'tracer' and the corresponding dnf5 plugin are broken. I've been waiting to see if anyone contradicts this but so far no-one has, so I may post a BZ report. It seems to me a serious regression.
Looks OK to me for the case that no reboot is necessary. The behavior follows what the man page says.
$ dnf needs-restarting Updating and loading repositories: Fedora 41 - x86_64 100% | 10.8 MiB/s | 98.1 MiB | 00m09s Fedora 41 - x86_64 - Updates 100% | 11.4 MiB/s | 20.4 MiB | 00m02s Fedora 41 OpenH264 (from Cisco) - x86_ 100% | 6.0 KiB/s | 8.1 KiB | 00m01s Repositories loaded. No core libraries or services have been updated since boot-up. Reboot should not be necessary.
$ echo $? 0
But I don't have a machine that needs a reboot at the moment, so that case was not tested. A kernel update should tickle that case.
I was really talking about 'tracer', which for me definitely isn't working. I find tracer more useful because it tells me about anything that's out of date, not just system reboots or service restarts.
At least it used to when it worked. And as it's still present in F41 the fact that it doesn't work is concerning.
poc
On 4/11/24 09:48, Patrick O'Callaghan wrote:
The 'tracer' command does exist in F41, but doesn't work, and there is apparently no longer a 'tracer' plugin. The needs-restarting plugin doesn't work either.
Is python3-dnf-plugin-tracer.noarch Version 4.1.2-3.fc41 not the tracer plugin? I also tried the command "sudo dnf --needs-restarting upgrade" and got the message 'Unknown argument "--needs-restarting" for command "dnf5". Add "--help" for more information about the arguments'. Am I missing a package? I also issued "man dnf" and the dnf5 information listed did not mention anything about a --needs-restarting option being available. It does mention a dnf5-needs-restarting command with an associated man page, but dnf5-needs-restarting doesn't exist on my system. There is a needs-restarting command that was provided by dnf-utils and I have the dnf5-plugins package installed.
regards, Steve
On Tue, 2024-11-05 at 09:03 +1100, Stephen Morris wrote:
On 4/11/24 09:48, Patrick O'Callaghan wrote:
The 'tracer' command does exist in F41, but doesn't work, and there is apparently no longer a 'tracer' plugin. The needs-restarting plugin doesn't work either.
Is python3-dnf-plugin-tracer.noarch Version 4.1.2-3.fc41 not the tracer plugin? I also tried the command "sudo dnf --needs-restarting upgrade" and got the message 'Unknown argument "--needs-restarting" for command "dnf5". Add "--help" for more information about the arguments'. Am I missing a package? I also issued "man dnf" and the dnf5 information listed did not mention anything about a --needs-restarting option being available. It does mention a dnf5-needs-restarting command with an associated man page, but dnf5-needs-restarting doesn't exist on my system.
That's rather confusing. I had the same experience, but what it actually means is "dnf5 needs-restarting" (no '--'). The documentation could be better.
poc
On 5/11/24 09:11, Patrick O'Callaghan wrote:
That's rather confusing. I had the same experience, but what it actually means is "dnf5 needs-restarting" (no '--'). The documentation could be better.
Thanks Patrick. I had already tried that command which told me there was nothing that needed restarting. Sudo needs-restarting --services tells me nothing which apparently is normal if there are no "important" packages (the man page does provide a url that shows a list of packages that are checked) or services that need restarting.
regards, Steve
On Tue, 2024-11-05 at 09:24 +1100, Stephen Morris wrote:
On 5/11/24 09:11, Patrick O'Callaghan wrote:
That's rather confusing. I had the same experience, but what it actually means is "dnf5 needs-restarting" (no '--'). The documentation could be better.
Thanks Patrick. I had already tried that command which told me there was nothing that needed restarting. Sudo needs-restarting --services tells me nothing which apparently is normal if there are no "important" packages (the man page does provide a url that shows a list of packages that are checked) or services that need restarting.
Yes, however my problem is that it only checks services, not other kinds of process. In contrast, the 'tracer' command is for checking everything, but currently (as of the update to F41) just doesn't work.
poc
Am 03.11.24 um 11:13 PM schrieb Patrick O'Callaghan:
On Sun, 2024-11-03 at 17:02 -0500, Jeffrey Walton wrote:
On Sun, Nov 3, 2024 at 4:57 PM Stephen Morris steve.morris.au@gmail.com wrote:
[...]
Does this mean that with the tracer addin no longer working there is no way to get the equivalent functionality with dnf at update time?
According to the dnf5 man page, you should install the 'dnf5-plugins' package. Then the 'needs-restarting' command is available.
Also see https://dnf5.readthedocs.io/en/latest/dnf5.8.html and https://dnf5.readthedocs.io/en/latest/dnf5_plugins/needs_restarting.8.html#needs-restarting-plugin-ref-label.
As I posted in a separate thread on Friday last, I think that both the command 'tracer' and the corresponding dnf5 plugin are broken.
ACK.
# dnf needs-restarting Updating and loading repositories: Repositories loaded. No core libraries or services have been updated since boot-up. Reboot should not be necessary.
# dnf needs-restarting -s Updating and loading repositories: Repositories loaded. NetworkManager-wait-online.service accounts-daemon.service alsa-state.service atd.service [long list of services]
Ralf
On Tue, 2024-11-05 at 08:42 +0100, Ralf Corsépius wrote:
Am 03.11.24 um 11:13 PM schrieb Patrick O'Callaghan:
On Sun, 2024-11-03 at 17:02 -0500, Jeffrey Walton wrote:
On Sun, Nov 3, 2024 at 4:57 PM Stephen Morris steve.morris.au@gmail.com wrote:
[...]
Does this mean that with the tracer addin no longer working there is no way to get the equivalent functionality with dnf at update time?
According to the dnf5 man page, you should install the 'dnf5-plugins' package. Then the 'needs-restarting' command is available.
Also see https://dnf5.readthedocs.io/en/latest/dnf5.8.html and https://dnf5.readthedocs.io/en/latest/dnf5_plugins/needs_restarting.8.html#needs-restarting-plugin-ref-label.
As I posted in a separate thread on Friday last, I think that both the command 'tracer' and the corresponding dnf5 plugin are broken.
ACK.
# dnf needs-restarting Updating and loading repositories: Repositories loaded. No core libraries or services have been updated since boot-up. Reboot should not be necessary.
# dnf needs-restarting -s Updating and loading repositories: Repositories loaded. NetworkManager-wait-online.service accounts-daemon.service alsa-state.service atd.service [long list of services]
My comment was about the 'tracer' command, not the 'needs-restarting' thing. They have overlapping but distinct functions. What does 'tracer' say in your case?
poc
On 4 Nov 2024, at 22:24, Stephen Morris steve.morris.au@gmail.com wrote:
Sudo needs-restarting --services tells me nothing which apparently is normal if there are no "important" packages (the man page does provide a url that shows a list of packages that are checked) or services that need restarting.
I found issues with the needs-restarting logic in dnf4 and not use this as the most reliable query.
dnf needs-restarting --services --reboot hint
I found that both options were needed. I also check if the kernel was in the dnf update that I will have done just before this query.
The bug in dnf4 was that it's logic for --reboothint was buggy and sometimes it would not suggest a reboot was needed. It was comparing dates that do not mean what the dnf authors thought they did. I do not know if this is fix for dnf5.
Barry