`.Cargo.toml.nailed~`, so you only need this if you want to run
cargo by hand or something.
+ * `--no-lock` | `--lock` (default): Whether to take the
+ nailing-cargo lock. Some kind of protection against concurrent
+ operation is necessary to prevent multiple instances of
+ nailing-cargo trashing each others' work, and possibly mangling
+ your `Cargo.toml`s.
+
* `-h` | `--help`: Print usage summary.
* `--man` | `--manual`: Format this manual into html using `pandoc`
--man --manual Display complete manual (in w3m)
--leave-nailed Leave the nailed Cargo.toml in place
--just-linkfarm | --clean-linkfarm | --keep-linkfarm (default)
+ --no-lock Do not take the lock.
-s<subcommand> Treat command as `cargo <subcommand>`
--subcommand-props=<prop>,... Override command props (see docs)
our $just_linkfarm;
our $leave_nailed;
our $oot_clean;
+our $do_lock=1;
#
our %subcmd_props = (
}
sub takelock () {
+ return unless $do_lock;
+
for (;;) {
open LOCK, ">", $lockfile or die "$self: open/create $lockfile: $!\n";
flock LOCK, LOCK_EX or die "$self: lock $lockfile: $!\n";
print STDERR "$self: package $p in $packagemap{$p}[0]\n" if $verbose>=2;
}
foreach my $mf (keys %manifests) {
+ die "internal error" if $do_nail; # belt and braces
+
my ($toml, $mf_org_subdir) = @{ $manifests{$mf} };
foreach my $deps (get_dependency_tables $toml) {
next unless $deps;
$cargo_lock_update= 1;
} elsif (m{^--(clean|keep)-linkfarm$}) {
$oot_clean = $1 eq 'clean';
+ } elsif (m{^--(no)?-lock$}) {
+ $do_lock = !$1;
} elsif (m{^--leave-nailed$}) {
$leave_nailed = 1;
} elsif (s{^--subcommand-props=}{}) {