summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2025-03-18 17:45:53 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-19 09:48:14 +0000
commit05d23378c299edd81c69597cfe0124724d6c52ec (patch)
tree947a59b4c27e600b9dc1a609c9a98f0f8d333c03 /meta/lib
parent331aef4bcf3ad9bbeea25b3463219f46d46bd4a6 (diff)
downloadpoky-05d23378c299edd81c69597cfe0124724d6c52ec.tar.gz
meta/lib/oe/recipeutils.py: handle fetcher errors when checking for new commits
Recent freedesktop instabilities are causing 'devtool check-upgrade-status' to fail with: bb.fetch2.FetchError: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all -c clone.defaultRemoteName=origin ls-remote https://gitlab.> fatal: unable to access 'https://gitlab.freedesktop.org/mesa/kmscube/': The requested URL returned error: 502 and not print any results for this one or any unrelated recipes included in the check. This change handles the error, so that if some upstream server isn't working properly, latest upstream revision for that is marked as unknown, a warning is printed and upstream version check for other recipes isn't thwarted: WARNING: Unable to obtain latest revision: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all -c clone.defaultRemoteName=origin ls-remote https://gitlab.freedesktop.org/mesa/piglit.git failed with exit code 128, output: remote: GitLab is not responding fatal: unable to access 'https://gitlab.freedesktop.org/mesa/piglit.git/': The requested URL returned error: 502 piglit 1.0 UNKNOWN_BROKEN Ross Burton <ross.burton@arm.com> (From OE-Core rev: c1056293f7cb32ee2bdf31441cc0b59d9ccfe556) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/recipeutils.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 56be75dc9c..044f1bfa61 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -1070,10 +1070,15 @@ def get_recipe_upstream_version(rd):
1070 ud = bb.fetch2.FetchData(src_uri, rd) 1070 ud = bb.fetch2.FetchData(src_uri, rd)
1071 if rd.getVar("UPSTREAM_CHECK_COMMITS") == "1": 1071 if rd.getVar("UPSTREAM_CHECK_COMMITS") == "1":
1072 bb.fetch2.get_srcrev(rd) 1072 bb.fetch2.get_srcrev(rd)
1073 revision = ud.method.latest_revision(ud, rd, 'default') 1073 upversion = None
1074 upversion = pv 1074 revision = None
1075 if revision != rd.getVar("SRCREV"): 1075 try:
1076 upversion = upversion + "-new-commits-available" 1076 revision = ud.method.latest_revision(ud, rd, 'default')
1077 upversion = pv
1078 if revision != rd.getVar("SRCREV"):
1079 upversion = upversion + "-new-commits-available"
1080 except bb.fetch2.FetchError as e:
1081 bb.warn("Unable to obtain latest revision: {}".format(e))
1077 else: 1082 else:
1078 pupver = ud.method.latest_versionstring(ud, rd) 1083 pupver = ud.method.latest_versionstring(ud, rd)
1079 (upversion, revision) = pupver 1084 (upversion, revision) = pupver