public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] scripts/functions: change zcat to gzcat on Mac OS X
@ 2013-10-14  9:31 Fernando Ortiz
  2013-10-14 17:56 ` Mike Frysinger
  0 siblings, 1 reply; 7+ messages in thread
From: Fernando Ortiz @ 2013-10-14  9:31 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

# HG changeset patch
# User nandub <dev+ctng@nandub.info>
# Date 1381743034 18000
#      Mon Oct 14 04:30:34 2013 -0500
# Node ID d9b7eeea2b565287de66b71e13bfa40265230362
# Parent  9838aecd63405ba0d1660ac8e91208de880d71a2
scripts/functions: change zcat to gzcat on Mac OS X

it looks like gnu zcat is required to work on Mac OS X (osx)
osx zcat will throw an log.gz.Z error when restoring
a building step.

Signed-off-by: nandub <dev+ctng@nandub.info>

diff -r 9838aecd6340 -r d9b7eeea2b56 scripts/functions
--- a/scripts/functions	Mon Oct 07 00:16:38 2013 +0200
+++ b/scripts/functions	Mon Oct 14 04:30:34 2013 -0500
@@ -1336,7 +1336,7 @@ CT_DoLoadState(){
     CT_DoLog STATE "  Restoring log file"
     exec >/dev/null
     case "${CT_DEBUG_CT_SAVE_STEPS_GZIP}" in
-        y)  zcat "${state_dir}/log.gz" >"${tmp_log_file}";;
+        y)  gzcat "${state_dir}/log.gz" >"${tmp_log_file}";;
         *)  cat "${state_dir}/log" >"${tmp_log_file}";;
     esac
     cat "${state_dir}/tail.log" >>"${tmp_log_file}"

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [PATCH] scripts/functions: change zcat to gzcat on Mac OS X
  2013-10-14  9:31 [PATCH] scripts/functions: change zcat to gzcat on Mac OS X Fernando Ortiz
@ 2013-10-14 17:56 ` Mike Frysinger
  2013-10-14 18:11   ` Diorcet Yann
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2013-10-14 17:56 UTC (permalink / raw)
  To: crossgcc; +Cc: Fernando Ortiz, Yann E. MORIN

[-- Attachment #1: Type: Text/Plain, Size: 1145 bytes --]

On Monday 14 October 2013 05:31:37 Fernando Ortiz wrote:
> # HG changeset patch
> # User nandub <dev+ctng@nandub.info>
> # Date 1381743034 18000
> #      Mon Oct 14 04:30:34 2013 -0500
> # Node ID d9b7eeea2b565287de66b71e13bfa40265230362
> # Parent  9838aecd63405ba0d1660ac8e91208de880d71a2
> scripts/functions: change zcat to gzcat on Mac OS X
> 
> it looks like gnu zcat is required to work on Mac OS X (osx)
> osx zcat will throw an log.gz.Z error when restoring
> a building step.
> 
> --- a/scripts/functions	Mon Oct 07 00:16:38 2013 +0200
> +++ b/scripts/functions	Mon Oct 14 04:30:34 2013 -0500
> @@ -1336,7 +1336,7 @@ CT_DoLoadState(){
>      CT_DoLog STATE "  Restoring log file"
>      exec >/dev/null
>      case "${CT_DEBUG_CT_SAVE_STEPS_GZIP}" in
> -        y)  zcat "${state_dir}/log.gz" >"${tmp_log_file}";;
> +        y)  gzcat "${state_dir}/log.gz" >"${tmp_log_file}";;
>          *)  cat "${state_dir}/log" >"${tmp_log_file}";;
>      esac

`gzcat` is not portable.  this code snippet looks like it's used by all 
targets and not just OS X (although i didn't load the repo itself to find out).
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH] scripts/functions: change zcat to gzcat on Mac OS X
  2013-10-14 17:56 ` Mike Frysinger
@ 2013-10-14 18:11   ` Diorcet Yann
  2013-10-14 18:27     ` Ray Donnelly
  0 siblings, 1 reply; 7+ messages in thread
From: Diorcet Yann @ 2013-10-14 18:11 UTC (permalink / raw)
  To: crossgcc

