</varlistentry>
<varlistentry>
- <term><option>update</option> <optional><replaceable>VERSION</replaceable></optional></term>
+ <term><option>update</option> <optional>--offline</optional> <optional><replaceable>VERSION</replaceable></optional></term>
<listitem><para>Installs (updates to) the specified version, or if none is specified to the newest
version available. If the version is already installed or no newer version available, no operation is
executed.</para>
+ <para>If <option>--offline</option> is specified, the update must already have been acquired using
+ <command>acquire</command> and, if so, this pre-acquired version is the one which will be updated
+ to.</para>
+
+ <xi:include href="version-info.xml" xpointer="v251"/></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>acquire</option> <optional><replaceable>VERSION</replaceable></optional></term>
+
+ <listitem><para>Acquires (downloads) the specified version, ready to install it. If no version is
+ specified, the newest version available is acquired. If the version is already installed or no newer
+ version is available, no operation is executed.</para>
+
<para>If a new version to install/update to is found, old installed versions are deleted until at
least one new version can be installed, as configured via <varname>InstanceMax=</varname> in
<citerefentry><refentrytitle>sysupdate.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, or
via the available partition slots of the right type. This implicit operation can also be invoked
explicitly via the <command>vacuum</command> command described below.</para>
- <xi:include href="version-info.xml" xpointer="v251"/></listitem>
+ <xi:include href="version-info.xml" xpointer="v260"/></listitem>
</varlistentry>
<varlistentry>
<varlistentry>
<term><option>--reboot</option></term>
- <listitem><para>When used in combination with the <command>update</command> command and a new version is
+ <listitem><para>When used in combination with the <command>update</command> commands and a new version is
installed, automatically reboots the system immediately afterwards.</para>
<xi:include href="version-info.xml" xpointer="v251"/></listitem>
This is most useful when used in combination with the <command>list</command> command, to query
locally installed versions.</para>
+ <para>If used in combination with the <command>update</command> command, it allows updates to be
+ downloaded in advance (using <command>acquire</command>) and installed later.</para>
+
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
}
static int verb_update(int argc, char **argv, void *userdata) {
- return verb_update_impl(argc, argv, UPDATE_ACTION_ACQUIRE | UPDATE_ACTION_INSTALL);
+ UpdateActionFlags flags = UPDATE_ACTION_INSTALL;
+
+ if (!arg_offline)
+ flags |= UPDATE_ACTION_ACQUIRE;
+
+ return verb_update_impl(argc, argv, flags);
+}
+
+static int verb_acquire(int argc, char **argv, void *userdata) {
+ return verb_update_impl(argc, argv, UPDATE_ACTION_ACQUIRE);
}
static int verb_pending_or_reboot(int argc, char **argv, void *userdata) {
" features [FEATURE] Show optional features\n"
" check-new Check if there's a new version available\n"
" update [VERSION] Install new version now\n"
+ " acquire [VERSION] Acquire (download) new version now\n"
" vacuum Make room, by deleting old versions\n"
" pending Report whether a newer version is installed than\n"
" currently booted\n"
{ "features", VERB_ANY, 2, 0, verb_features },
{ "check-new", VERB_ANY, 1, 0, verb_check_new },
{ "update", VERB_ANY, 2, 0, verb_update },
+ { "acquire", VERB_ANY, 2, 0, verb_acquire },
{ "vacuum", VERB_ANY, 1, 0, verb_vacuum },
{ "reboot", 1, 1, 0, verb_pending_or_reboot },
{ "pending", 1, 1, 0, verb_pending_or_reboot },