From: yang.zhang Date: Mon, 16 May 2016 11:34:55 +0000 (+0800) Subject: modify var name X-Git-Tag: upstream/20160629~11^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ec3c809049039204e33325930d640edfbbb7424b;p=tools%2Fbuild.git modify var name Change-Id: I876d5cfbe70410660a6b713b23ecaa3b3f09a5c1 --- diff --git a/createrepomddeps b/createrepomddeps index 1fe6ea3..631f31e 100755 --- a/createrepomddeps +++ b/createrepomddeps @@ -33,6 +33,7 @@ use Build::Rpmmd; use Digest::MD5 (); use File::Path qw(mkpath rmtree); use File::Basename; +use Fcntl ':flock'; Getopt::Long::Configure("no_ignore_case"); @@ -90,8 +91,8 @@ for my $url (@ARGV) { my $lock_file = $dir . 'repodata/down_repomd.lock'; open(my $lfh, '>>', $lock_file) or die "Could not open '$lock_file' - $!"; flock($lfh, LOCK_EX); - if (!-f $dest . '/repomd.xml') { - if (system($INC[0].'/download', $dest, $url . "repodata/repomd.xml")) { + if (!-f "${dir}repodata/repomd.xml") { + if (system($INC[0].'/download', "${dir}repodata", "${baseurl}repodata/repomd.xml")) { close($lfh) or die "Could not write '$lock_file' - $!"; die("get metadata failed\n"); }