[Libguestfs] [PATCH] rpm: improve dnf invocation
Richard W.M. Jones
rjones at redhat.com
Tue Nov 25 14:29:11 UTC 2014
On Mon, Nov 24, 2014 at 03:52:28PM +0100, Pino Toscano wrote:
> Handle debug level and packager config.
> ---
> src/rpm.ml | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/src/rpm.ml b/src/rpm.ml
> index 771022e..46954c8 100644
> --- a/src/rpm.ml
> +++ b/src/rpm.ml
> @@ -308,8 +308,14 @@ let rec fedora_download_all_packages pkgs dir =
> let rpms = pkgs_as_NA_rpms pkgs in
>
> let cmd =
> - sprintf "%s download --destdir %s %s"
> - Config.dnf (quote tdir) (quoted_list rpms) in
> + sprintf "%s download%s%s --destdir %s %s"
> + Config.dnf
> + (if !settings.debug >= 1 then " -v" else " -q")
> + (match !settings.packager_config with
> + | None -> ""
> + | Some filename -> sprintf " -c %s" (quote filename))
> + (quote tdir)
> + (quoted_list rpms) in
> run_command cmd
> );
ACK.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
More information about the Libguestfs
mailing list