Commit graph

9 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
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
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
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