add --repo-cache parameter to deliver
authorjingui.ren <jingui.ren@samsung.com>
Thu, 26 Jul 2018 06:01:43 +0000 (14:01 +0800)
committerjingui.ren <jingui.ren@samsung.com>
Fri, 27 Jul 2018 05:28:21 +0000 (13:28 +0800)
Change-Id: I7813e88fbba9a62f06be298c817fc7b80b5d85a8

depanneur

index fb7123a4ecbed264eb21483b6de5e36964518b47..e2eddceb4d2ce0f82547224d33b4813e71dcbe38 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -1912,6 +1912,7 @@ sub build_package {
     push @args, "--ccache" if ($ccache);
     push @args, "--icecream '$icecream'" if ($icecream);
     push @args, "--baselibs" if ($create_baselibs);
+       push @args, "--repo-cache '$order_dir'/.repo.cache";
     if (! $extra_packs eq "") {
         my $packs = join(' ', split(',', $extra_packs));
         push @args, "--extra-packs=\"$packs\"";
@@ -2128,8 +2129,8 @@ sub build_package {
             }
 
             my_system("'$build_dir'/createdirdeps '$rpm_repo_path' > '$order_dir'/.repo.cache.local ");
-            my_system("echo D: >> '$order_dir'/.repo.cache.local");
-            my_system("cat '$order_dir'/.repo.cache.local '$order_dir'/.repo.cache.remote >'$order_dir'/.repo.cache");
+            my_system("sudo echo D: >> '$order_dir'/.repo.cache.local");
+            my_system("sudo cat '$order_dir'/.repo.cache.local '$order_dir'/.repo.cache.remote >'$order_dir'/.repo.cache");
         }
         info("finished building $name");
         $packages_built = 1;
@@ -2459,7 +2460,7 @@ sub generate_depends() {
         }
     }
     # Merge local repo cache and remote repo cache
-    my_system("cat '$order_dir'/.repo.cache.local '$order_dir'/.repo.cache.remote >'$order_dir'/.repo.cache");
+    my_system("sudo cat '$order_dir'/.repo.cache.local '$order_dir'/.repo.cache.remote >'$order_dir'/.repo.cache");
 
     if ($repos_setup == 0 ) {
         error("repo cache creation failed...");
@@ -2641,7 +2642,7 @@ foreach my $repo (@package_repos) {
     }
 }
 # Merge local repo cache and remote repo cache
-my_system("cat '$order_dir'/.repo.cache.local '$order_dir'/.repo.cache.remote >'$order_dir'/.repo.cache");
+my_system("sudo cat '$order_dir'/.repo.cache.local '$order_dir'/.repo.cache.remote >'$order_dir'/.repo.cache");
 
 if ($repos_setup == 0 ) {
     error("repo cache creation failed...");