Richard W.M. Jones
2016-Jan-26 16:06 UTC
[Libguestfs] [PATCH] customize: Add support for the APK (Alpine Linux) package manager.
--- 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
Pino Toscano
2016-Jan-26 17:51 UTC
Re: [Libguestfs] [PATCH] customize: Add support for the APK (Alpine Linux) package manager.
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
Seemingly Similar Threads
- Re: [PATCH 2/2] customize: Improve the error messages when package manager is unknown or unsupported.
- [PATCH] customize: Add --uninstall operation.
- [PATCH 2/2] customize: Improve the error messages when package manager is unknown or unsupported.
- [PATCH 1/2] inspection: Set package manager to "unknown" if parsing major version failed (RHBZ#1332025).
- [PATCH] customize: use --noconfirm when installing Arch Linux packages