diff options
author | Jude Taylor <me@jude.bio> | 2015-10-21 14:38:35 -0700 |
---|---|---|
committer | Jude Taylor <me@jude.bio> | 2015-10-21 14:38:35 -0700 |
commit | f5a7739171a877dfb29876d673d1720a1c9bf6bc (patch) | |
tree | 0002c4a61552e77914516091e7e580c0476c3255 /scripts/resolve-system-dependencies.pl.in | |
parent | 3f655041645315c5cca66df629b23d5f29065f5f (diff) |
appropriately handle lock acquisition failures in resolve-system-dependencies.pl
Diffstat (limited to 'scripts/resolve-system-dependencies.pl.in')
-rwxr-xr-x | scripts/resolve-system-dependencies.pl.in | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/resolve-system-dependencies.pl.in b/scripts/resolve-system-dependencies.pl.in index 412f07274..1294ebba5 100755 --- a/scripts/resolve-system-dependencies.pl.in +++ b/scripts/resolve-system-dependencies.pl.in @@ -4,6 +4,7 @@ use utf8; use strict; use warnings; use Cwd qw(realpath); +use Errno; use File::Basename qw(dirname); use File::Path qw(make_path); use File::Spec::Functions qw(catfile); @@ -24,10 +25,14 @@ make_path dirname($cache); our $DEPS; eval { $DEPS = lock_retrieve($cache); -} or do { +}; + +if($!{ENOENT}) { lock_store {}, $cache; $DEPS = {}; -}; +} elsif($@) { + die "Unable to obtain a lock on dependency-map file $cache: $@"; +} sub mkset(@) { my %set; |