Detection of available package updates - packages available from multiple repos

SYSTEM INFORMATION
OS type and version Rocky 9.5
Webmin version 2.202

I have a couple of servers with similar configuration. They both have the same issue which has been present for more than a year I think (I kept hoping that an update would fix it).

The servers run openlitespeed web servers (Litespeed-update repo) using PHP from the Remi repo. I need to have both repos enabled to get updates on both OLS and PHP.

The problem is that both repos contain the package lsphp74-mysqlnd but Litespeed-update repo has version 7.4.32-2.el9 and remi repo has version 7.4.33-2.el9. The correct later version has been installed, so dnf finds nothing to upgrade, but webmin persists in nagging that there is an update available for this package.


You see that the installed version is later than the available version.

Have I missed something obvious, or is this a bug?

Webmin has nothing to do with it.

The version detection is done by dnf. It is not done by Webmin. One package presumably has an Epoch set, and it is higher than the other, or the other does not have an Epoch set (and thus evaluates to 0). That’s none of our business, and Webmin cannot control that. You picked that repo, Webmin is telling you what the package manager thinks should happen in order to update that package. Epoch trumps version.

Anyway, you’re going off on your own with multiple third-party repos, and you’ve mixed multiple repos that provide the same packages. That’s risky, and you should be aware that is risky (this version thing may be the least of your worries…if the packages use different paths for config files and data, you might end up with a lot of stuff broken in mysterious and difficult to diagnose ways). If you’re going to do that, you should do so with extreme caution. You probably need to choose which one to get the overlapping packages from and exclude them from the others.

Here’s a doc on the subject, though I’m sure there’s a better man page for it, I can’t seem to remember what it’d be called: How do I exclude kernel or other packages from getting updated in Red Hat Enterprise Linux while updating system via yum? - Red Hat Customer Portal

Actually Webmin is the problem here, not my server configuration and not DNF.

Webmin is misinterpreting the output of DNF check-update.

If we look at the output of dnf check-update from another test machine that is not fully updated (some irrelevent packages omitted for clarity):

[mike@localhost ~]$ dnf check-update
Last metadata expiration check: 1:23:16 ago on Tue 26 Nov 2024 08:11:09.

NetworkManager.x86_64                                   1:1.48.10-2.el9_5                     baseos                                    
gdb.x86_64                                              14.2-3.el9                            appstream                                 
grub2-common.noarch                                     1:2.06-92.el9                         baseos                                    
grub2-pc.x86_64                                         1:2.06-92.el9                         baseos                                    
grub2-pc-modules.noarch                                 1:2.06-92.el9                         baseos                                    
grub2-tools.x86_64                                      1:2.06-92.el9                         baseos                                    
grub2-tools-minimal.x86_64                              1:2.06-92.el9                         baseos                                    
openlitespeed.x86_64                                    1.8.2-1.el9                           litespeed                                 

Obsoleting Packages

grub2-tools.x86_64                                      1:2.06-92.el9                         baseos                                    
    grub2-tools.x86_64                                  1:2.06-80.el9_4                       @baseos                                   
grub2-tools-efi.x86_64                                  1:2.06-92.el9                         baseos                                    
    grub2-tools.x86_64                                  1:2.06-80.el9_4                       @baseos                                   
grub2-tools-extra.x86_64                                1:2.06-92.el9                         baseos                                    
    grub2-tools.x86_64                                  1:2.06-80.el9_4                       @baseos                                   
grub2-tools-minimal.x86_64                              1:2.06-92.el9                         baseos                                    
    grub2-tools.x86_64                                  1:2.06-80.el9_4                       @baseos                                   
lsphp74-mysqlnd.x86_64                                  7.4.32-2.el9                          litespeed-update                          
    lsphp74-mysqlnd.x86_64                              7.4.33-2.el9                          @litespeed-update                         
lsphp74-mysqlnd.x86_64                                  7.4.33-2.el9                          @litespeed-update                         
    lsphp74-mysqlnd.x86_64                              7.4.33-2.el9                          @litespeed-update                         
lsphp74-mysqlnd.x86_64                                  7.4.33-2.el9                          litespeed-update                          
    lsphp74-mysqlnd.x86_64                              7.4.33-2.el9                          @litespeed-update                         

[mike@localhost ~]$

There is a line “Obsoleting Packages” in the middle of the output. All the packages listed above that line are due to be updated, the packages below “Obsoleting Packages” are not being updated (unless they also appear above), the data here is showing relationships between obsolete and non-obsolete packages and should be ignored by webmin for the purpose of counting available updates.

The obvious fix (which I have successfully tried) is to break the webmin processing loop when it encounters the line “Obsoleting Packages” while parsing the output of "dnf check-update:

while(<PKG>) {
        s/\r|\n//g;
	if (/^(\S+)\.([^\.]+)\s+(\S+)\s+(\S+)/ && $2 ne 'src') {
		local $pkg = { 'name' => $1,
			       'arch' => $2,
			       'version' => $3,
			       'source' => $4 };
		if ($pkg->{'version'} =~ s/^(\S+)://) {
			$pkg->{'epoch'} = $1;
			}
		$done{$pkg->{'name'}} = $pkg;
		push(@rv, $pkg);
		}
	**if (/^Obsoleting Packages/) {**
**	       last;**
**	       }**
	}

Alternatively, the command “dnf check-update” can simply be replaced in the webmin function by the command “dnf list updates” which gives the same output, but without the “Obsoleting Packages” data.

1 Like

Egads. You found a bug! Thanks for the heads up.

I’ll ask @Jamie to have a look.

Thanks for raising this. We’ll adopt the simple solution and stop processing at the Obsoleting Packages line.