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

Richard W.M. Jones rjones at redhat.com
Tue Jan 26 16:06:20 UTC 2016


---
 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 "
-- 
2.5.0




More information about the Libguestfs mailing list