summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-11-22 16:06:23 +0000
committerSteve Sakoman <steve@sakoman.com>2024-12-09 07:54:03 -0800
commitb6bffb45d4229e078f5aed0c46dd3d5d57a396c4 (patch)
treedfb7ade1dd0a2251bffe612511ab18a68ee8b11c
parent4d0e1a7f5e525d5ae6180d867928102556fc73a5 (diff)
downloadpoky-b6bffb45d4229e078f5aed0c46dd3d5d57a396c4.tar.gz
oeqa/utils/gitarchive: Return tag name and improve exclude handling
Tweak the gitarchive exclude handling not to error if excluded files don't match. Also return the tagname created so that other code can then use it. (From OE-Core rev: 2df9c2248ac4996ad1fd1fe9f492eb2d71b758cb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1adba3430faffdf6217b6a00533a3b48a9388abc) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/lib/oeqa/utils/gitarchive.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py
index 6e8040eb5c..6db8c99147 100644
--- a/meta/lib/oeqa/utils/gitarchive.py
+++ b/meta/lib/oeqa/utils/gitarchive.py
@@ -67,7 +67,7 @@ def git_commit_data(repo, data_dir, branch, message, exclude, notes, log):
67 67
68 # Remove files that are excluded 68 # Remove files that are excluded
69 if exclude: 69 if exclude:
70 repo.run_cmd(['rm', '--cached'] + [f for f in exclude], env_update) 70 repo.run_cmd(['rm', '--cached', '--ignore-unmatch'] + [f for f in exclude], env_update)
71 71
72 tree = repo.run_cmd('write-tree', env_update) 72 tree = repo.run_cmd('write-tree', env_update)
73 73
@@ -166,6 +166,8 @@ def gitarchive(data_dir, git_dir, no_create, bare, commit_msg_subject, commit_ms
166 log.info("Pushing data to remote") 166 log.info("Pushing data to remote")
167 data_repo.run_cmd(cmd) 167 data_repo.run_cmd(cmd)
168 168
169 return tag_name
170
169# Container class for tester revisions 171# Container class for tester revisions
170TestedRev = namedtuple('TestedRev', 'commit commit_number tags') 172TestedRev = namedtuple('TestedRev', 'commit commit_number tags')
171 173