From patchwork Tue Feb 8 03:50: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: 3396 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 B9BDCC433F5 for ; Tue, 8 Feb 2022 03:50:10 +0000 (UTC) Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by mx.groups.io with SMTP id smtpd.web12.6789.1644292209986598673 for ; Mon, 07 Feb 2022 19:50:10 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k7WzE8lD; spf=pass (domain: gmail.com, ip: 209.85.219.50, mailfrom: bkylerussell@gmail.com) Received: by mail-qv1-f50.google.com with SMTP id g3so8486542qvb.8 for ; Mon, 07 Feb 2022 19:50:09 -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=RiOTCBcQUCtOYA/Io2QHveEjGsZ4j/riLL9ws/mW5tY=; b=k7WzE8lDuYcecZeyo0pM5JmP1uYE/ieHpHoPTDQGfmhgTViix4Vo8VP+leJxbuZV02 NCIU7b5EmwRgUS1OftFVrw3PJSrKrDKsbKyesX9j9B7uhP7/eUo2evyMtUSqLKunYhRY D8EdFhjvwwhMVuWBAAzRF8VZigpNahGO0EPexzeec2KYFQxt6RmDk4mslZOTUS1sb/tp eziHMbs3D3g3VuyrYrjzjYVL0XLctHWJ+HsLTKr7gBnThTZpV6FqtFxf2ffQm46Q0TFX GnlUotaDjFWMW4eJ8dvAmeK5R5QuOQPHRbSQKrCvC/ZmCnJoJ5xDhuYFZgRzxOiP5VSY 8vmA== 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=RiOTCBcQUCtOYA/Io2QHveEjGsZ4j/riLL9ws/mW5tY=; b=E4YXHwc7c3aY2FWVyQC0brr5JoFFJa7/R5smaifc3ChOLsMLRkCoQ3SWYG/XqpLhkH a6Bh6QQiIWsx9HGQtjBYtxQ6tQWIv1JD5b51Fs4qlwJjxBGQiXG8MADWvf9Uby+Q6TPu dgQ2unL7FkS7xDQpaJMmf3oaRkOOMnkl0hcQPIsJX4rkcfWlTY4TfdAXu2fij3AR2Mdo MNwLjJtAtsVRQ0PurcRWnU+yUSoliEU8iDh+TdLcMxk/zlB00iJW66g0Jh0+BG0Ok/9Q 19I2ZIX1mTubvs2up0Qi4WznQuw1FkIogm6FaFKoXldXk6QuRHPo90hoffPdwuR7SSBg rwaQ== X-Gm-Message-State: AOAM532GtufKHF1pJwLZOmMJThJjULTbIXR62A+N6ttldlvkf/Ac3L1C njBjmPXsZMui6XUR9GMyrcx275/5xm243Q== X-Google-Smtp-Source: ABdhPJwERYxgk31aVKcfa01fsIiI1tkl2Fxcu/Neks604bYWKAH7p6i65lJ5LxBcVOpT3IFL1T6yDA== X-Received: by 2002:a05:6214:2608:: with SMTP id gu8mr1856050qvb.35.1644292209029; Mon, 07 Feb 2022 19:50:09 -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 h9sm6685378qkn.121.2022.02.07.19.50.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 19:50:08 -0800 (PST) From: Kyle Russell To: openembedded-core@lists.openembedded.org Cc: Kyle Russell Subject: [PATCH 2/2] devtool: don't exec patch commit task funcs for git submodules Date: Mon, 7 Feb 2022 22:50:00 -0500 Message-Id: <20220208035000.400632-2-bkylerussell@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220208035000.400632-1-bkylerussell@gmail.com> References: <20220208035000.400632-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 03:50:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/161474 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.) --- 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')