[Libguestfs] [PATCH] customize: Add support for the APK (Alpine Linux) package manager.

Pino Toscano ptoscano at redhat.com
Tue Jan 26 17:51:27 UTC 2016


On Tuesday 26 January 2016 16:06:20 Richard W.M. Jones wrote:
> ---
>  customize/customize_run.ml | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/customize/customize_run.ml b/customize/customize_run.ml
> index ed3c818..48475af 100644
> --- a/customize/customize_run.ml
> +++ b/customize/customize_run.ml
> @@ -97,6 +97,11 @@ exec >>%s 2>&1
>    let guest_install_command packages =
>      let quoted_args = String.concat " " (List.map quote packages) in
>      match g#inspect_get_package_management root with
> +    | "apk" ->
> +       sprintf "
> +         apk update
> +         apk add %s
> +       " quoted_args
>      | "apt" ->
>        (* http://unix.stackexchange.com/questions/22820 *)
>        sprintf "
> @@ -124,6 +129,11 @@ exec >>%s 2>&1
>  
>    and guest_update_command () =
>      match g#inspect_get_package_management root with
> +    | "apk" ->
> +       sprintf "
> +         apk update
> +         apk upgrade
> +       "
>      | "apt" ->
>        (* http://unix.stackexchange.com/questions/22820 *)
>        sprintf "

LGTM.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20160126/e9394f58/attachment.sig>


More information about the Libguestfs mailing list