All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] fs/tar: support passing long options to tar
@ 2016-06-20 23:18 Frank Hunleth
  2016-06-22 21:20 ` Arnout Vandecappelle
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Hunleth @ 2016-06-20 23:18 UTC (permalink / raw)
  To: buildroot

This change modifies how options are passed to tar to support long
options. Unfortunately, it breaks configurations that previously used
this feature. Before the change, options were passed using the
single-letter without a '-' form. E.g., if the user wanted to turn on
verbose output, they would have to specify 'v'. With this change, the
user would need to pass '-v'. The help text is updated to make the
requirement more clear.

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
---
 fs/tar/Config.in | 5 +++--
 fs/tar/tar.mk    | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/tar/Config.in b/fs/tar/Config.in
index 63663ec..14fc7a4 100644
--- a/fs/tar/Config.in
+++ b/fs/tar/Config.in
@@ -48,5 +48,6 @@ config BR2_TARGET_ROOTFS_TAR_OPTIONS
 	depends on BR2_TARGET_ROOTFS_TAR
 	default ""
 	help
-	  Any other flags you want to pass to tar
-	  Refer to tar --help for details
+	  Pass additional commandline arguments to tar. Use the '-' or '--'
+	  forms of options rather than the single-letter combining forms.
+	  Refer to tar --help for details.
diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk
index 28219cf..d598f52 100644
--- a/fs/tar/tar.mk
+++ b/fs/tar/tar.mk
@@ -7,7 +7,7 @@
 TAR_OPTS := $(call qstrip,$(BR2_TARGET_ROOTFS_TAR_OPTIONS))
 
 define ROOTFS_TAR_CMD
-	tar -c$(TAR_OPTS)f $@ --numeric-owner -C $(TARGET_DIR) .
+	tar -c $(TAR_OPTS) -f $@ --numeric-owner -C $(TARGET_DIR) .
 endef
 
 $(eval $(call ROOTFS_TARGET,tar))
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] fs/tar: support passing long options to tar
  2016-06-20 23:18 [Buildroot] [PATCH 1/1] fs/tar: support passing long options to tar Frank Hunleth
@ 2016-06-22 21:20 ` Arnout Vandecappelle
  2016-06-22 21:38   ` Frank Hunleth
  0 siblings, 1 reply; 3+ messages in thread
From: Arnout Vandecappelle @ 2016-06-22 21:20 UTC (permalink / raw)
  To: buildroot

On 21-06-16 01:18, Frank Hunleth wrote:
> This change modifies how options are passed to tar to support long
> options. Unfortunately, it breaks configurations that previously used
> this feature. Before the change, options were passed using the
> single-letter without a '-' form. E.g., if the user wanted to turn on
> verbose output, they would have to specify 'v'. With this change, the
> user would need to pass '-v'. The help text is updated to make the
> requirement more clear.

 I may be mistaken, but wouldn't we conserve full backward compatibility by using

	tar $(TAR_OPTS) -cf ...


 Regards,
 Arnout

> 
> Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
> ---
>  fs/tar/Config.in | 5 +++--
>  fs/tar/tar.mk    | 2 +-
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/tar/Config.in b/fs/tar/Config.in
> index 63663ec..14fc7a4 100644
> --- a/fs/tar/Config.in
> +++ b/fs/tar/Config.in
> @@ -48,5 +48,6 @@ config BR2_TARGET_ROOTFS_TAR_OPTIONS
>  	depends on BR2_TARGET_ROOTFS_TAR
>  	default ""
>  	help
> -	  Any other flags you want to pass to tar
> -	  Refer to tar --help for details
> +	  Pass additional commandline arguments to tar. Use the '-' or '--'
> +	  forms of options rather than the single-letter combining forms.
> +	  Refer to tar --help for details.
> diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk
> index 28219cf..d598f52 100644
> --- a/fs/tar/tar.mk
> +++ b/fs/tar/tar.mk
> @@ -7,7 +7,7 @@
>  TAR_OPTS := $(call qstrip,$(BR2_TARGET_ROOTFS_TAR_OPTIONS))
>  
>  define ROOTFS_TAR_CMD
> -	tar -c$(TAR_OPTS)f $@ --numeric-owner -C $(TARGET_DIR) .
> +	tar -c $(TAR_OPTS) -f $@ --numeric-owner -C $(TARGET_DIR) .
>  endef
>  
>  $(eval $(call ROOTFS_TARGET,tar))
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] fs/tar: support passing long options to tar
  2016-06-22 21:20 ` Arnout Vandecappelle
@ 2016-06-22 21:38   ` Frank Hunleth
  0 siblings, 0 replies; 3+ messages in thread
From: Frank Hunleth @ 2016-06-22 21:38 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

On Wed, Jun 22, 2016 at 5:20 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 21-06-16 01:18, Frank Hunleth wrote:
>> This change modifies how options are passed to tar to support long
>> options. Unfortunately, it breaks configurations that previously used
>> this feature. Before the change, options were passed using the
>> single-letter without a '-' form. E.g., if the user wanted to turn on
>> verbose output, they would have to specify 'v'. With this change, the
>> user would need to pass '-v'. The help text is updated to make the
>> requirement more clear.
>
>  I may be mistaken, but wouldn't we conserve full backward compatibility by using
>
>         tar $(TAR_OPTS) -cf ...

I got confused since tar's man page looks like it wants the "operation
mode" parameter first. Your proposal works for the options that I want
to use, though. I'll update my patch.

Thanks,
Frank

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-22 21:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-20 23:18 [Buildroot] [PATCH 1/1] fs/tar: support passing long options to tar Frank Hunleth
2016-06-22 21:20 ` Arnout Vandecappelle
2016-06-22 21:38   ` Frank Hunleth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.