[Libguestfs] [supermin PATCH 2/2] Print Librpm.Multiple_matches exceptions
Richard W.M. Jones
rjones at redhat.com
Thu Jan 24 12:51:08 UTC 2019
On Wed, Jan 23, 2019 at 12:29:50PM +0100, Pino Toscano wrote:
> 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 *)
Looks good, so
ACK series
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
More information about the Libguestfs
mailing list