Closed doccaz closed 2 years ago
I believe I got this now. I changed the regex from:
base_regex = r"Basesystem.*"
to:
base_regex = r"(SUSE Linux Enterprise.*|Basesystem.*)"
Since the regexes in this case are evaluated in order, it should prioritize updates found in the repos beginning with "SUSE Linux Enterprise", which means the LTSS ones, before deciding on a "Basesystem" repo (if available).
I also implemented a simple version comparison function, using the LooseVersion class. So, if the results contain:
a) a package that is either in the LTSS or Basesystem repos and b) is also higher version than the package installed on the system
then we consider the result valid as an upgrade.
With this change, the dbus-1 package is now considered "up-to-date", as it matches the version 1.12-8.6.1, which is part of the 15 SP1 LTSS repository.
Also note that the "different versions" report shows that other LTSS updates were correctly picked up:
timezone,2021a-3.44.1,2021a-3.47.1,SUSE Linux Enterprise Server LTSS 15 SP1 x86_64
An interesting side-effect can be seen in the "different versions" report:
opensm,5.5.0.MLNX20190923.1c78385-0.1.47100,3.3.21-6.29,Server Applications Module 15 SP1 x86_64
opensm-devel,5.5.0.MLNX20190923.1c78385-0.1.47100,3.3.21-6.29,Server Applications Module 15 SP1 x86_64
which are also referenced in the "unsupported" report:
opensm,(none),5.5.0.MLNX20190923.1c78385-0.1.47100
opensm-devel,(none),5.5.0.MLNX20190923.1c78385-0.1.47100
In this case, these two packages are from an unsupported vendor. BUT, there are official versions are present in our repositories, and the supported versions are reported in the "different versions" report. This was not intended, but should be useful information to have.
Analyzing scc_ccd03b001421_210922_1732, vercheck shows an older version of dbus1 than they have installed. Also looks like its displaying the shipping version instead of updates channel:
dbus-1,1.12.2-8.6.1,1.12.2-8.3.1,Basesystem Module 15 SP1 x86_64
I assume the versions reported by repositories that match the "base_regex" have more priority over the other repositories. However, it seems I forgot to check if the version is actually higher than the original version and discard it if otherwise.