diff mbox series

doc: archive handler: document create-destination prop

Message ID 20211224010732.2472712-1-dominique.martinet@atmark-techno.com
State Accepted
Headers show
Series doc: archive handler: document create-destination prop | expand

Commit Message

Dominique Martinet Dec. 24, 2021, 1:07 a.m. UTC
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
---
I had missed this property when adding the section earlier, and just
found about it now as I needed it.

(I was surprised that preserve-attributes is not a property actually, but
now it's here I assume it must be kept for backwards compatibility)

I don't think I forgot anything else this time!

 doc/source/handlers.rst | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Stefano Babic Dec. 24, 2021, 8:08 a.m. UTC | #1
Hi Dominique,

On 24.12.21 02:07, Dominique Martinet wrote:
> Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
> ---
> I had missed this property when adding the section earlier, and just
> found about it now as I needed it.
> 

Thanks !

> (I was surprised that preserve-attributes is not a property actually, but
> now it's here I assume it must be kept for backwards compatibility)

Coceptually, preserve-attributes belongs to properties, but it was 
introduced before I implemented the generic "properties" for any 
handler. It is thinkable to add preserve-attributes to properties as 
well, letting it also in the general part for backward compatibility.

> 
> I don't think I forgot anything else this time!
> 
>   doc/source/handlers.rst | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/doc/source/handlers.rst b/doc/source/handlers.rst
> index dc52cbbe2a69..333c912142e9 100644
> --- a/doc/source/handlers.rst
> +++ b/doc/source/handlers.rst
> @@ -791,6 +791,9 @@ itself has no direct support for xz it can be possible to extract tar.xz files w
>   The attribute `preserve-attributes` must be set to preserve timestamps. uid/gid (numeric),
>   permissions (except +x, always preserved) and extended attributes.
>   
> +The property `create-destination` can be set to the string `true` to have swupdate create
> +the destination path before extraction.
> +
>   ::
>   
>                   files: (
> @@ -800,6 +803,9 @@ permissions (except +x, always preserved) and extended attributes.
>                                   path = "/extract/here";
>                                   preserve-attributes = true;
>                                   installed-directly = true;
> +                                properties: {
> +                                        create-destination = "true";
> +                                }
>                           }
>                   );
>   
> 

I apply it, thanks !

Best regards,
Stefano
diff mbox series

Patch

diff --git a/doc/source/handlers.rst b/doc/source/handlers.rst
index dc52cbbe2a69..333c912142e9 100644
--- a/doc/source/handlers.rst
+++ b/doc/source/handlers.rst
@@ -791,6 +791,9 @@  itself has no direct support for xz it can be possible to extract tar.xz files w
 The attribute `preserve-attributes` must be set to preserve timestamps. uid/gid (numeric),
 permissions (except +x, always preserved) and extended attributes.
 
+The property `create-destination` can be set to the string `true` to have swupdate create
+the destination path before extraction.
+
 ::
 
                 files: (
@@ -800,6 +803,9 @@  permissions (except +x, always preserved) and extended attributes.
                                 path = "/extract/here";
                                 preserve-attributes = true;
                                 installed-directly = true;
+                                properties: {
+                                        create-destination = "true";
+                                }
                         }
                 );