Commit Graph

9 Commits

Author SHA1 Message Date
Martin Jansa
f4d8e84fd9 buildcfg: get_metadata_git_*: catch also bb.process.NotFoundError
* bb.process.NotFoundError is triggered when e.g. oe.buildcfg.get_metadata_git_branch
  is called on non-existent directory

(From OE-Core rev: 34c1f66c4c689b26a4c3129eb62f4ff9b6ec14be)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-24 11:27:06 +01:00
Jörg Sommer
8f9eaecb3e buildcfg.py: add dirty status to get_metadata_git_describe
For postmortem analysis it's helpful to know if the build environment was
clean or contained any modifications.

(From OE-Core rev: edaaa2ad311663beabd2416037de00d82fca5fba)

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-09-01 11:05:20 +01:00
Jermain Horsman
9b839a835c bblayers/makesetup.py: Move git utility functions to oe.buildcfg module
This allows other classes to make use of these as well.

Includes a git describe and git toplevel function and functions
to get info for git remotes.

(From OE-Core rev: a04a084b6e513d15cb57ee103c6d6215ce1c75b9)

Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-30 22:25:43 +00:00
Jermain Horsman
a9063f845b lib/oe/buildcfg.py: Remove unused parameter
Several functions included the 'd' parameter but never used it,
additionally the value passed is always None.

(From OE-Core rev: 9e03ce0426576ebef3739dc1dfec4f7cd73ae094)

Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-05 11:28:33 +00:00
Jermain Horsman
d012de568f lib/oe/buildcfg.py: Include missing import
get_layer_revisions() uses the os.path module but it is not included
in the imports.

(From OE-Core rev: 4339ef5b46c39cce402d1cc3526b39702837b839)

Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-05 11:28:32 +00:00
Richard Purdie
38a9622ba3 base/buildhistory/image-buildinfo: Use common buildcfg function
Reduce code duplication to a common function in oe.buildcfg.

(From OE-Core rev: 0b191a1df4c3722defb09dde0c16b1d9e7fe7ef6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-11 10:30:57 +01:00
Richard Purdie
3ae4dd140a buildcfg: Drop unused svn revision function
This isn't used anywhere and everyone is using git now, the functions
are now hardcoded as such too. Drop this function.

(From OE-Core rev: 09ba96a2d7fa02c7a82758bbf4109b04ffca2c55)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-11 10:30:57 +01:00
Richard Purdie
5266670b2d lib/buildcfg: Share common clean/dirty layer function
The comments even say this was copy/paste code. Move to a
shared library function.

(From OE-Core rev: ac3de2f850a418673b87e1c454970cb099e191b0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-11 10:30:57 +01:00
Richard Purdie
ba85bb6055 classes/buildcfg: Move git/layer revision code into new OE module buildcfg
There is a load of duplicated git/layer/revision code which makes
most sesne as a python library, not bbclass code. Start to refactor as such.

(From OE-Core rev: 439cdf8a1e52fd2c4dc81dc40ce7e6af282ce7ac)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-11 10:30:56 +01:00