On Tue, 2026-09-29 at 19:27 +0200, Alexander Kanavin wrote: > On Mon, 28 Sept 2026 at 21:36, Daniel Turull via lists.openembedded.org > <[email protected]> wrote: > > - if rd.getVar("UPSTREAM_CHECK_COMMITS") == "1": > > + if rd.getVar("UPSTREAM_CHECK_COMMITS") == "1" and not > > stable_upgrade: > > bb.fetch.get_srcrev(rd) > > upversion = None > > revision = None > > @@ -1079,6 +1079,12 @@ def get_recipe_upstream_version(rd, > > stable_upgrade=False): > > upversion = upversion + "-new-commits-available" > > except bb.fetch.FetchError as e: > > bb.warn("Unable to obtain latest revision: {}".format(e)) > > + elif rd.getVar("UPSTREAM_CHECK_COMMITS") == "1": > > > > > It took me a moment (and inspecting the actual code as it is now) to realize > that you're modifying the same if block, and adding an elif to it: > > if rd.getVar("UPSTREAM_CHECK_COMMITS") == "1" and not stable_upgrade: > ... // yocto master > elif rd.getVar("UPSTREAM_CHECK_COMMITS") == "1": > ... // stable yocto release > > I assume AI can't see that it made the conditional logic less understandable > than it was, but you should. Better: > > if rd.getVar("UPSTREAM_CHECK_COMMITS") == "1": > if not stable_upgrade: > ... > else: > ... > > Alex
Actually it was me instructing to modify as less code as possible. I had a flat if elif else version. I'll send a v2 with a more clear logic and rewrite the whole if section. Best regards, Daniel
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#246888): https://lists.openembedded.org/g/openembedded-core/message/246888 Mute This Topic: https://lists.openembedded.org/mt/121478701/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
