summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2023-04-11 16:37:51 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2023-05-02 15:16:54 +0200
commit3625351722e67903dc34993fe318e50863bd2d31 (patch)
treeaea4848210f93530c23fae4c238d483f83acd108 /doc
parentaa8c9aad81b57da96e8ac7345d0024ee526c7714 (diff)
Add apt install,upgrade,... -U,--update options
This runs update before opening the cache and sources.list for installing/upgrading.
Diffstat (limited to 'doc')
-rw-r--r--doc/apt-get.8.xml14
-rw-r--r--doc/examples/configure-index2
2 files changed, 15 insertions, 1 deletions
diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml
index 6d28fe116..f4d347c70 100644
--- a/doc/apt-get.8.xml
+++ b/doc/apt-get.8.xml
@@ -657,6 +657,20 @@
<listitem><para>Fail the update command if any error occured, even a transient one.</para></listitem>
</varlistentry>
+ <varlistentry><term><option>-U</option></term><term><option>--update</option></term>
+ <listitem><para>Run the <option>update</option> command before the specified command. This is supported for commands
+ installing, removing, or upgrading packages such as
+ <option>install</option>, <option>remove</option>, <option>safe-upgrade</option>, <option>full-upgrade</option>.
+ This can be useful to ensure a command always installs the latest versions, or, in combination with the
+ <option>--snapshot</option> option to make sure the snapshot is present when install is being run.
+ </para>
+ <para>Caveat: Due to technical limitations, locks are acquired individually for each phase, hence an install
+ may fail to acquire locks after successfully executing the update. Until this is resolved, this is merely
+ syntactic sugar for <literal>apt update &amp;&amp; apt install</literal></para>
+ </listitem>
+ </varlistentry>
+
+
&apt-commonoptions;
</variablelist>
diff --git a/doc/examples/configure-index b/doc/examples/configure-index
index beafbbcd4..5ec209766 100644
--- a/doc/examples/configure-index
+++ b/doc/examples/configure-index
@@ -170,7 +170,7 @@ APT
DropTranslation "<BOOL>";
};
- Update
+ Update "<BOOL>"
{
Pre-Invoke {"touch /var/lib/apt/pre-update-stamp"; };
Post-Invoke {"touch /var/lib/apt/post-update-stamp"; };