From 3e5f74211d51193abf9084d47478d63036f75af1 Mon Sep 17 00:00:00 2001 From: wangbiao Date: Mon, 8 Jul 2024 16:27:38 +0900 Subject: [PATCH] fix bug: When there are multiple specs file in one package, if build again after chaning another commitID, only build with one spec, other build are skipped Change-Id: Icd9ce26e778902a414af4194859215f6862b7987 Signed-off-by: wangbiao --- depanneur | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/depanneur b/depanneur index da1e78e..ba23f9f 100755 --- 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)) { -- 2.34.1