[Libguestfs] [supermin PATCH 2/2] Print Librpm.Multiple_matches exceptions

Pino Toscano ptoscano at redhat.com
Wed Jan 23 11:29:50 UTC 2019


Print a better diagnostic for them, so it is more clear which package
is detected as present multiple times.
---
 src/supermin.ml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/supermin.ml b/src/supermin.ml
index f9798f9..71d8b64 100644
--- a/src/supermin.ml
+++ b/src/supermin.ml
@@ -298,6 +298,8 @@ let () =
     error "error: %s: %s: %s" fname (Unix.error_message code) param
   | Failure msg ->                      (* from failwith/failwithf *)
     error "failure: %s" msg
+  | Librpm.Multiple_matches (package, count) -> (* from librpm *)
+    error "RPM error: %d occurrences for %s" count package
   | Invalid_argument msg ->             (* probably should never happen *)
     error "internal error: invalid argument: %s" msg
   | Assert_failure (file, line, char) -> (* should never happen *)
-- 
2.20.1




More information about the Libguestfs mailing list