summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2022-07-09uprev-srcrev: workaround upstream changesMax Krummenacher
The uprev-srcrev tool currently crashes with some python backtraces. This is caused by changes in the bitbake fetcher code. See bitbake, commit 4b5eed16 ("fetch2/cooker: Fix source revision handling with floating upstreams") Workaround it by calling bb.fetch2.get_srcrev() if AUTOINC is not in PV. For makes all recipes we currently uprev succeed. Related-to: ELB-4590 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2021-10-18updatesrcrev.py: work around python crashMax Krummenacher
Since commit c9c9679 ("buildconf/local.conf: don't set any machine by default") calling scripts/uprev-srcrev creates a python crash unless one makes sure a MACHINE is set. Just reading PV from the datastore before continuing with doing the uprev fixes the issue. Fixes: | Traceback (most recent call last): | File "/home/krm/bla/dunfell/layers/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 1585, in latest_revision | return revs[key] | File "/home/krm/bla/dunfell/layers/openembedded-core/bitbake/lib/bb/persist_data.py", line 50, in wrap_func | return f(self, *args, **kwargs) | File "/home/krm/bla/dunfell/layers/openembedded-core/bitbake/lib/bb/persist_data.py", line 79, in wrap_func | return f(self, cursor, *args, **kwargs) | File "/home/krm/bla/dunfell/layers/openembedded-core/bitbake/lib/bb/persist_data.py", line 167, in __getitem__ | raise KeyError(key) | KeyError: 'git:git.toradex.com.u-boot-toradex.gittoradex_2020.07' | | During handling of the above exception, another exception occurred: | | ... | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | ... | File "/home/krm/bla/dunfell/layers/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 1587, in latest_revision | revs[key] = rev = self._latest_revision(ud, d, name) | File "/home/krm/bla/dunfell/layers/openembedded-core/bitbake/lib/bb/fetch2/git.py", line 689, in _latest_revision | sha1, ref = l.split() | bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception ValueError: not enough values to unpack (expected 2, got 0) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit b78d9de8e585f5071f62bab7362c8e69affe4102)
2021-05-24uprev-srcrev: print recipe name together with new git hashMax Krummenacher
On the build server the three output lines produced by a single recipe are not together which makes it hard to check which recipe got updated to which source revision. Print the recipe file name together with the git hash makes it all clear. Changes | [krm@linuxdev2 build]$ ../layers/meta-toradex-distro/scripts/uprev-srcrev | INFO: Processing recipe ../layers/meta-toradex-bsp-common/recipes-kernel/backports/backports_5.4.bb | NOTE: Starting bitbake server... | INFO: Update SRCREV to 4cb81c29dde242744eccf9f37f2014ea3b37ade2. | | INFO: Processing recipe ../layers/meta-toradex-bsp-common/recipes-kernel/linux/linux-toradex-mainline_5.4.bb | NOTE: Starting bitbake server... | INFO: Update SRCREV_machine to db57a7415fa94e0d5a7f23908be15d5d6e72a891. | ... to | [krm@linuxdev2 build]$ ../layers/meta-toradex-distro/scripts/uprev-srcrev | INFO: Processing recipe ../layers/meta-toradex-bsp-common/recipes-kernel/backports/backports_5.4.bb | NOTE: Starting bitbake server... | INFO: backports_5.4.bb: Update SRCREV to 4cb81c29dde242744eccf9f37f2014ea3b37ade2. | | INFO: Processing recipe ../layers/meta-toradex-bsp-common/recipes-kernel/linux/linux-toradex-mainline_5.4.bb | NOTE: Starting bitbake server... | INFO: linux-toradex-mainline_5.4.bb: Update SRCREV_machine to db57a7415fa94e0d5a7f23908be15d5d6e72a891. | ... Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 213eb8b0826eb8f33c3a87518762dca480c85354)
2020-09-16recipetool: add updatesrcrev sub-commandStefan Agner
Use the recipetool plugin mechanism to add a updatesrcrev command. This allows to update the SRCREV variable to point to the current git hash the references git branch is pointing to. A OpenEmbedded build environment needs to be initialized. Then use the following command to update SRCREV of a particular recipe: recipetool updatesrcrev <path-to-recipe> Related-to: AUT-354 Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit f80b1846113635ec84177f0020efab02f6679d1a)