From patchwork Fri Oct 2 01:08:58 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babanpreet Singh X-Patchwork-Id: 99851 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 74687CA5FD6 for ; Fri, 2 Oct 2026 01:09:02 +0000 (UTC) Received: from mail-pj2-f12.google.com (mail-pj2-f12.google.com [74.125.227.140]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.2078.1790903341194180574 for ; Thu, 01 Oct 2026 18:09:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=gYorn1LF; spf=pass (domain: gmail.com, ip: 74.125.227.140, mailfrom: bbnpreetsingh@gmail.com) Received: by mail-pj2-f12.google.com with SMTP id 98e67ed59e1d1-398beb616f5so3219629a91.1 for ; Thu, 01 Oct 2026 18:09:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790903340; x=1791508140; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=OB0pEkDoHytIrzKh/bU3hDIb9fhoRlE2E9A7f2dUUtc=; b=gYorn1LFnbor1q2BgdY68Jji8Rgn6CuPxn6JKf8igmXly/IQ1W0uteKHhKqx2vuTye dqpg+KsLD8fP/q2K/bPHqH68/IWvDV4V11wptY+OpFIx2elDQwMT1IgfpjEeTt9LvXtv T+iGRLoOrI8NKcV5jTNN3mBBvcuehvyPSV9Otgh/cARcEB3uaa9w/1KF6Qka/Jmlbnzw imHWFIoH/hQIKgTXcjbiOlNJ+mVP5SDYS0+6vRgcx5IkRHQbY7EwDgsmxZDOfAvgBJ/n DacU2FoEoTtzd+iPqkVhdW+JXsvObT8FkYEoqoy/1sXuh3f4/KjhOweXc/OmirD67Vil eIFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790903340; x=1791508140; h=content-transfer-encoding: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=OB0pEkDoHytIrzKh/bU3hDIb9fhoRlE2E9A7f2dUUtc=; b=pItLRNQCr5yw3gV6NNrRjxAZlpC1lyLSCFSDnZHNYZ0b4t0CEWnKhNyc76Jlw1DgWY bHrVZBoIYRUjU1QPVz3ll0OGDFoyNguOpcTHt3do/8RL4ifvmrRgMCzHFjkXxlHuBrjm elvGj6Bxxra2K6kB/UWBRm71lc4FOAfoLIwlTKGd9FzT7EslPZskq3cyVusvdIGh+jVH jcNVfl++WVTjPXIdOWWhDPJOCnPjYdEMDK22nRo5b9TZ/DZwd3FDiJCVaf0IRYkjP0zO bAXn84lzpE/ocF5tWXwtBH1F0qa5nYtsC4IiJZ8i3Ygman8eLfi7j8svUwt4z+5cTFRX pBMA== X-Gm-Message-State: AFq9FYJXSItIe+m5WOq2BdiVy4aXQFmZPvAPCZe7Yt5l6CzIxQgyDngl JePyeEmslXJgbBELAVeoZ4orZlZWl6VAtjRKkqrEDZEfYb/9hDMa1+9yc+6j0A90oBvAgK38 X-Gm-Gg: AYBFou0eqaVudcNt7TabaIlco453qXChE4BJQxZUXfTfT1KVhBIMzvGbj5yJXx140r1 6zkuEgYuUMzV8NTfXLAIHOW+yu9kG39zn/inYGk9aRci/HCoGeZlZAZ6/U8KPs4eFhr0Ruj0VUC FKgwOHkn2KNpAVEARsdHB+bQNjUmcU1g6K7ppYVqBN2iNHUSOi2zhbkNSSn6NfAjCjq6J/w3Gse Xco1NKF+fOcrPPiLu4slLz1eFETp/dsKy37pVe93m1/lLSI81/dx/LejPyOKvrSwCMj+CLTpCjX G6skZZHinKxHXikgSuuvxIx8YXJ20ZWDcmX6GlHegpsNiVE383qX0xXDPlo2Vb9LVtZxhZyd5mK oipRtdZu+nQd8tor0a8GRL56pl32NNn6wzjATQjGJ9KAi6hn/r1NyDeuM6yUqsiKfiig/AN/BMp /92wCCWaPZPWDCUrQzT+L3OhnAMLOvYqiZ+rjDER5K97dY2ilI13wWGBLKMOx1EkLR88j2TAOsk qkZlJ+z X-Received: by 2002:a17:90b:5706:b0:3a0:f4ee:d2b2 with SMTP id 98e67ed59e1d1-3a6cec2ff75mr791180a91.32.1790903340385; Thu, 01 Oct 2026 18:09:00 -0700 (PDT) Received: from ydev.. ([108.180.130.139]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3a6dcdac9f7sm431636a91.1.2026.10.01.18.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Oct 2026 18:09:00 -0700 (PDT) From: Babanpreet Singh To: openembedded-core@lists.openembedded.org Cc: Yoann Congal , Julien Stephan , Babanpreet Singh Subject: [scarthgap][PATCH 1/2] devtool: standard: fix update-recipe/finish --initial-rev override Date: Fri, 2 Oct 2026 01:08:58 +0000 Message-ID: <20261002010859.7-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 ; Fri, 02 Oct 2026 01:09:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/247058 Passing --initial-rev to update-recipe or finish currently has no effect: the recorded initial revision is skipped as intended, but the override is never stored in its place. For recipes without submodules this leaves no initial revision at all, and the command fails with an error asking the user to pass --initial-rev. Seed initial_revs with the override before parsing the bbappend so it takes precedence again. Recorded values are still used for submodules and when no override is given. AI-Generated: Uses Claude (claude-fable-5) Signed-off-by: Babanpreet Singh Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit 62abb60b899e63ea6db5c745f4b1b6af0d4b40f1) Signed-off-by: Babanpreet Singh --- scripts/lib/devtool/standard.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index e1e519ce5b..d5313921f2 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -1254,6 +1254,10 @@ def _get_patchset_revs(srctree, recipe_path, initial_rev=None, force_patch_refre commits = {} patches = [] initial_revs = {} + if initial_rev: + # A user-specified override applies to the main repo ("."); the + # parse loop below leaves it in place of the recorded value + initial_revs["."] = initial_rev with open(recipe_path, 'r') as f: for line in f: pattern = r'^#\s.*\s(.*):\s([0-9a-fA-F]+)$' From patchwork Fri Oct 2 01:08:59 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babanpreet Singh X-Patchwork-Id: 99853 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 82484CA5FD4 for ; Fri, 2 Oct 2026 01:09:02 +0000 (UTC) Received: from mail-pj2-f43.google.com (mail-pj2-f43.google.com [74.125.227.171]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.2089.1790903342151391016 for ; Thu, 01 Oct 2026 18:09:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=T7tbXVnb; spf=pass (domain: gmail.com, ip: 74.125.227.171, mailfrom: bbnpreetsingh@gmail.com) Received: by mail-pj2-f43.google.com with SMTP id 98e67ed59e1d1-3a4c8262465so2653055a91.2 for ; Thu, 01 Oct 2026 18:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790903341; x=1791508141; 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=16jAeDJ4SKFJpGPl5J+4JU8J8YhrIDBUNC+Rz00Hn7U=; b=T7tbXVnb6TQppG+7RVRREQH6XIRB4M4Gm92cW9rKOeS4XuA2/TXmXIhvHhGkKKfprt 6dzwsjmjzcgMcbCac7paYtOtRL5WtpsDBTVwjgk3pQeoCB9g0tv2wccex/CLeC/Zx6AL x55p06W4/bAjtWz20QZxyMnMvJFhvpZ5k9tXWZDKh/o9GLzyb7JatTio6DV980j5Rt1q GZpfwp74+DMwAuW3DSM/nihTa6zNb7RqNwE6CJnXkdQWAKYiOKcFd12p1n4JyxFz55Ik gxtxPHqe8hk8QfleFq71C5IpvRitzy7LmAoRYDP3NmXQ5ZYi/tLS5xs3FPMRpNpqo5sL Twiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790903341; x=1791508141; 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=16jAeDJ4SKFJpGPl5J+4JU8J8YhrIDBUNC+Rz00Hn7U=; b=Op203i58oQO7TyPUpKlA5F7LmKDzG8qL+R3uM1XbhuzIxBt0IJ3XdWaqZOCR269KyO RQJhS4JUqt+wHRohpOdwSpdy/nSTMc/K8sUBPDiV3/9ZES5XCpqpCS+HdJ+iTDRwOFh9 PsUhi99JgyN6x+A8BhWcSVjrYVsk8vq7rQRbYMPdYda0hkv2OrE50sSw1GofM7COdumO yRVkGdZqR0JACe93JUq4hi/hq/bjKgRvcPXzYy48Vr+H/4uG3qKoYgmx1a7ouBfqPZc8 qDyHiZXz2udYBPAit2nBa8XemJqcerPcbSC+UTHkhVen4DXlb2QWu/bU8ZOt5aSJ+o2l CD1w== X-Gm-Message-State: AFq9FYIzKRpfYz0kmecN+1Nugn3NtZypsw0bgSK0FOn03uhkqo4uczzu JdjHHgab6pqo/8BpeWhiH2DUHcQt3RcX/vgxJG4EC4WMUmQluVBug//TDPVLAwqdTmmbQ4AS X-Gm-Gg: AYBFou31cMbKLmVzBsnu5NdkSVlnEqYO/p1UqEBGQxiX7hQODkWGH9FzZLhNRI1ElVE A+ggwrUBH1L4R6SPaUD0JgEUL7WZ6LRutl95hukMeyYiYx8C+ToiTqfzeDTGdkXkm2B6y5y5sit YP34pxOx+kCJsJMj3MYfmBcdjfqFmQAdwbK+JmZ28dqZSySN7usKjjZ78LB4VrsPUmyu8h4oWf1 6+Z88wBmyThRvC9qioJ6Q0q8Hd553bXc5C/7hI8siFEXiLyPUmqQDMnC2AnZ9bijcUAKL8c53oo tkCVTeCz2cqsp7RO1QVpKhX+ZA9FZ3ukBj4ieyujJtZbd2zwjBCzm+Gf4WYcARHZTBDszksKceh SRJd2k+JxmO3fPnOvZ6T+NIG6MB9mgGeLHizkSUhDdfNXxPfYjFfwt4f4vQZ2Yb1+XbkVChTy3K ASIal6ImeX/G0CGbcwu4cWIAkivahFefiisqTlEQzGJ1CPBrqNdWfAzLZ43sTqTFvA5ucTMQ== X-Received: by 2002:a17:90b:4a92:b0:3a4:e635:a8b9 with SMTP id 98e67ed59e1d1-3a6ce7aaab7mr1092454a91.32.1790903341054; Thu, 01 Oct 2026 18:09:01 -0700 (PDT) Received: from ydev.. ([108.180.130.139]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3a6dcdac9f7sm431636a91.1.2026.10.01.18.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Oct 2026 18:09:00 -0700 (PDT) From: Babanpreet Singh To: openembedded-core@lists.openembedded.org Cc: Yoann Congal , Julien Stephan , Babanpreet Singh Subject: [scarthgap][PATCH 2/2] oeqa/selftest/devtool: cover update-recipe --initial-rev Date: Fri, 2 Oct 2026 01:08:59 +0000 Message-ID: <20261002010859.7-2-bbnpreetsingh@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261002010859.7-1-bbnpreetsingh@gmail.com> References: <20261002010859.7-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 ; Fri, 02 Oct 2026 01:09:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/247059 The --initial-rev option had no selftest coverage. Extend test_devtool_update_recipe to run update-recipe with --initial-rev set to the recorded initial revision, which should match the default output, and to a revision partway through the local commits, which should export only the commits after it. AI-Generated: Uses Claude (claude-fable-5) Signed-off-by: Babanpreet Singh Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit 171af3b2915dd076c8d1b205ff75eac1ebd5a586) [Adjusted for scarthgap: also takes the cleanup_cmd change to this test from de635a9bc0 ("mdadm: fetch from git"), which the new steps rely on] Signed-off-by: Babanpreet Singh --- meta/lib/oeqa/selftest/cases/devtool.py | 27 ++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index 6af3e2417a..cace9d26bd 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -1186,13 +1186,38 @@ class DevtoolUpdateTests(DevtoolBase): result = runCmd('echo "A new file" > devtool-new-file', cwd=tempdir) result = runCmd('git add devtool-new-file', cwd=tempdir) result = runCmd('git commit -m "Add a new file"', cwd=tempdir) - self.add_command_to_tearDown('cd %s; rm %s/*.patch; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile))) + cleanup_cmd = 'cd %s; rm %s/*.patch; git add %s; git checkout %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile)) + self.add_command_to_tearDown(cleanup_cmd) result = runCmd('devtool update-recipe %s' % testrecipe) result = runCmd('git add minicom', cwd=os.path.dirname(recipefile)) expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)), ('A ', '.*/0001-Change-the-README.patch$'), ('A ', '.*/0002-Add-a-new-file.patch$')] self._check_repo_status(os.path.dirname(recipefile), expected_status) + result = runCmd(cleanup_cmd) + self._check_repo_status(os.path.dirname(recipefile), []) + # Now try the same passing --initial-rev: the recorded initial + # revision must give the same result as not passing the option, and a + # later revision must export only the commits after it + result = runCmd('git rev-parse devtool-base', cwd=tempdir) + initial_rev = result.output.strip() + result = runCmd('devtool update-recipe --initial-rev %s %s' % (initial_rev, testrecipe)) + result = runCmd('git add minicom', cwd=os.path.dirname(recipefile)) + expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)), + ('A ', '.*/0001-Change-the-README.patch$'), + ('A ', '.*/0002-Add-a-new-file.patch$')] + self._check_repo_status(os.path.dirname(recipefile), expected_status) + result = runCmd(cleanup_cmd) + self._check_repo_status(os.path.dirname(recipefile), []) + result = runCmd('git rev-parse HEAD~1', cwd=tempdir) + midpoint_rev = result.output.strip() + result = runCmd('devtool update-recipe --initial-rev %s %s' % (midpoint_rev, testrecipe)) + result = runCmd('git add minicom', cwd=os.path.dirname(recipefile)) + expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)), + ('A ', '.*/0001-Add-a-new-file.patch$')] + self._check_repo_status(os.path.dirname(recipefile), expected_status) + result = runCmd(cleanup_cmd) + self._check_repo_status(os.path.dirname(recipefile), []) def test_devtool_update_recipe_git(self): # Check preconditions