From 3f5687b3e5c8489c1b4e07716676cb304af324a8 Mon Sep 17 00:00:00 2001 From: Shuicheng Lin Date: Mon, 26 Nov 2018 23:28:22 +0800 Subject: [PATCH] Fix build-srpms cannot edit a variety of packages Closes-Bug: 1792001 Fix edit issue for package puppet-nova/bash/resource-agents. The cause of the issue is, there is "rm -rf %{buildroot}" or similar line in the spec, which cause the buildroot folder be deleted, and git info be deleted also. So lead to the "git add" cmd failure. Fix: Try to ignore this cmd to avoid git info be deleted. Test: This script is for edit cmd only, no impact to normal build. Tested several packages locally, no issue found yet. Change-Id: I667c363bd82e68f107a6c51f65a2a9dd0d2434d4 Signed-off-by: Shuicheng Lin --- build-tools/srpm-utils | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-tools/srpm-utils b/build-tools/srpm-utils index 42e558f6..fc09c767 100644 --- a/build-tools/srpm-utils +++ b/build-tools/srpm-utils @@ -815,6 +815,8 @@ raw_create_tarballs_extract_script () { "git add "*|\ "git commit "*) ;; + "rm -rf "*) + ;; *) echo "$LINE" >> $EXTRACT_SCRIPT ;;