From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web12.4236.1583882832267358072 for ; Tue, 10 Mar 2020 16:27:12 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: nathaniel.l.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2020 16:27:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,538,1574150400"; d="scan'208";a="443358734" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by fmsmga006.fm.intel.com with ESMTP; 10 Mar 2020 16:27:11 -0700 Received: from orsmsx122.amr.corp.intel.com (10.22.225.227) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 10 Mar 2020 16:27:11 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.140]) by ORSMSX122.amr.corp.intel.com ([169.254.11.66]) with mapi id 14.03.0439.000; Tue, 10 Mar 2020 16:27:11 -0700 From: "Nate DeSimone" To: "Desimone, Ashley E" , "devel@edk2.groups.io" CC: "Pandya, Puja" , "Bjorge, Erik C" Subject: Re: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Correct when a sparse reset is triggered during checkout Thread-Topic: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Correct when a sparse reset is triggered during checkout Thread-Index: AQHV9nPd/xiMJjo5XkerT0W/tcascqhCeczg Date: Tue, 10 Mar 2020 23:27:10 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5DD1089@ORSMSX114.amr.corp.intel.com> References: <20200310003549.6552-1-ashley.e.desimone@intel.com> In-Reply-To: <20200310003549.6552-1-ashley.e.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTI2OGZhNjAtMzg4Zi00MzBiLTkwNGEtOGQxM2FlNzUxODIyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVEx4S1Q1WVFPVG9Ra1ZkSEZ1WEtUNVBcL1ppUTYxMW5wdTArVldnXC9UMEFyc0JDWVBXSlYwS1NKdUZEMlBad0doIn0= x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.138] MIME-Version: 1.0 Return-Path: nathaniel.l.desimone@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Please update copyright year on common_repo_functions.py With that change... Reviewed-by: Nate DeSimone -----Original Message----- From: Desimone, Ashley E =20 Sent: Monday, March 9, 2020 5:36 PM To: devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Pandya, Puja ; Bjorge, Erik C Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Correct when a sparse rese= t is triggered during checkout Correct an error case in the checkout function defined in: common/common_repo_functions.py where the need to perform a sparse reset wa= s 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 -- 2.16.2.windows.1