locking types for WRKDIR and LOCALBASE.
The default values are currently based on PKGSRC_LOCKTYPE, but the
recommended values are different. For LOCALBASE, the recommended value
is "sleep", since after one transaction has finished, the next can be
done in the new LOCALBASE without problems.
The situation is different though in WRKDIR. After one transaction has
finished there, it is often the case that the directory is removed,
including the lockfile. In that case, the package has usually been
installed and packaged successfully, and it would be a bad idea to let
the next transaction try to do the same again. Therefore, the
recommended value here is "once".
Moved the changes-entry target to misc/developer.mk. To save some time,
that file is only included when PKG_DEVELOPER is defined.
Moved the build-defs-message target to misc/show.mk and renamed it to
show-build-defs, since almost all other *-message targets just print a
single line.
the internal/ directory to misc/, since it is not really internal to
pkgsrc.
Fixed the case where PKG_SKIP_REASON was not noticed by the bulk builds.
Added the NOT_FOR_UNPRIVILEGED and ONLY_FOR_UNPRIVILEGED variables.
own file. The further plan is not to include this file in the middle of
loading, but at the end, when no variables will be changed. This will
allow the _whole_ pkgsrc infrastructure to generate errors with
PKG_FAIL_REASON, which is currently not the case.
the user to affect how packages are built (BUILD_DEFS) and the effects
that those variables have (BUILD_DEFS_EFFECTS). The latter variable has
been introduced to clearly separate these two issues.
While here, reduced the indentation of the directives a little bit. One
visible change is that "make build-defs-message" will always show the
message when called directly. Before, it had been shown only once, which
makes debugging a bit more difficult.
Added two targets acquire-localbase-lock and release-localbase-lock,
which mark the complete LOCALBASE directory as locked, so that multiple
packages cannot run the install, deinstall or bin-install targets at the
same time.
The install target aquires locks in both WRKSRC and LOCALBASE, the other
two targets only need the LOCALBASE lock, since they may be run without
WRKSRC being present on the system.
locking.mk must be included before tools.mk and the PKG_FAIL_REASON
check.
and those that are defined by the infrastructure (_BUILD_DEFS). This
allows the build-defs-message target to be moved to the end of
bsd.pkg.mk. Now it prints the correct result even in unprivileged
builds, which had been wrong due to the order in which the files have
been included. For example, ${UNPRIVILEGED_USER} was displayed as (not
defined) although its value was defined, which could be checked with
"bmake show-var".
Tested with one package that _does_ define BUILD_DEFS and with one that
doesn't. The behavior stays the same.