mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Merge pull request #38160 from terminalmage/update-archive-docs
Update information about xz-utils in archive state/module docs
This commit is contained in:
commit
8d4e194400
@ -49,8 +49,20 @@ def list_(name,
|
||||
|
||||
.. note::
|
||||
This function will only provide results for XZ-compressed archives if
|
||||
xz-utils_ is installed, as Python does not at this time natively
|
||||
support XZ compression in its tarfile_ module.
|
||||
the xz_ CLI command is available, as Python does not at this time
|
||||
natively support XZ compression in its tarfile_ module. Keep in mind
|
||||
however that most Linux distros ship with xz_ already installed.
|
||||
|
||||
To check if a given minion has xz_, the following Salt command can be
|
||||
run:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
salt minion_id cmd.which xz
|
||||
|
||||
If ``None`` is returned, then xz_ is not present and must be installed.
|
||||
It is widely available and should be packaged as either ``xz`` or
|
||||
``xz-utils``.
|
||||
|
||||
name
|
||||
Path/URL of archive
|
||||
@ -100,7 +112,7 @@ def list_(name,
|
||||
the ``salt://`` fileserver.
|
||||
|
||||
.. _tarfile: https://docs.python.org/2/library/tarfile.html
|
||||
.. _xz-utils: http://tukaani.org/xz/
|
||||
.. _xz: http://tukaani.org/xz/
|
||||
|
||||
CLI Examples:
|
||||
|
||||
@ -153,7 +165,7 @@ def list_(name,
|
||||
|
||||
raise CommandExecutionError(
|
||||
'Unable to list contents of {0}. If this is an XZ-compressed tar '
|
||||
'archive, install xz-utils to enable listing its contents. If it '
|
||||
'archive, install XZ Utils to enable listing its contents. If it '
|
||||
'is compressed using something other than XZ, it may be necessary '
|
||||
'to specify CLI options to decompress the archive. See the '
|
||||
'documentation for details.'.format(name)
|
||||
|
@ -334,8 +334,8 @@ def extracted(name,
|
||||
.. versionchanged:: 2015.8.11,2016.3.2
|
||||
XZ-compressed tar archives no longer require ``J`` to manually be
|
||||
set in the ``options``, they are now detected automatically and
|
||||
decompressed using xz-utils_ and extracted using ``tar xvf``. This
|
||||
is a more platform-independent solution, as not all tar
|
||||
decompressed using the xz_ CLI command and extracted using ``tar
|
||||
xvf``. This is a more platform-independent solution, as not all tar
|
||||
implementations support the ``J`` argument for extracting archives.
|
||||
|
||||
.. note::
|
||||
@ -358,9 +358,9 @@ def extracted(name,
|
||||
the archive has already been extracted. For the vast majority of tar
|
||||
archives, :py:func:`archive.list <salt.modules.archive.list_>` "just
|
||||
works". Archives compressed using gzip, bzip2, and xz/lzma (with the
|
||||
help of xz-utils_) are supported automatically. However, for archives
|
||||
compressed using other compression types, CLI options must be passed to
|
||||
:py:func:`archive.list <salt.modules.archive.list_>`.
|
||||
help of the xz_ CLI command) are supported automatically. However, for
|
||||
archives compressed using other compression types, CLI options must be
|
||||
passed to :py:func:`archive.list <salt.modules.archive.list_>`.
|
||||
|
||||
This argument will be passed through to :py:func:`archive.list
|
||||
<salt.modules.archive.list_>` as its ``options`` argument, to allow it
|
||||
@ -503,7 +503,7 @@ def extracted(name,
|
||||
|
||||
.. _tarfile: https://docs.python.org/2/library/tarfile.html
|
||||
.. _zipfile: https://docs.python.org/2/library/zipfile.html
|
||||
.. _xz-utils: http://tukaani.org/xz/
|
||||
.. _xz: http://tukaani.org/xz/
|
||||
|
||||
**Examples**
|
||||
|
||||
@ -1103,7 +1103,7 @@ def extracted(name,
|
||||
# XZ-compressed data
|
||||
log.debug(
|
||||
'Tar file is XZ-compressed, attempting '
|
||||
'decompression and extraction using xz-utils '
|
||||
'decompression and extraction using XZ Utils '
|
||||
'and the tar command'
|
||||
)
|
||||
# Must use python_shell=True here because not
|
||||
|
Loading…
Reference in New Issue
Block a user