Le 14/10/2013 19:56, Mike Frysinger a écrit :
> On Monday 14 October 2013 05:31:37 Fernando Ortiz wrote:
>> # HG changeset patch
>> # User nandub <dev+ctng@nandub.info>
>> # Date 1381743034 18000
>> #      Mon Oct 14 04:30:34 2013 -0500
>> # Node ID d9b7eeea2b565287de66b71e13bfa40265230362
>> # Parent  9838aecd63405ba0d1660ac8e91208de880d71a2
>> scripts/functions: change zcat to gzcat on Mac OS X
>>
>> it looks like gnu zcat is required to work on Mac OS X (osx)
>> osx zcat will throw an log.gz.Z error when restoring
>> a building step.
>>
>> --- a/scripts/functions    Mon Oct 07 00:16:38 2013 +0200
>> +++ b/scripts/functions    Mon Oct 14 04:30:34 2013 -0500
>> @@ -1336,7 +1336,7 @@ CT_DoLoadState(){
>>      CT_DoLog STATE "  Restoring log file"
>>      exec >/dev/null
>>      case "${CT_DEBUG_CT_SAVE_STEPS_GZIP}" in
>> -        y)  zcat "${state_dir}/log.gz" >"${tmp_log_file}";;
>> +        y)  gzcat "${state_dir}/log.gz" >"${tmp_log_file}";;
>>          *)  cat "${state_dir}/log" >"${tmp_log_file}";;
>>      esac
>
> `gzcat` is not portable.  this code snippet looks like it's used by all
> targets and not just OS X (although i didn't load the repo itself to
find out).
> -mike
Try with that tip:

export PATH=/opt/local//libexec/gnubin:$PATH

with /opt/local your macports path


--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [PATCH] scripts/functions: change zcat to gzcat on Mac OS X
  2013-10-14 18:11   ` Diorcet Yann
@ 2013-10-14 18:27     ` Ray Donnelly
       [not found]       ` <CAOhNY--1kKgQV2wEhJpwntLdK6=g7uyT781X=KGOGrnCGw6urA@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Ray Donnelly @ 2013-10-14 18:27 UTC (permalink / raw)
  To: Diorcet Yann; +Cc: crossgcc

The best fix is to add --with-zcat=<path> as an option IMHO. It's
quite easily done too.

On Mon, Oct 14, 2013 at 7:11 PM, Diorcet Yann <diorcet.yann@gmail.com> wrote:
> Le 14/10/2013 19:56, Mike Frysinger a écrit :
>> On Monday 14 October 2013 05:31:37 Fernando Ortiz wrote:
>>> # HG changeset patch
>>> # User nandub <dev+ctng@nandub.info>
>>> # Date 1381743034 18000
>>> #      Mon Oct 14 04:30:34 2013 -0500
>>> # Node ID d9b7eeea2b565287de66b71e13bfa40265230362
>>> # Parent  9838aecd63405ba0d1660ac8e91208de880d71a2
>>> scripts/functions: change zcat to gzcat on Mac OS X
>>>
>>> it looks like gnu zcat is required to work on Mac OS X (osx)
>>> osx zcat will throw an log.gz.Z error when restoring
>>> a building step.
>>>
>>> --- a/scripts/functions    Mon Oct 07 00:16:38 2013 +0200
>>> +++ b/scripts/functions    Mon Oct 14 04:30:34 2013 -0500
>>> @@ -1336,7 +1336,7 @@ CT_DoLoadState(){
>>>      CT_DoLog STATE "  Restoring log file"
>>>      exec >/dev/null
>>>      case "${CT_DEBUG_CT_SAVE_STEPS_GZIP}" in
>>> -        y)  zcat "${state_dir}/log.gz" >"${tmp_log_file}";;
>>> +        y)  gzcat "${state_dir}/log.gz" >"${tmp_log_file}";;
>>>          *)  cat "${state_dir}/log" >"${tmp_log_file}";;
>>>      esac
>>
>> `gzcat` is not portable.  this code snippet looks like it's used by all
>> targets and not just OS X (although i didn't load the repo itself to
> find out).
>> -mike
> Try with that tip:
>
> export PATH=/opt/local//libexec/gnubin:$PATH
>
> with /opt/local your macports path
>
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Fwd: [PATCH] scripts/functions: change zcat to gzcat on Mac OS X
       [not found]       ` <CAOhNY--1kKgQV2wEhJpwntLdK6=g7uyT781X=KGOGrnCGw6urA@mail.gmail.com>
