pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Meaning of various pkgsrc variables



Am 28.04.2019 um 13:48 schrieb Mayuresh:
> On Sun, Apr 28, 2019 at 11:02:52AM +0200, Benny Siegert wrote:
>> On Sun, Apr 28, 2019 at 8:16 AM Mayuresh <mayuresh%acm.org@localhost> wrote:
>>>
>>> Is there any document that gives meanings of various pkgsrc variables?
>>
>> make help topic=BUILD_DEFS
>
> Thanks. I got the mechanism to get the documentation.
>
> But I am still not clear:
>
> E.g. there are many make files that say
> BUILD_DEFS+=            VARBASE
>
> I understand VARBASE. But why is that needed to be a BUILD_DEFS variable?
> What is affected if I don't add it to BUILD_DEFS? And what other such
> variables shall one worry about adding to BUILD_DEFS?
>
> # BUILD_DEFS
> #       The list of variables that influence the build. These variables
> #       are user-settable, and their values will be recorded in the
> #       binary package.

VARBASE is considered a "user-settable" variable because it is defined
in mk.conf. When there are two packages with different values of
VARBASE, they might be incompatible.

For VARBASE, that's far-fetched since that definition won't change
during the lifetime of a pkgsrc installation. But other variables like
PKG_OPTIONS.ImageMagick might differ between packages when the pkgsrc
user adds or removes options after installing some other packages.

If pkg_add were really strict, it should reject packages for which any
of these user-defined variables differ. To allow this check, the values
of these variables are recorded in the binary package. The check is not
active though, and I don't know if it has been implemented at all.

You don't need to worry about forgetting to add a user-settable variable
to BUILD_DEFS since pkglint will happily remind you. It fails to explain
the situation though. On the other hand, explaining the situation with a
hypothetical scenario that hasn't been implemented in the last 20 years
also feels strange.


Home | Main Index | Thread Index | Old Index