From nobody Wed Feb 11 05:37:01 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1686061948; cv=none; d=zohomail.com; s=zohoarc; b=RkgqouUzN63T/IFQqp2wnjwKMGRzoiVOQpZ3LxARD0QD+Xwn+vfOgvpEVjJZNXzQheC1Z+Lp1BjVgKJb2VaLPeqv/2FpCxTGJT6C3U3FqztJObpIyZCiy03lIa71n/VXb4U8JGkvR6d1dIbc29vbm99xKqmayRNFOaH9tTAsChs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686061948; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DDldL0xhfPvoE8avQxYF9j/S/qjA1eexqMtZkHxm0IM=; b=jp+OSit5W3brHdY113TZl60QNcz8KIB8WS3hABRpE9ss7Qn2KCA2O2H+Jp66ZNIjE4GbqYfxSe+ePqkUq+fCzwMIo4VhruL0tl/MvATmK0+W8QbCLYoQqi6u+t/TU0nrZJylBUB4wqxrD5dASV3d2xOX/CB6oW8SWluuYPZpiuQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1686061948260300.07839626718885; Tue, 6 Jun 2023 07:32:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6Xj1-0005aq-Ey; Tue, 06 Jun 2023 10:31:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xiw-0005ZQ-U4 for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6Xiv-0001KI-Cx for qemu-devel@nongnu.org; Tue, 06 Jun 2023 10:31:50 -0400 Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-534-ZzSdp60kOqajJ9Uj-LxbMA-1; Tue, 06 Jun 2023 10:31:47 -0400 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-94a355c9028so471426566b.3 for ; Tue, 06 Jun 2023 07:31:46 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.gmail.com with ESMTPSA id h21-20020a170906261500b00977cad140a8sm3851899ejc.218.2023.06.06.07.31.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 07:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686061908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DDldL0xhfPvoE8avQxYF9j/S/qjA1eexqMtZkHxm0IM=; b=MaNm7fjB1MH88LL7hvonCjVmbZvqBpPAT2VuPmzZ/blfhlb7StAyyknhl1izAjTbyqagLC dYM9nWE7kJoLEWUn2Y66z5AgX+BnkxGtIeC397z4TNHj9l/rohuOcoEhvmNGbyKKYN6aCX QFyBAaUOOX57uIqyLUo/Xbe5faLxyzg= X-MC-Unique: ZzSdp60kOqajJ9Uj-LxbMA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686061904; x=1688653904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DDldL0xhfPvoE8avQxYF9j/S/qjA1eexqMtZkHxm0IM=; b=QBFr4+oyxxhOpDw/dXqX3zi4u8WlRg4GJhpgjql3Sv1Rvd7GzWCIZIKCfjS9non3E2 8F6Ihnt8rdONQ1bB2mPNwY9AE2/Kr4BT+GXiPMUJbrisxWSYsDGYqD28Q/muMkaS9sz5 y2CPCHZHkvhk/m7SHWtAIXdIO+s3UboGR8tiXMm/mMkUaaQfv74uQU5OLchdHiql6wuH x/zWSP9NTvhmL+oZddA69+RCPxqyStRYNIVz4hsjmSwsgrO8dLian11/Tsmk8cyRDYw0 KfxYQ+tpyaAsxyXEKwg6v9WTAxgzQd+k1agPrwG6bVGq4OJqYY4iMZUAKvXB6f35v1bB EBtw== X-Gm-Message-State: AC+VfDyYlapR0YoUuu6msIIZDL6QfR1fya+3pYj5/rF7Vf6ULLlcpUEH uWou60DOymW2xILbyHNemsVrcsBKUAI4SMmLlr1SoyHqA3CTVjf98mYRVxN/oLrpbBtaehsg6/W sRj5a8b1P3IHSXVwCmpRtL4NDCNrGkapLeFIba+qDb4TVBI/PuCsFaH0BeEJ1PTGaqhJmqSxrOB Q= X-Received: by 2002:a17:907:72c9:b0:977:abac:9635 with SMTP id du9-20020a17090772c900b00977abac9635mr2572453ejc.20.1686061903160; Tue, 06 Jun 2023 07:31:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7DTLiNKN097Jw0UyEpwPlg2xhDNQL20uM7G2M0j03cRPlaFTAv075C1l+9kIHIQKaTjPksyQ== X-Received: by 2002:a17:907:72c9:b0:977:abac:9635 with SMTP id du9-20020a17090772c900b00977abac9635mr2572431ejc.20.1686061900998; Tue, 06 Jun 2023 07:31:40 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PULL 15/21] build: log submodule update from git-submodule.sh Date: Tue, 6 Jun 2023 16:31:10 +0200 Message-Id: <20230606143116.685644-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com> References: <20230606143116.685644-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1686061950200100003 Print exactly which submodules have been updated, by reusing the logic of "git-submodule.sh validate" after executing "git submodule update --init'. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Paolo Bonzini --- Makefile | 4 +--- scripts/git-submodule.sh | 16 +++++++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 8005f1cc53e..d68196acb9e 100644 --- a/Makefile +++ b/Makefile @@ -52,9 +52,7 @@ Makefile: .git-submodule-status .PHONY: git-submodule-update git-submodule-update: ifneq ($(GIT_SUBMODULES_ACTION),ignore) - $(call quiet-command, \ - (GIT=3Dgit "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODULES_ACTIO= N) $(GIT_SUBMODULES)), \ - "GIT","$(GIT_SUBMODULES)") + $(quiet-@)GIT=3Dgit "$(SRC_PATH)/scripts/git-submodule.sh" $(GIT_SUBMODUL= ES_ACTION) $(GIT_SUBMODULES) endif =20 # 0. ensure the build tree is okay diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh index b7d8f05352c..38b55c90e11 100755 --- a/scripts/git-submodule.sh +++ b/scripts/git-submodule.sh @@ -46,6 +46,13 @@ validate_error() { exit 1 } =20 +check_updated() { + local CURSTATUS OLDSTATUS + CURSTATUS=3D$($GIT submodule status $module) + OLDSTATUS=3D$(grep $module $substat) + test "$CURSTATUS" =3D "$OLDSTATUS" +} + if test -n "$maybe_modules" && ! test -e ".git" then echo "$0: unexpectedly called with submodules but no git checkout exis= ts" @@ -75,11 +82,7 @@ status|validate) test -f "$substat" || validate_error "$command" test -z "$maybe_modules" && exit 0 for module in $modules; do - CURSTATUS=3D$($GIT submodule status $module) - OLDSTATUS=3D$(cat $substat | grep $module) - if test "$CURSTATUS" !=3D "$OLDSTATUS"; then - validate_error "$command" - fi + check_updated $module || validate_error "$command" done exit 0 ;; @@ -89,6 +92,9 @@ update) =20 $GIT submodule update --init $modules 1>/dev/null test $? -ne 0 && update_error "failed to update modules" + for module in $modules; do + check_updated $module || echo Updated "$module" + done =20 (while read -r; do for module in $modules; do --=20 2.40.1