Displaying 2 results from an estimated 2 matches for "re_rpm_version".
2019 Jan 29
2
[PATCH] v2v: linux: use NEVR for querying RPM packages (RHBZ#1669395)
Use NEVR when querying RPM for the list of files of a package, instead
of ENVR. Also, use the epoch only when non-zero, and version of RPM
supports it.
The approach is basically copied from what supermin does in its RPM
package handler.
---
v2v/linux.ml | 52 +++++++++++++++++++++++++++++++---------------------
1 file changed, 31 insertions(+), 21 deletions(-)
diff --git a/v2v/linux.ml
2019 Jan 30
0
Re: [PATCH] v2v: linux: use NEVR for querying RPM packages (RHBZ#1669395)
...-> error (f_"unrecognized RPM version: %s") ver in
Because this comes from the guest the version field could contain any
old stuff, making this a bit error prone. I think it would also be
nice if we didn't error out in the last case. Something like this
seems better to me:
let re_rpm_version = PCRE.compile "(\\d+)\\.(\\d+)"
...
let ver =
if PCRE.matches re_rpm_version ver then
(int_of_string (PCRE.sub 1), int_of_string (PCRE.sub 2))
else
(0, 0) in
let is_rpm_lt_4_11 = ver < (4, 11) in
(We already have this sort of code in daemon/inspect_utils.ml,...