From nobody Sun May 5 11:47:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+55704+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55704+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1583800555; cv=none; d=zohomail.com; s=zohoarc; b=ghASdOeRBDQE1FW1zdAGaCtq8lHHkSxgfqgt4l/fEjhFccaRMjZnPV0zXvtjP5sldaq+X+lFB6UJLWm4NE34ZUdCrKS+etf+7IKotzJJGn7a8dt9TkudEfxK9Gi3HyBSeKQtCt2DQy6zfkKQyr18Bq8wdfEsE8eqz5DyYGjD1pE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583800555; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=DZBEnpuz7F4deLSOMyl7Q5dQr/XCxf8EhGwh0b71zAI=; b=AAqDLt/em4pfahIgPp9AL8S2x2IOuvQ5Tc658lZyVQpG+/xySHoBfS2PkuIyCvi76J8jf3fPa9+gx3fORbx3bkeE4Y0DuE6MLmDxWWx/gZ/Y8OTbOJpp8wa8ZPTURZ8wNpFGjK5XXrB/oR23yoRuTOyagHEj0BUFp391rHsRPVI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55704+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1583800555168508.66713170721096; Mon, 9 Mar 2020 17:35:55 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id rR5SYY1788612xcLgsWw0Oat; Mon, 09 Mar 2020 17:35:53 -0700 X-Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web12.10573.1583800553234918099 for ; Mon, 09 Mar 2020 17:35:53 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Mar 2020 17:35:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,535,1574150400"; d="scan'208";a="245517658" X-Received: from aedesimo-desk.amr.corp.intel.com ([10.7.159.171]) by orsmga006.jf.intel.com with ESMTP; 09 Mar 2020 17:35:52 -0700 From: "Desimone, Ashley E" To: devel@edk2.groups.io Cc: Nate DeSimone , Puja Pandya , Erik Bjorge Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Correct when a sparse reset is triggered during checkout Date: Mon, 9 Mar 2020 17:35:49 -0700 Message-Id: <20200310003549.6552-1-ashley.e.desimone@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ashley.e.desimone@intel.com X-Gm-Message-State: pcrMXEH0tN9Jit5lhxUyip6Nx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1583800553; bh=nNT8ua/u0U0AI5X8y23TWEb/aP511wEX559rKE72XHE=; h=Cc:Date:From:Reply-To:Subject:To; b=nOg9ulOu89e42FUAplRjdJsPUszLBzpJxt/XvtcTv20rfmBQHXqHLA43ItlFOOxxvJJ XhZ29usMnZ1vMrwksbBo1X8jE08tDgULh0nSJr8Hk/gMyaVxW5OlCvn14OmXtnfqOonE2 HOXWBUJDh5e6xMsJS6VmxQ8s6sxFD18EqnA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Correct an error case in the checkout function defined in: common/common_repo_functions.py where the need to perform a sparse reset was not correctly calculated. Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge --- edkrepo/common/common_repo_functions.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/edkrepo/common/common_repo_functions.py b/edkrepo/common/commo= n_repo_functions.py index d857d09..b9c28e6 100644 --- a/edkrepo/common/common_repo_functions.py +++ b/edkrepo/common/common_repo_functions.py @@ -571,13 +571,22 @@ def checkout(combination_or_sha, verbose=3DFalse, ove= rride=3DFalse, log=3DNone): # Disable sparse checkout current_repos =3D initial_repo_sources sparse_enabled =3D sparse_checkout_enabled(workspace_path, initial_rep= o_sources) + sparse_diff =3D False + for source in initial_repo_sources: + for src in repo_sources: + if source.root =3D=3D src.root: + if source.sparse !=3D src.sparse: + sparse_diff =3D True + if sparse_diff: + break # Sparse checkout only needs to be recomputed if # the dynamic sparse list is being used instead of the static sparse l= ist + # or the sparse settings between two combinations differ if sparse_enabled: sparse_settings =3D manifest.sparse_settings if sparse_settings is not None: sparse_enabled =3D False - if sparse_enabled: + if sparse_enabled or sparse_diff: print(SPARSE_RESET) reset_sparse_checkout(workspace_path, current_repos) =20 @@ -595,7 +604,7 @@ def checkout(combination_or_sha, verbose=3DFalse, overr= ide=3DFalse, log=3DNone): # Return to the initial combo, since there was an issue with cheki= ng out the selected combo checkout_repos(verbose, override, initial_repo_sources, workspace_= path, manifest) finally: - if sparse_enabled: + if sparse_enabled or sparse_diff: print(SPARSE_CHECKOUT) sparse_checkout(workspace_path, current_repos, manifest) =20 --=20 2.16.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#55704): https://edk2.groups.io/g/devel/message/55704 Mute This Topic: https://groups.io/mt/71848469/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-