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:53:04 +0000 (16:53 +0800)
committerSoonKyu Park <sk7.park@samsung.com>
Mon, 26 Dec 2016 12:10:17 +0000 (21:10 +0900)
Change-Id: I989b9d2baaa1d88e16609bdb2e1c8e6207c084ec

depanneur

index af4f09e..9987adc 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -1984,6 +1984,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