]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
oeqa/utils/gitarchive: Return tag name and improve exclude handling
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Nov 2024 16:06:23 +0000 (16:06 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 23 Nov 2024 14:28:29 +0000 (14:28 +0000)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/gitarchive.py

index 10cb267dfa92e79f2765c74f7b77798dc636afaf..a826646059a523bbc3854abcf955e65681ce79eb 100644 (file)
@@ -67,7 +67,7 @@ def git_commit_data(repo, data_dir, branch, message, exclude, notes, log):
 
         # Remove files that are excluded
         if exclude:
-            repo.run_cmd(['rm', '--cached'] + [f for f in exclude], env_update)
+            repo.run_cmd(['rm', '--cached', '--ignore-unmatch'] + [f for f in exclude], env_update)
 
         tree = repo.run_cmd('write-tree', env_update)
 
@@ -202,6 +202,8 @@ def gitarchive(data_dir, git_dir, no_create, bare, commit_msg_subject, commit_ms
         log.info("Pushing data to remote")
         data_repo.run_cmd(cmd)
 
+    return tag_name
+
 # Container class for tester revisions
 TestedRev = namedtuple('TestedRev', 'commit commit_number tags')