Fix bugs that when using --incremental and --skip-srcrpm can not del old *src.rpms
authorJun Wang <junbill.wang@samsung.com>
Tue, 13 Sep 2016 08:51:54 +0000 (16:51 +0800)
committerJun Wang <junbill.wang@samsung.com>
Tue, 13 Sep 2016 08:51:54 +0000 (16:51 +0800)
Change-Id: I1d3f068de4f37e434088fd9ec77dd08e55f661fe

depanneur

index caa2d2f09e109ae1dcc551d5aa6dba2d40cfcada..a44516f62fc7b5814a9d1c8936626d420c9748e7 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -1987,6 +1987,8 @@ sub build_package {
                 if ($skip_srcrpm == 0){
                    my_system ("sudo /bin/mv $scratch/$srcrpmdirpath/*.rpm $srpm_repo_path");
                 }
+            } elsif ($skip_srcrpm == 1){
+                        my_system("/bin/rm -rf $srpm_repo_path/*.rpm");
             }
             if (my @rpms = bsd_glob "$scratch/$rpmdirpath/*/*.rpm") {
                 #remove old rpms in local repo