extract gzip files

Joshua Root jmr at macports.org
Sun Dec 2 14:41:13 UTC 2018


On 2018-12-3 01:08 , Rainer Müller wrote:
> On 30.11.18 18:09, Mark Brethen wrote:
>> This doesn’t work:
>>
>>     extract.suffix    = .gz
>>     extract.cmd       = gunzip
>>     extract.pre_args  = -c
>>     extract.post_args = "> ${workpath}"
> 
> This cannot work as ${workpath} is a directory and you cannot redirect
> output to a directory, you would have to specify a regular file.
> 
> Can you rely on the extracted filename that is stored in the .gz? Then
> most extract options can be left on the default values:
> 
> extract.pre_args -d
> extract.post_args
> extract.mkdir yes
> 
> By default, the extract command will be executed inside extract.dir,
> which would be ${workpath}. The extract.mkdir option will create
> ${worksrcpath} first and extract to the new directory. This should
> simplifies the following configure/build/destroot commands that will be
> executed in ${worksrcpath} by default.

Unfortunately I don't think this will work correctly, since even if you
add the -k option to avoid deleting the .gz file from the distpath, gzip
will still try to create the decompressed file in the distpath as well.

- Josh


More information about the macports-dev mailing list