[ostree] deploy: With --no-kernel, do copy host kernel modules
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] deploy: With --no-kernel, do copy host kernel modules
- Date: Wed, 21 Nov 2012 17:39:40 +0000 (UTC)
commit f2b1be6a1eb8a42b2f5b1f187d4b5d37b7510b88
Author: Colin Walters <walters verbum org>
Date: Wed Nov 21 12:38:29 2012 -0500
deploy: With --no-kernel, do copy host kernel modules
This is used by the qemu scripts, and there we *do* need the kernel
modules inside the target system.
src/ostree/ot-admin-builtin-deploy.c | 9 ++++-----
src/ostree/ot-admin-builtin-update-kernel.c | 18 ++++++++++++------
2 files changed, 16 insertions(+), 11 deletions(-)
---
diff --git a/src/ostree/ot-admin-builtin-deploy.c b/src/ostree/ot-admin-builtin-deploy.c
index 77a7e21..f424694 100644
--- a/src/ostree/ot-admin-builtin-deploy.c
+++ b/src/ostree/ot-admin-builtin-deploy.c
@@ -548,6 +548,8 @@ do_update_kernel (OtAdminDeploy *self,
"--ostree-dir", ot_gfile_get_path_cached (self->ostree_dir),
"update-kernel",
ot_gfile_get_path_cached (deploy_path), NULL);
+ if (opt_no_kernel)
+ g_ptr_array_add (args, "--modules-only");
g_ptr_array_add (args, NULL);
if (!ot_spawn_sync_checked (ot_gfile_get_path_cached (self->ostree_dir),
@@ -606,11 +608,8 @@ ot_admin_builtin_deploy (int argc, char **argv, GFile *ostree_dir, GError **erro
cancellable, error))
goto out;
- if (!opt_no_kernel)
- {
- if (!do_update_kernel (self, deploy_path, cancellable, error))
- goto out;
- }
+ if (!do_update_kernel (self, deploy_path, cancellable, error))
+ goto out;
ret = TRUE;
out:
diff --git a/src/ostree/ot-admin-builtin-update-kernel.c b/src/ostree/ot-admin-builtin-update-kernel.c
index 57f2328..699456c 100644
--- a/src/ostree/ot-admin-builtin-update-kernel.c
+++ b/src/ostree/ot-admin-builtin-update-kernel.c
@@ -32,7 +32,10 @@ typedef struct {
GFile *ostree_dir;
} OtAdminUpdateKernel;
+static gboolean opt_modules_only;
+
static GOptionEntry options[] = {
+ { "modules-only", 0, 0, G_OPTION_ARG_NONE, &opt_modules_only, "Only copy kernel modules", NULL },
{ NULL }
};
@@ -322,12 +325,15 @@ ot_admin_builtin_update_kernel (int argc, char **argv, GFile *ostree_dir, GError
if (!copy_modules (self, release, cancellable, error))
goto out;
-
- if (!update_initramfs (self, release, deploy_path, cancellable, error))
- goto out;
-
- if (!update_grub (self, release, cancellable, error))
- goto out;
+
+ if (!opt_modules_only)
+ {
+ if (!update_initramfs (self, release, deploy_path, cancellable, error))
+ goto out;
+
+ if (!update_grub (self, release, cancellable, error))
+ goto out;
+ }
ret = TRUE;
out:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]