@ 2013-10-14 23:53         ` Anthony Foiani
  2013-10-15 16:33           ` Mike Frysinger
  0 siblings, 1 reply; 7+ messages in thread
From: Anthony Foiani @ 2013-10-14 23:53 UTC (permalink / raw)
  To: crossgcc maillist

[Oops, sorry, meant to send to entire list...]

Greetings, all --

On Mon, Oct 14, 2013 at 12:27 PM, Ray Donnelly <mingw.android@gmail.com> wrote:
> The best fix is to add --with-zcat=<path> as an option IMHO. It's
> quite easily done too.

Sorry if I'm late to the party, but is it possible to replace all such
usage with just:

  gzip -dc

This is my go-to command whenever I don't know if gzcat / zcat is
handy, and my impression is that it's pretty portable.

Best,
Anthony Foiani

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: Fwd: [PATCH] scripts/functions: change zcat to gzcat on Mac OS X
  2013-10-14 23:53         ` Fwd: " Anthony Foiani
@ 2013-10-15 16:33           ` Mike Frysinger
  2013-11-15 20:09             ` Yann E. MORIN
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2013-10-15 16:33 UTC (permalink / raw)
  To: crossgcc; +Cc: Anthony Foiani

[-- Attachment #1: Type: Text/Plain, Size: 652 bytes --]

On Monday 14 October 2013 19:53:13 Anthony Foiani wrote:
> On Mon, Oct 14, 2013 at 12:27 PM, Ray Donnelly wrote:
> > The best fix is to add --with-zcat=<path> as an option IMHO. It's
> > quite easily done too.
> 
> Sorry if I'm late to the party, but is it possible to replace all such
> usage with just:
> 
>   gzip -dc
> 
> This is my go-to command whenever I don't know if gzcat / zcat is
> handy, and my impression is that it's pretty portable.

that is an excellent suggestion.  thanks!

you could even add a func to the code and then people wouldn't be able to 
regress:
zcat() { gzip -dc "$@"; }
gzcat() { zcat "$@"; }
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: Fwd: [PATCH] scripts/functions: change zcat to gzcat on Mac OS X
  2013-10-15 16:33           ` Mike Frysinger
@ 2013-11-15 20:09             ` Yann E. MORIN
  0 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2013-11-15 20:09 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: crossgcc, Anthony Foiani

Anthony, Mike, All,

On 2013-10-15 12:33 -0400, Mike Frysinger spake thusly:
> On Monday 14 October 2013 19:53:13 Anthony Foiani wrote:
> > On Mon, Oct 14, 2013 at 12:27 PM, Ray Donnelly wrote:
> > > The best fix is to add --with-zcat=<path> as an option IMHO. It's
> > > quite easily done too.
> > 
> > Sorry if I'm late to the party, but is it possible to replace all such
> > usage with just:
> > 
> >   gzip -dc
> > 
> > This is my go-to command whenever I don't know if gzcat / zcat is
> > handy, and my impression is that it's pretty portable.
> 
> that is an excellent suggestion.  thanks!

Indeed, I'll implement this. Thanks! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

end of thread, other threads:[~2013-11-15 20:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-14  9:31 [PATCH] scripts/functions: change zcat to gzcat on Mac OS X Fernando Ortiz
2013-10-14 17:56 ` Mike Frysinger
2013-10-14 18:11   ` Diorcet Yann
2013-10-14 18:27     ` Ray Donnelly
     [not found]       ` <CAOhNY--1kKgQV2wEhJpwntLdK6=g7uyT781X=KGOGrnCGw6urA@mail.gmail.com>
2013-10-14 23:53         ` Fwd: " Anthony Foiani
2013-10-15 16:33           ` Mike Frysinger
2013-11-15 20:09             ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).