Replace rpm packages inside buildroot mv action to ln
authory0169.zhang <y0169.zhang@samsung.com>
Sat, 11 Feb 2017 03:42:08 +0000 (12:42 +0900)
committerSoonKyu Park <sk7.park@samsung.com>
Mon, 20 Feb 2017 11:16:35 +0000 (20:16 +0900)
Change-Id: I7e23b980fc8910e92ba5eb42edb12e3438b9898a

depanneur

index a1251ea042272833fca72d9ac3ca1590c046a39a..ee3a6905a1ff41800813f1cefeba2fff60498ca5 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -2008,7 +2008,9 @@ sub build_package {
                 #copy the new ones to local repo
                 update_repo_with_rpms(\%srpmpaths, @srpms);
                 if ($skip_srcrpm == 0){
-                   my_system ("sudo /bin/mv $scratch/$srcrpmdirpath/*.rpm $srpm_repo_path");
+                   foreach (@srpms) {
+                       my_system ("ln -f $_ $srpm_repo_path");
+                   }
                 }
             } elsif ($skip_srcrpm == 1){
                         my_system("/bin/rm -rf $srpm_repo_path/*.rpm");
@@ -2017,7 +2019,9 @@ sub build_package {
                 #remove old rpms in local repo
                 #copy the new ones to local repo
                 update_repo_with_rpms (\%rpmpaths, @rpms);
-                my_system ("sudo /bin/mv $scratch/$rpmdirpath/*/*.rpm $rpm_repo_path");
+                foreach (@rpms) {
+                    my_system ("ln -f $_ $rpm_repo_path");
+                }
             }
 
             my_system("$build_dir/createrpmdeps $rpm_repo_path > $order_dir/.repo.cache.local ");