librelist archives

« back to archive

What is the purpose of INSTALL_RECEIPT.json?

What is the purpose of INSTALL_RECEIPT.json?

From:
Nicolas Desprès
Date:
2012-01-22 @ 17:17
Hi,

I thought I understood the purpose of INSTALL_RECEIPT.json thanks to
its name but I got confused after a command like this one:

$ brew install --lang=en,es,fr aspell
[working fine...]

I get this:
$ cat /usr/local/Cellar/aspell/0.60.6.1/INSTALL_RECEIPT.json

{"unused_options":["--lang=XX,...","--all"],"used_options":[],"built_bottle":false}

I'm quite surprise of the value of the "used_options" field.  Is that a bug?

Actually I was also wondering how Homebrew remember my build option
when I do upgrade a formula?

Thanks for your help,
-Nico

Re: [homebrew] What is the purpose of INSTALL_RECEIPT.json?

From:
Jack Nagel
Date:
2012-01-22 @ 17:51
2012/1/22 Nicolas Desprès <nicolas.despres@gmail.com>:
> Hi,
>
> I thought I understood the purpose of INSTALL_RECEIPT.json thanks to
> its name but I got confused after a command like this one:
>
> $ brew install --lang=en,es,fr aspell
> [working fine...]
>
> I get this:
> $ cat /usr/local/Cellar/aspell/0.60.6.1/INSTALL_RECEIPT.json
> 
{"unused_options":["--lang=XX,...","--all"],"used_options":[],"built_bottle":false}
>
> I'm quite surprise of the value of the "used_options" field.  Is that a bug?

Handling of key-value options such as "--lang=foo" are done ad-hoc in
the actual formula, so it is not surprising that they don't play well
with the metadata recording code; the things that are recorded as
"used_options" are the intersection of the formula's options and the
options passed on ARGV.

> Actually I was also wondering how Homebrew remember my build option
> when I do upgrade a formula?

It inspects the old INSTALL_RECEIPT and passes the used_options to the
Ruby process that is responsible for the build.

Jack

Re: [homebrew] What is the purpose of INSTALL_RECEIPT.json?

From:
Nicolas Desprès
Date:
2012-01-22 @ 18:49
On Sun, Jan 22, 2012 at 6:51 PM, Jack Nagel <jacknagel@gmail.com> wrote:
> 2012/1/22 Nicolas Desprès <nicolas.despres@gmail.com>:
>> Hi,
>>
>> I thought I understood the purpose of INSTALL_RECEIPT.json thanks to
>> its name but I got confused after a command like this one:
>>
>> $ brew install --lang=en,es,fr aspell
>> [working fine...]
>>
>> I get this:
>> $ cat /usr/local/Cellar/aspell/0.60.6.1/INSTALL_RECEIPT.json
>> 
{"unused_options":["--lang=XX,...","--all"],"used_options":[],"built_bottle":false}
>>
>> I'm quite surprise of the value of the "used_options" field.  Is that a bug?
>
> Handling of key-value options such as "--lang=foo" are done ad-hoc in
> the actual formula, so it is not surprising that they don't play well
> with the metadata recording code; the things that are recorded as
> "used_options" are the intersection of the formula's options and the
> options passed on ARGV.
>

Ok. That's what I though so. I did a test with another formula and it
works fine:

$ brew install --with-blk-sha1 --with-pcre --build-doc -v git
$ cat /usr/local/Cellar/git/1.7.8.4/INSTALL_RECEIPT.json

{"unused_options":[],"used_options":["--with-blk-sha1","--with-pcre","--build-doc"],"built_bottle":false}

So it looks like a bug in the aspell formula for me.

>> Actually I was also wondering how Homebrew remember my build option
>> when I do upgrade a formula?
>
> It inspects the old INSTALL_RECEIPT and passes the used_options to the
> Ruby process that is responsible for the build.

Ok thanks. That's confirm what I thought so.

-Nico

Re: [homebrew] What is the purpose of INSTALL_RECEIPT.json?

From:
Nicolas Desprès
Date:
2012-01-22 @ 18:53
2012/1/22 Nicolas Desprès <nicolas.despres@gmail.com>:
[...]
>
> So it looks like a bug in the aspell formula for me.

I've created an issue: https://github.com/mxcl/homebrew/issues/9723

[...]

-- 
Nicolas Desprès