git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] tar: on extract, -o is --no-same-owner

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 24, 2009, 19:25 UTC
Message-ID
<7vd44c61cb.fsf@alter.siamese.dyndns.org>
In-Reply-To
<m2ocnxuej2.fsf@igel.home>
Andreas Schwab <schwab@linux-m68k.org> writes:
> Like this.
Yeah, correct and it beautifly explains the issue.  Thanks.
Show 36 quoted lines
>>From ebadb41b346c305b94f27e3bb787bf0ba6bb8a5b Mon Sep 17 00:00:00 2001
> From: Andreas Schwab <schwab@linux-m68k.org>
> Date: Sat, 24 Oct 2009 15:01:03 +0200
> Subject: [PATCH] Work around option parsing bug in the busybox tar implementation
>
> Traditionally the first argument of the tar command was interpreted a
> bundle of letters specifying the mode of operation and additional options,
> with any option arguments taken from subsequent words on the command line
> as needed.  The implementation of tar in busybox apparently treats this
> bundle as if preceded by a dash and then parses it by getopt rules, which
> mishandles 'tar xfo -'.  Use 'tar xof -' instead which is parsed the same
> way by both traditional tar implementations and busybox.
>
> Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
> ---
>  templates/Makefile |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/templates/Makefile b/templates/Makefile
> index a12c6e2..408f013 100644
> --- a/templates/Makefile
> +++ b/templates/Makefile
> @@ -50,4 +50,4 @@ clean:
>  install: all
>  	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)'
>  	(cd blt && $(TAR) cf - .) | \
> -	(cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR) xfo -)
> +	(cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR) xof -)
> -- 
> 1.6.5.1
>
>
> -- 
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
Previous: Andreas SchwabNext: Denys Vlasenko
Message 12 of 13 in “Re: [PATCH] tar: on extract, -o is --no-same-owner”
  1. Bernhard Reutner-FischerOct 23, 2009
  2. Bernhard Reutner-FischerOct 23, 2009
  3. Junio C HamanoOct 23, 2009
  4. Bernhard Reutner-FischerOct 24, 2009
  5. Andreas SchwabOct 24, 2009
  6. Jakub NarebskiOct 24, 2009
  7. Bernhard Reutner-FischerOct 24, 2009
  8. Andreas SchwabOct 24, 2009
  9. Bernhard Reutner-FischerOct 24, 2009
  10. Andreas SchwabOct 24, 2009
  11. Andreas SchwabOct 24, 2009
  12. Junio C HamanoOct 24, 2009
  13. Denys VlasenkoOct 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.