modify var name
authoryang.zhang <y0169.zhang@samsung.com>
Mon, 16 May 2016 11:34:55 +0000 (19:34 +0800)
committerSoonKyu Park <sk7.park@samsung.com>
Wed, 15 Jun 2016 05:21:57 +0000 (14:21 +0900)
Change-Id: I876d5cfbe70410660a6b713b23ecaa3b3f09a5c1

createrepomddeps

index 1fe6ea3..631f31e 100755 (executable)
@@ -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");
       }