[racket-dev] package install mode

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Jan 6 13:27:39 EST 2013

At Sun, 6 Jan 2013 11:42:52 -0500, Eli Barzilay wrote:
> Yesterday, Matthew Flatt wrote:
> > I have been thinking about how developers who build their own Racket
> > are more likely to want installation-wide packages instead of user-
> > and version-specific packages. This is particularly true for those
> > of us who work from the git respository.
> [...] 
> I'm also saying that [...] the goal
> of this is to get defaults that "just work" for everyone, assuming
> that we can do whatever magic is needed to get user/version-specific
> packages in the resulting distributions, and assuming that `--prefix'
> is used only by 3rd-party packagers.  I think that such an assumption
> is wrong, and there are lots of people who build from source using
> `--prefix', and these people would have that extra tweak to keep in
> mind.  (And and bear in mind that a non-`--prefix' build is so much
> more convenient yet people still use it: it means that people only
> prefer it out of habit and other project conventions, so these people
> are unlikely to remember the extra tweak.)
> 
> So assuming that I got everything right (which is highly
> questionable), I think that it's best to have the same default for all
> setups, and use an installation-wide installs by default only when
> asked explicitly.

Ok, I agree that it's better to be conservative and consistent on this
point, instead of trying to guess correctly.

For now, I've added:

 * A `default-scope' installation-wide package configuration that
   selects the default package scope for `raco pkg' commands (when
   using the installation's `raco pkg'). Set it with

     raco pkg config -i --set default-scope <scope>

 * An `--enable-pkgscope=...' option to `configure', which sets the
   installation's `default-scope' configuration on install.

   This is just a slightly streamlined way to get a source-based build
   set up right the first time. If you don't specify
   `--enable-pkgscope' with `configure', then any existing
   configuration for an installation is preserved by `make install'.

In any case, I think having an installation-specific default for
package scope turns out to work a lot better than my previous
suggestion of an environment variable.




Posted on the dev mailing list.