From patchwork Tue Feb 8 12:25:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Russell X-Patchwork-Id: 3419 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 8230FC433EF for ; Tue, 8 Feb 2022 12:25:13 +0000 (UTC) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) by mx.groups.io with SMTP id smtpd.web08.10429.1644323108325161371 for ; Tue, 08 Feb 2022 04:25:08 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VrP2vlAS; spf=pass (domain: gmail.com, ip: 209.85.160.171, mailfrom: bkylerussell@gmail.com) Received: by mail-qt1-f171.google.com with SMTP id x5so14511239qtw.10 for ; Tue, 08 Feb 2022 04:25:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ndKNc3wP/nS1wVNLxAIrcavojvtKSnIyHKEo0Q6mPSc=; b=VrP2vlASrx5l0lXtfYf9JPfLji8kB+UTDE+008+awNsSgLs90JSZzAFcpL4ft9XQX0 b+5TmjZATZpfe3q9HfCTnl5jwl2XP1uf17G0aHEXwDPjIvw5GGnr355nzXqR2+aYB1oT etLXwTpI50JGP4efxqls2y7oQuz/k37HKKjkTb+zgmtaWGjLjGsxwZ4MeW0tFiCgW7eF O4IGqHq7zMEdDnm+nBnRqe723Zm6xR5BWevkQeFYVEjKfkd7HB9qszdzYWRImHqTaCNe ZMFtdwwSYkiy2PP8z3BgTo0l0Ni9ix1CuBna5HJKCAejNJpY10PKC5fw0a1RFD69afqT 4kiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ndKNc3wP/nS1wVNLxAIrcavojvtKSnIyHKEo0Q6mPSc=; b=y7wBUl6+HOY/SOkLodiBNUeWe05V1TbkAPLPBMZqkEOUQRl1bMvYOvAO/4lnd4zxA6 5d+Bjtfgo0sAd9C0RaXG8Gd9+T+KW2XlJUYT7IsQKcSRjVwOI++y391qlREN+ZC9hmAf c+Ig2fmubZZWskw/7TGM+pQOAd4e8bIOfc1vCKoBwrup3hdyxnbuJ4oFdEyPkMscuLt1 RADVXLAKjUali1uG7pIyLk5fJzirNU4jK3B0DF6Ko1RPSyukq1PzINzEbKvVsmXtL4qz JiZv/SVe/okKm7eOVsXByc1nHZDvyjTMcXSj0y+/VzJhSCwF0XL7YMyV31S+l3NBqTvj 1aTg== X-Gm-Message-State: AOAM533650VXzL5oFd3bFwiG7z6go/99wV6TQaGjuosLdIigU7xK1rCK ICw470eYlARLWNROVz2vgFj0yKJaN7bTUA== X-Google-Smtp-Source: ABdhPJy1Qbf+YbGeA/7TBkLGXzYlAXM5sYn5FyoSxXcp/fAsPA/DC0IXIGNwmsss3VjzS0ux3W/PzA== X-Received: by 2002:a05:622a:64a:: with SMTP id a10mr2699594qtb.465.1644323107362; Tue, 08 Feb 2022 04:25:07 -0800 (PST) Received: from hercule.localdomain (cpe-74-138-104-174.kya.res.rr.com. [74.138.104.174]) by smtp.gmail.com with ESMTPSA id i12sm6768591qko.105.2022.02.08.04.25.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 04:25:07 -0800 (PST) From: Kyle Russell To: openembedded-core@lists.openembedded.org Cc: Kyle Russell Subject: [PATCH v2 2/2] devtool: don't exec patch commit task funcs for git submodules Date: Tue, 8 Feb 2022 07:25:00 -0500 Message-Id: <20220208122500.429218-2-bkylerussell@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220208122500.429218-1-bkylerussell@gmail.com> References: <20220208122500.429218-1-bkylerussell@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 08 Feb 2022 12:25:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/161504 When applying a patch directly to a submodule, devtool doesn't need to generate commits for updated submodule revisions, which may differ each time a patch is applied to a devtool workspace. (submodule revision commits would be effectively useless unless the patch is pushed to a remote repo from devtool, at which time a commit should be generated by the user anyway.) Additionally, attempting to commit new submodule revisions in the parent repo may error with "no changes added to commit" if the patched module is nested within multiple submodules below the parent repo. (Devtool doesn't and shouldn't recusively create commits on each submodule.) Signed-off-by: Kyle Russell --- scripts/lib/devtool/standard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 01fb5ad96f..5282253ac4 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -569,7 +569,8 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works f.write('DEVTOOL_DEVBRANCH = "%s"\n' % devbranch) if not is_kernel_yocto: f.write('PATCHTOOL = "git"\n') - f.write('PATCH_COMMIT_FUNCTIONS = "1"\n') + if not 'gitsm' in d.getVar('SRC_URI'): + f.write('PATCH_COMMIT_FUNCTIONS = "1"\n') if extra_overrides: f.write('DEVTOOL_EXTRA_OVERRIDES = "%s"\n' % ':'.join(extra_overrides)) f.write('inherit devtool-source\n')