Commit graph

15 commits

Author SHA1 Message Date
rillig
f35b4b9752 Typo. 2007-03-16 20:41:44 +00:00
rillig
acdbf77cec For the package pkgtools/shlock, it is not possbile to provide locking. 2007-03-16 20:38:40 +00:00
rillig
322b451e11 Finished the split of PKGSRC_LOCKTYPE into LOCALBASE_LOCKTYPE and
WRKDIR_LOCKTYPE. Added more documentation.
2007-02-22 07:20:41 +00:00
rillig
4354925665 Made the locking more flexible by letting the user choose different
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".
2007-02-20 22:11:10 +00:00
rillig
5f821d63e6 Why is OBJHOSTNAME needed for locking? 2007-02-19 10:39:47 +00:00
rillig
43908c44cc Moved the show-tools target to misc/show.mk.
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.
2007-01-02 21:29:07 +00:00
rillig
f099c6da90 Added parentheses around the shell command that installs shlock, to
allow for copy-and-paste without changing the current directory.
2007-01-02 17:16:34 +00:00
rillig
714dc5ff6b Moved the code that checks for PKG_FAIL_REASON and PKG_SKIP reason from
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.
2006-11-26 08:37:03 +00:00
rillig
825ba83c0e Moved the check for PKG_FAIL_REASON and PKG_SKIP_REASON at the very end
of bsd.pkg.mk, so that all infrastructure parts may add their error
messages to PKG_FAIL_REASON.
2006-11-16 09:38:53 +00:00
rillig
e6050a98e2 Moved the code that checks PKG_FAIL_REASON and PKG_SKIP_REASON into its
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.
2006-11-14 13:56:14 +00:00
rillig
56bd08ba99 In the status and error messages, say _which_ lock is being held by
another process. It's a little more verbose now, but it helps
understanding what goes on.
2006-11-09 02:11:44 +00:00
rillig
74efb02f37 There is a difference between the variables that can be configured by
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.
2006-11-04 21:54:26 +00:00
rillig
a5c5777ae5 Fixed the locking, as suggested by Johnny on the tech-pkg mailing list.
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.
2006-08-04 20:52:27 +00:00
rillig
dbef31038e Moved the locking code from bsd.pkg.mk into its own file. Where here,
added a more detailed header comment and fixed a bug concerning lockdir.
2006-08-04 05:55:18 +00:00
rillig
2221827892 Split the variable BUILD_DEFS into those that are defined by packages
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.
2006-07-15 23:58:52 +00:00