tech-pkg archive

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

Re: pkgsrc namespaces



Edgar Fuß <ef%math.uni-bonn.de@localhost> writes:

>> not necessarily clearly mapped to variable namespaces
> There seems to be a general lack of a notion of namespaces.
>
> When importing something into pkgsrc, I'm often asking myself whether 
> I'm allowed to use a geeric variable name (EGDIR, DOCDIR, FEATURES, EDITOR) 
> or if they are used by pkgrsc's infrastucture (or worse: will be used by a 
> future version of the infrastructure).
>
> I also sometimes, when reading an existing Makefile for refence, as myself 
> whether some generic sounding variable used there is set by the 
> infrastructure or some Makefile.common, options.mk or the like.
>
> It would help to have some per-package/user namespace. Things easily become 
> unreadable if I prefix everything with ICINGAWEB2_ or LUA_STD__DEBUG_.

A fair point, about having organization by name.

I was talking about something simpler, which is that variables defined
in mk files should be declared (in comments) as to whether they are
package-settable, user-settable or pkgrsc internal.  That's just N
variables with a definition and scope.  That's sound, even if it's
awkward for users who have to look each one up.


Home | Main Index | Thread Index | Old Index