From 42b8bd791c7d9fa739867ae279467ad7aa9c36af Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 15 Jun 2007 16:33:46 +0000 Subject: add --nolock option --- genhdlist2 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/genhdlist2 b/genhdlist2 index e75e861..3b5128e 100644 --- a/genhdlist2 +++ b/genhdlist2 @@ -20,6 +20,7 @@ sub main() { 'clean' => \$options{no_incremental}, 'no-bad-rpm' => \$options{no_bad_rpm}, 'no-md5sum' => \$options{no_md5sum}, + 'nolock' => \$options{nolock}, 'file-deps=s' => \$options{file_deps}, 'h|help' => sub { usage(); exit 0 }, 'q|quiet' => sub { $options{verbose} = -1 }, @@ -52,7 +53,7 @@ sub do_it { my $lock_file = "$media_info_dir/UPDATING"; $tmp_header = "$media_info_dir/.tmp-header"; - my $lock = lock_file($lock_file); + my $lock = !$options{nolock} && lock_file($lock_file); $SIG{INT} = sub { unlink "$hdlist.tmp", "$synthesis.tmp", $tmp_header; @@ -229,6 +230,10 @@ Do not generate MD5SUM file. Do not abort on bad rpms. +=item B<--nolock> + +Don't lock the media (can be useful when locks fail, eg NFS) + =item --clean Do not use existing hdlist.cz, build hdlist from scratch -- cgit v1.2.1