From patchwork Thu Jul 23 06:02:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Babanpreet Singh X-Patchwork-Id: 93303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D61EC4453E for ; Thu, 23 Jul 2026 06:02:18 +0000 (UTC) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.17751.1784786531146129163 for ; Wed, 22 Jul 2026 23:02:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=jYhpqxlR; spf=pass (domain: gmail.com, ip: 209.85.210.174, mailfrom: bbnpreetsingh@gmail.com) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-848595b338cso277022b3a.0 for ; Wed, 22 Jul 2026 23:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784786530; x=1785391330; darn=lists.openembedded.org; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=sug2bc6HwcokAJ4EQ4opnarYGssOXnJ5LR2Yyf+kNoI=; b=jYhpqxlRgmvpvq00ko46Scny5sqAc2mOdpoShcncT01jhTZKtPyTMduRGLmGF85TpC XFYr5cRIOy1pp+tRTjiH1yGqYgq9k4pDSr7gLLorNOo7IHZJNjXUf+HGviYf1Z9rHX9O gkoVK6pvYOQBf3LyQNA/Vuhan7n1VZOUpZEXkoavTwX6vpU04VbMXeaed4hh1YvbxHE1 WmesNHi0ajlKlPdfnyvNy5IbT1BCOo2jZ7KzUFjoehsaC83HrpYURJ3n8XQWD0eVZ9XS cdaugmoj+XUKShNz4KOimYgpg+0UrKyAdWKIuyAkvMHJBLCtrZNvcbO+wiH8kPhPrNLf V+Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784786530; x=1785391330; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=sug2bc6HwcokAJ4EQ4opnarYGssOXnJ5LR2Yyf+kNoI=; b=sFTttz5EzN4h/7oKX2gAASFvudfHHM9qpKCeG2J7Xfwv/NLKc/zOlpC8U9BuN0bjc2 +nyKaPSEozs88xumBmG9ZEM/Wu7ol3L97KBmdXUMupeBIJtgTKQUqR88/qAEm3pZb290 GBJF8CZiz+nmupFER5OTo0gAzmCyE7vSsBAuqxaTa0lvGYuIZ2GctC1CyERVleu8d3B/ RyURIsgwfGyKglhbyV2XjsngG6Vm1oyZXQCTyCOb442v4M1CiGotBE6OdTk9qrYfBIid NcgLhDLw5VQTxWVzQp9w1lCQcDZAgKEV90SA6X6UPDy68+f1r0U7cf0eB3lXDM9V0n7x TYQQ== X-Gm-Message-State: AOJu0YwNcdF087demCYTTTXV57ScmgC58nk5jKX/24B+y3KxdgtQTMpR 54LAzG3PyjM8VGaArM1VGU4ypHfw0kMmZz2npekNGBXvgRLKK07wITFxgg3jH/45MiQ= X-Gm-Gg: AR+sD13vam9eQ20R02/yT3ApGhNlSeC9KuImf8AFsRu7rDRRLqJq5G7QkKbtn5tJJlt KOvYpTg6a/ryZwPAycNlr2MHyyLhT+3osD4xjhiodz2w4K5ouu53+xIPgXxzIgio9mKxfH3rlZX DgdbiWfoSaXEiJiSSbzpTqA/HrNws3j/z7jIcwPzsT9hI/9AQb7ww8hXTahH6QhrVlX/v8xClrB xB7y3c4qetem1hXOrc7lxAd2rz8dKXwldMlyf23LtISc7qKvxMsNfyyEekBpunQojoVmwDVxI/4 LT9A9T6CbVI8BCkdRRUHcG9r8UCmYrzox3r4kMLlEUc3STLqalb6oib1M90L5DdpAy+e2831PhU WbH2cIn4iyPDOFLSzuCWN3xEM9JZBIpY+U66lzRgvHxb9teSzdlJ8NxgGF7KTJxCgBWxIrP3uk2 vKST6zoCMRTDRY X-Received: by 2002:a05:6a00:421a:b0:848:4b27:36a3 with SMTP id d2e1a72fcca58-84e2bc2aec7mr1871675b3a.72.1784786530330; Wed, 22 Jul 2026 23:02:10 -0700 (PDT) Received: from ydev.. ([108.180.130.139]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84e17602046sm2401550b3a.59.2026.07.22.23.02.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jul 2026 23:02:09 -0700 (PDT) From: Babanpreet Singh To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin , Chris Laplante , Peter Kjellerstedt , Adrian Freihofer , Babanpreet Singh Subject: [PATCH 1/2] devtool: standard: guess srcrev update mode for gitsm:// recipes too Date: Thu, 23 Jul 2026 06:02:08 +0000 Message-ID: <20260723060209.8-1-bbnpreetsingh@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 23 Jul 2026 06:02:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241773 'devtool update-recipe' and 'devtool finish' default to guessing the recipe update mode: 'srcrev' when the source tree HEAD sits on the upstream branch (the "checked out another upstream revision" workflow), 'patch' otherwise. The guesser matches SRC_URI entries against a literal 'git://' prefix, so a gitsm:// recipe never has any git URIs from its point of view and always falls into patch mode. In that case there are no local commits to export either, so checking out a different upstream revision and running update-recipe reports "No patches or files need updating" and silently leaves the recipe's SRCREV untouched, while the same operation on a git:// recipe updates SRCREV. Forcing -m srcrev works, since _update_recipe_srcrev() is scheme-agnostic; only the guess is broken. Accept gitsm:// URIs the same way e7076f1742 ("devtool: gitsm:// should be handled same as git:// in upgrades") did for the upgrade path, where the same omission was fixed; the guesser itself dates from 9b9733b7d7 (2015), before gitsm handling was a consideration. Note this changes the guessed mode for existing gitsm:// recipes from 'patch' to 'srcrev' when HEAD is on the upstream branch — the behavior git:// recipes have had since 2015. Trees carrying local commits still guess 'patch', because their HEAD is not reachable from the upstream branch. AI-Generated: Uses Claude (claude-sonnet-5) Signed-off-by: Babanpreet Singh --- scripts/lib/devtool/standard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index b2b27c7ced..2dff62a7ca 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -1816,7 +1816,7 @@ def _guess_recipe_update_mode(srctree, rdata): """Guess the recipe update mode to use""" import bb.process src_uri = (rdata.getVar('SRC_URI') or '').split() - git_uris = [uri for uri in src_uri if uri.startswith('git://')] + git_uris = [uri for uri in src_uri if uri.startswith('git://') or uri.startswith('gitsm://')] if not git_uris: return 'patch' # Just use the first URI for now From patchwork Thu Jul 23 06:02:09 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babanpreet Singh X-Patchwork-Id: 93302 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5173EC44524 for ; Thu, 23 Jul 2026 06:02:18 +0000 (UTC) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.17728.1784786531817912966 for ; Wed, 22 Jul 2026 23:02:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=JXL5KXJV; spf=pass (domain: gmail.com, ip: 209.85.210.180, mailfrom: bbnpreetsingh@gmail.com) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-84a4d8fd6ecso238793b3a.1 for ; Wed, 22 Jul 2026 23:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784786531; x=1785391331; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=YdOigpHCbgevrsGmHcgW8rM9zT7/apjM1WPEBoVj4T0=; b=JXL5KXJVhhk/qPhTYiwE8QRMe1WuK1X8l5TJt4P303kTxlQFmwxUPH3cuLRoY1CRcP U7HbvYNvOxMFtADn5O79Omy3kQCS72QBPhiiA3StoHkjh/9a9q+8IlDg+drAxj31V6Tt u5bu7CwyzgvstY/r4l6e1Ralmm3qHL6nub4bBtNJSMrAcE/VwbVSvSVwPbvn2rYAkG7M 83w5dZwA41mIORtJ4zAX2BngKKRln7aQDs7hRqluD39Tw690TuxsU8fF+RuEk4aB/vpC SjDRc8L4SAW4hJ9h+0FIcxjFYk0DWZse6eeukCX5iO5QT3slTcFajBwIxCaJeuhjsOGr hn2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784786531; x=1785391331; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=YdOigpHCbgevrsGmHcgW8rM9zT7/apjM1WPEBoVj4T0=; b=I9tMZJaZWSwwe/MB0kjbVCSJGrDk8YwVfBOpDi5L64fMR/QS/Kp1bMUDxjAlnqcOqY 32vhIsiGe4Voc6hbE+J9tctBR2mIKF7GAJJ5Qars0SltCGgw4U2aabCUVuqMxVoz8hd9 n7p3hpftcgA0YipDFOkrEtu+joUvSoQaQxAlkaK/kDH9+tem/04knUEXPxbkRnINNjmU fLO/CmZHffp4tBU6AqfWL+NfLCFJ3qtjQ36sX8hzSCVZDlaurtE0oA5Wjj6rfjsfFv+y /1uPb+XoDSFOa9qjCWQq0FrL4wQF10L4O1/snbQPlizy8ouLUSWGg9i80u9lB4k3oXo2 x7/g== X-Gm-Message-State: AOJu0YzCWVyvLe+cFauFPab+2sf1B8K+sc4OOhv6bCRnFZcWKynsRRJD kv8ZY36NWI5ZhX/Gx6/t0iOyTRgb5noOuPkLWrByvBaW2mqyj/NkCzZIGjHcJEkBQB8= X-Gm-Gg: AR+sD11T35S1eDJUSEVWYH2JdEHKCA5yw8JtruuetVenM3N1dwG9a2S7Ty44MYwDiV4 INnifT1B4ZxU8dweK41xW//NhbkhKhEwmt4NDPbmPq+foOSe5XMrRRP+qybW6vTV4TzaiXpyg79 Ri7yD5wNCR7PU3US88QL5dTejTsydv/14EaL9q4VRhLQJEotgw1jn4IaBqzk7MwLcxjbynLD/dP 1+PXwYnljD46z+5iYCZBh83d3LwFERmKTA6qjATs5tcO7N//BZcnCGVzi7ayBs3ydkBXvAsIWEf ivWalHuRi6q3wSLd4Thy12ITYJQRQfxbcCcE6sZ9AJRXucROg9bdYks4OxzWyYNOQNlCR84jr3x VAGVjz0MYI4t64Mc9BmecRgzkuUbJgMwEvmxuQkx9v4YYzJ5ZNiTCJoWV8tgC5qPITdMV8w7N8S w6jdQ3w9uuTLM/ X-Received: by 2002:a05:6a00:90a5:b0:848:7e85:f208 with SMTP id d2e1a72fcca58-84e2bb546c5mr2087601b3a.37.1784786531047; Wed, 22 Jul 2026 23:02:11 -0700 (PDT) Received: from ydev.. ([108.180.130.139]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84e17602046sm2401550b3a.59.2026.07.22.23.02.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jul 2026 23:02:10 -0700 (PDT) From: Babanpreet Singh To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin , Chris Laplante , Peter Kjellerstedt , Adrian Freihofer , Babanpreet Singh Subject: [PATCH 2/2] oeqa/selftest/devtool: cover srcrev update mode guessing for gitsm:// Date: Thu, 23 Jul 2026 06:02:09 +0000 Message-ID: <20260723060209.8-2-bbnpreetsingh@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260723060209.8-1-bbnpreetsingh@gmail.com> References: <20260723060209.8-1-bbnpreetsingh@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 23 Jul 2026 06:02:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241774 Add test_devtool_update_recipe_gitsm: devtool modify the git-submodule-test recipe, move the source tree to the parent of the pinned revision (an upstream commit, no local changes) while staying on the devtool branch, run 'devtool update-recipe' in the default auto mode, and assert the recipe's SRCREV is updated to the checked-out revision. Without the preceding fix the mode guesser cannot see gitsm:// URIs, falls into patch mode, reports "No patches or files need updating" and leaves the recipe untouched, and this test fails with: AssertionError: Missing file changes: [(' M', '.*/git-submodule-test.bb$')] No existing test exercises the auto->srcrev guess for any URI scheme: the auto-mode arm of test_devtool_update_recipe_git covers the local-commits->patch direction only. AI-Generated: Uses Claude (claude-sonnet-5) Signed-off-by: Babanpreet Singh --- meta/lib/oeqa/selftest/cases/devtool.py | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index a10eb0c784..6df07f8c5e 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -1378,6 +1378,39 @@ class DevtoolUpdateTests(DevtoolBase): ('??', '%s/0002-Add-a-new-file.patch' % relpatchpath)] self._check_repo_status(os.path.dirname(recipefile), expected_status) + def test_devtool_update_recipe_gitsm(self): + # Check that auto mode guesses srcrev update mode for a gitsm:// recipe + # when HEAD is on the upstream branch, same as it does for git:// + testrecipe = 'git-submodule-test' + bb_vars = get_bb_vars(['FILE', 'SRC_URI', 'SRCREV'], testrecipe) + recipefile = bb_vars['FILE'] + src_uri = bb_vars['SRC_URI'] + self.assertIn('gitsm://', src_uri, 'This test expects the %s recipe to be a gitsm recipe' % testrecipe) + self._check_repo_status(os.path.dirname(recipefile), []) + # First, modify a recipe + tempdir = tempfile.mkdtemp(prefix='devtoolqa') + self.track_for_cleanup(tempdir) + self.track_for_cleanup(self.workspacedir) + self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') + result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir)) + # Check git repo + self._check_src_repo(tempdir) + # Move the source tree to the parent of the pinned revision, staying + # on the devtool branch: a revision reachable from the upstream branch + # with no local commits, i.e. the "check out another upstream revision + # to move the recipe" workflow the srcrev guess exists to detect + result = runCmd('git rev-parse HEAD~1', cwd=tempdir) + prevrev = result.output.strip() + runCmd('git reset --hard %s' % prevrev, cwd=tempdir) + self.add_command_to_tearDown('cd %s; git checkout %s' % (os.path.dirname(recipefile), os.path.basename(recipefile))) + result = runCmd('devtool update-recipe %s' % testrecipe) + expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile))] + self._check_repo_status(os.path.dirname(recipefile), expected_status) + result = runCmd('git diff %s' % os.path.basename(recipefile), cwd=os.path.dirname(recipefile)) + addlines = ['SRCREV = "%s"' % prevrev] + removelines = ['SRCREV = "%s"' % bb_vars['SRCREV']] + self._check_diff(result.output, addlines, removelines) + def test_devtool_update_recipe_append(self): # Check preconditions testrecipe = 'minicom'