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 <shuicheng.lin@intel.com>
This commit is contained in:
Shuicheng Lin 2018-11-26 23:28:22 +08:00
parent 81a4adc96b
commit 3f5687b3e5
1 changed files with 2 additions and 0 deletions

View File

@ -815,6 +815,8 @@ raw_create_tarballs_extract_script () {
"git add "*|\
"git commit "*)
;;
"rm -rf "*)
;;
*)
echo "$LINE" >> $EXTRACT_SCRIPT
;;