diff options
author | Alberto Pianon <alberto@pianon.eu> | 2023-10-01 09:52:25 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-15 09:12:43 +0100 |
commit | ef3e46afd910d4b7727d42c4c18b501525c65695 (patch) | |
tree | 7ee4e4edcf1de85190f766bda4a92a5e6f201f1a /bitbake/lib/bb/fetch2/git.py | |
parent | 3a09f0d184683b5d38941e112cc25906d6999771 (diff) | |
download | poky-ef3e46afd910d4b7727d42c4c18b501525c65695.tar.gz |
bitbake: fetch2: Add API for upstream source tracing
This patch adds an API to bb.fetch2 to enable users to plug in an unpack
tracer that can trace each source file back to its corresponding
upstream source url, even when multiple upstream sources are combined
together in the same unpack directory. This may be required for software
composition analysis, license compliance, and detailed SBoM generation.
This patch provides only the needed hooks in bb.fetch2 code and a dummy
abstract class defining the API; users may load their own unpack tracer
class by setting the BB_UNPACK_TRACER_CLASS config parameter.
(Bitbake rev: 05051152cc42acc52bcf9af9a696f632fac4307f)
Signed-off-by: Alberto Pianon <alberto@pianon.eu>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 4385d0b37a..c7ed1f0368 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -589,6 +589,8 @@ class Git(FetchMethod): | |||
589 | destdir = ud.destdir = os.path.join(destdir, destsuffix) | 589 | destdir = ud.destdir = os.path.join(destdir, destsuffix) |
590 | if os.path.exists(destdir): | 590 | if os.path.exists(destdir): |
591 | bb.utils.prunedir(destdir) | 591 | bb.utils.prunedir(destdir) |
592 | if not ud.bareclone: | ||
593 | ud.unpack_tracer.unpack("git", destdir) | ||
592 | 594 | ||
593 | need_lfs = self._need_lfs(ud) | 595 | need_lfs = self._need_lfs(ud) |
594 | 596 | ||