diff options
author | yang.zhang <y0169.zhang@samsung.com> | 2016-05-16 19:34:55 +0800 |
---|---|---|
committer | SoonKyu Park <sk7.park@samsung.com> | 2016-06-15 14:21:57 +0900 |
commit | ec3c809049039204e33325930d640edfbbb7424b (patch) | |
tree | 75c188beb78f118865d71209b9460c43580f54fc /createrepomddeps | |
parent | 4f06d8f6ff862f9ef9ca37dab368fa243a183beb (diff) | |
download | build-ec3c809049039204e33325930d640edfbbb7424b.tar.gz build-ec3c809049039204e33325930d640edfbbb7424b.tar.bz2 build-ec3c809049039204e33325930d640edfbbb7424b.zip |
modify var name
Change-Id: I876d5cfbe70410660a6b713b23ecaa3b3f09a5c1
Diffstat (limited to 'createrepomddeps')
-rwxr-xr-x | createrepomddeps | 5 |
1 files changed, 3 insertions, 2 deletions
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"); } |