Skip to content

[th/version-parse] some inital steps for handling package versions more flexible

Thomas Haller requested to merge th/version-parse into master

The matching of versions is done by version_control.py.

It detects whether the test machine is RHEL or Fedora (current_rhel_version, current_fedora_version).

It somehow also honors @fedora_pkg, @not_with_fedora_pkg, @rhel_pkg, and @not_with_rhel_pkg. But that does not seem right to me.

There are two separate things:

  1. the test machine is running a certain Fedora/RHEL version.

  2. the NetworkManager RPM that we have installed. This is basically the NetworkManager code we have, it can be from upstream (e.g. copr), or a package from dist-git (rhpkg, fedpkg).

Note that the version numbers between upstream are not directly comparable. For example, on RHEL we might have version "1.30.0-0.2", but that version is older than upstream's "1.30.0". In most cases, the difference is small enough and you can ignore them. But optimally, we have different variants. I call them here "stream"s.

Add a function to parse NetworkManager -V to detect the version and the stream.

I think we could extend that to for example tag tests like (for example):

  @ver+=1.31.5
  @ver+=1.30.3
  @ver+=1.28.7
  @rhelver+=1.30.0-0.4

(where rhel's 1.30.0-0.4 is basically closest to upstream's "1.29.15-dev")

This should be possible. This MR doesn't do that yet. But it adds a parse method that can detect the stream.

Merge request reports