diff --git a/man/rpm-ostree.xml b/man/rpm-ostree.xml
index 0f35de3a..1429506c 100644
--- a/man/rpm-ostree.xml
+++ b/man/rpm-ostree.xml
@@ -229,6 +229,15 @@ Boston, MA 02111-1307, USA.
uninstall command.
+
+ If this is the first time a machine-local change is made,
+ note that this will change rpm-ostree to operate in full
+ hybrid mode. Concretely, rpm-ostree will also start
+ fetching all enabled rpm-md (yum) repositories and use
+ those for package updates every time
+ rpm-ostree upgrade is invoked.
+
+
rpm-ostree remembers these requests even if a later host
update includes those packages already: if the packages are
@@ -273,6 +282,11 @@ Boston, MA 02111-1307, USA.
invocation to perform the
operation completely offline.
+
+
+ will perform a subsequent apply-live
+ operation to apply changes to the booted deployment.
+
diff --git a/src/app/rpmostree-pkg-builtins.cxx b/src/app/rpmostree-pkg-builtins.cxx
index e9e5ec5b..0597f4b0 100644
--- a/src/app/rpmostree-pkg-builtins.cxx
+++ b/src/app/rpmostree-pkg-builtins.cxx
@@ -32,6 +32,7 @@
static char *opt_osname;
static gboolean opt_reboot;
static gboolean opt_dry_run;
+static gboolean opt_apply_live;
static gboolean opt_idempotent;
static gchar **opt_install;
static gchar **opt_uninstall;
@@ -63,6 +64,7 @@ static GOptionEntry install_option_entry[] = {
{ "uninstall", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_uninstall, "Remove overlayed additional package", "PKG" },
{ "cache-only", 'C', 0, G_OPTION_ARG_NONE, &opt_cache_only, "Do not download latest ostree and RPM data", NULL },
{ "download-only", 0, 0, G_OPTION_ARG_NONE, &opt_download_only, "Just download latest ostree and RPM data, don't deploy", NULL },
+ { "apply-live", 'A', 0, G_OPTION_ARG_NONE, &opt_apply_live, "Apply changes to both pending deployment and running filesystem tree", NULL },
{ NULL }
};
@@ -182,10 +184,19 @@ rpmostree_builtin_install (int argc,
argv++; argc--;
argv[argc] = NULL;
- return pkg_change (invocation, sysroot_proxy,
+ if (!pkg_change (invocation, sysroot_proxy,
(const char *const*)argv,
(const char *const*)opt_uninstall,
- cancellable, error);
+ cancellable, error))
+ return FALSE;
+
+ if (opt_apply_live)
+ {
+ rust::Vec rustargv;
+ rpmostreecxx::applylive_entrypoint(rustargv);
+ }
+
+ return TRUE;
}
gboolean
diff --git a/tests/kolainst/destructive/apply-live b/tests/kolainst/destructive/apply-live
index 0227b178..5522e187 100755
--- a/tests/kolainst/destructive/apply-live
+++ b/tests/kolainst/destructive/apply-live
@@ -96,8 +96,7 @@ rm -rf /etc/testpkg-etc \
echo myconfig > /etc/testpkg-etc-other.conf
grep myconfig /etc/testpkg-etc-other.conf
-rpm-ostree install testpkg-etc testdaemon
-rpm-ostree ex apply-live
+rpm-ostree install -A testpkg-etc testdaemon
rpm -q bar test{pkg-etc,daemon} > rpmq.txt
assert_file_has_content rpmq.txt bar-1.0-1 test{pkg-etc,daemon}-1.0-1
cat /etc/testpkg-etc.conf > testpkg-etc.conf