fix bug: When there are multiple specs file in one package, if build again after... 85/314185/2
authorwangbiao <biao716.wang@samsung.com>
Mon, 8 Jul 2024 07:27:38 +0000 (16:27 +0900)
committerwang biao <biao716.wang@samsung.com>
Mon, 8 Jul 2024 09:03:51 +0000 (09:03 +0000)
Change-Id: Icd9ce26e778902a414af4194859215f6862b7987
Signed-off-by: wangbiao <biao716.wang@samsung.com>
depanneur

index da1e78eaf7a5cffeae06ac5c31b6567f8ea79ca3..ba23f9fcde83e413ebfbc339ed505421c121eaf5 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -974,6 +974,14 @@ sub prepare_git {
                 my_system("cp -r '$pkg_path'/'$exported_key'  '$pkg_path'/'$cache_key'");
                 my_system("cp -f '$pkg_path'/cache/'$exported_key' '$pkg_path'/cache/'$cache_key'");
 
+                # Remove old source rpm packages to build again, or depanneur
+                # will skip packages with src.rpm exists
+                # Same operation as it in write_cache()
+                my $src_rpm = "$srpm_repo_path/$cache_key.src.rpm";
+                if (-f "$src_rpm") {
+                    my_system("rm -f '$src_rpm'");
+                }
+
             } else {
                 # if it's failed to write cache
                 unless (write_cache($cache_key, $val, $base, $spec_file, $packaging_dir, $upstream_branch, $upstream_tag)) {