With either
configure --enable-pkgscope=installation
or
raco pkg config -i --set default-scope installation
the default scope of `raco pkg' actions can be changed from
user-specific to installation-wide.
We considered trying to guess when someone building Racket would prefer
installation-wide package scope by default. In particular, someone
building from source for in-place use seems likely to want
installation-wide scope by default. Then again, we don't want to
discourage in-place builds for Unix installations that are intended
for multiple users. So, no guessing for now.
Also, add a `--scope' argument to `raco pkg' commands, which is more in
line with other options, but keep `-i', etc., as shorthands.
The version number is included as the query part of the constructed
URL, so it is easily ignored by a server. The intent is that the
PLT PNRs will eventually support version-specific results.
Use `raise-user-error' for `raco pkg ...' errors, so that stack
traces don't print out for external errors. Reformat error messages
generally to match current conventions. Use logging for debugging
output.
The default `raco pkg' mode should work right for a
multiple-version installation (because everything in
Racket should work in a multiple-version installation).
Along the same lines, `raco pkg' should work if the
installation directory is unwriteable. So, the default
mode is user-specific and version-specific.
Use `--shared' or `-s' for user-specific, all-version
installs.
By default, `raco pkg show' now shows packages installed
in all three modes (installation-wide, user- and version-
specific, and user-specific all-version). Use `-i', `-u',
or `-s' to show just one of them.
For now, "METADATA.rktd" is still recognized as a fallback.
Also, rewrite package source type and name inference,
make ".zip" the default format for `raco pkg create',
and many doc edits.
An old package intended for use with `raco setup -A' can be
installed with `raco pkg install'.
A package created with `raco pkg create --format plt' can be
installed with `raco setup -A', although it could leave behind
weird "MANIFEST.rktd" and other files in the "collects" directory.
An old package created with `raco pkg create --format plt' still
can be used with `raco pkg install', although not with `raco setup -A'.
The change from previous 'raco pkg' behavior is that package content
now claims to be in a "collects" directory that is
installation-relative, and unpacking redirects "collects" to the
package-staging area. At the same time, unpacking still works the
same as before on ".plt" archives that are not installation-relative.