From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: bob.c.feng@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Mon, 29 Jul 2019 19:10:44 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jul 2019 19:10:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,325,1559545200"; d="scan'208";a="323063894" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga004.jf.intel.com with ESMTP; 29 Jul 2019 19:10:43 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 29 Jul 2019 19:10:42 -0700 Received: from shsmsx105.ccr.corp.intel.com ([169.254.11.15]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.204]) with mapi id 14.03.0439.000; Tue, 30 Jul 2019 10:10:41 +0800 From: "Bob Feng" To: =?utf-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= , "devel@edk2.groups.io" CC: "Gao, Liming" Subject: Re: [edk2-devel] [Patch 02/11] BaseTools: Split WorkspaceAutoGen._InitWorker into multiple functions Thread-Topic: [edk2-devel] [Patch 02/11] BaseTools: Split WorkspaceAutoGen._InitWorker into multiple functions Thread-Index: AQHVRen1/WU0wxGRmkSuPHQCs6lbZKbhK4SAgAE5cPA= Date: Tue, 30 Jul 2019 02:10:41 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D160B4F4CD@SHSMSX105.ccr.corp.intel.com> References: <20190729084456.18844-1-bob.c.feng@intel.com> <20190729084456.18844-3-bob.c.feng@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgUGhpbCwNCg0KVGhhbmtzIGZvciB5b3VyIGNvbW1lbnRzLiAgSSBhZ3JlZSBpdCB3aWxsIGJl IGVhc2llciB0byByZXZpZXcgaWYgdGhpcyBwYXRjaCBpcyBzcGxpdCBpbnRvIG11bHRpcGxlIHNt YWxsZXIgb25lcy4NClNpbmNlIHRoZSBsYXRlciBwYXRjaGVzIGluIE11bHRpcGxlLXByb2Nlc3Mg YXV0b2dlbiBwYXRjaCBzZXJpZXMgYXJlIGJhc2VkIG9uIHRoaXMgcGF0Y2guIEl0IHdpbGwgYmUg YmlnZ2VyIGVmZm9ydCB0byByZWNyZWF0ZSB0aGlzIHdob2xlIHBhdGNoIHNlcmllcy4gU28gSSdk IGxpa2UgdG8gcHJlZmVyIG5vdCB0byBjaGFuZ2UuLi4NCkknbSB3aWxsaW5nIHRvIGFuc3dlciB0 aGUgcXVlc3Rpb25zIGZvciB0aGlzIHBhdGNoLg0KDQpUaGFua3MsDQpCb2INCg0KLS0tLS1Pcmln aW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IFBoaWxpcHBlIE1hdGhpZXUtRGF1ZMOpIFttYWlsdG86 cGhpbG1kQHJlZGhhdC5jb21dIA0KU2VudDogTW9uZGF5LCBKdWx5IDI5LCAyMDE5IDExOjAzIFBN DQpUbzogZGV2ZWxAZWRrMi5ncm91cHMuaW87IEZlbmcsIEJvYiBDIDxib2IuYy5mZW5nQGludGVs LmNvbT4NCkNjOiBHYW8sIExpbWluZyA8bGltaW5nLmdhb0BpbnRlbC5jb20+DQpTdWJqZWN0OiBS ZTogW2VkazItZGV2ZWxdIFtQYXRjaCAwMi8xMV0gQmFzZVRvb2xzOiBTcGxpdCBXb3Jrc3BhY2VB dXRvR2VuLl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kZkZlByb2ZpbGUuSW5mRGlj dFtrZXldOg0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgTW9kdWxlRmlsZSA9IFBhdGhDbGFz cyhOb3JtUGF0aChJbmYpLCBHbG9iYWxEYXRhLmdXb3Jrc3BhY2UsIEFyY2gpDQo+ICAgICAgICAg ICAgICAgICAgICAgICAgICBmb3IgQXJjaCBpbiBzZWxmLkFyY2hMaXN0Og0KPiAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGlmIE1vZHVsZUZpbGUgaW4gTWV0YUZpbGVfY2FjaGVbQXJjaF06 DQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrDQo+ICAgICAgICAgICAg ICAgICAgICAgICAgICBlbHNlOg0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1vZHVs ZURhdGEgPSBzZWxmLkJ1aWxkRGF0YWJhc2VbTW9kdWxlRmlsZSwgQXJjaCwgVGFyZ2V0LCBUb29s Y2hhaW5dDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgTW9kdWxlRGF0YSA9IA0KPiAr IHNlbGYuQnVpbGREYXRhYmFzZVtNb2R1bGVGaWxlLCBBcmNoLCBzZWxmLkJ1aWxkVGFyZ2V0LCAN Cj4gKyBzZWxmLlRvb2xDaGFpbl0NCj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiBu b3QgTW9kdWxlRGF0YS5Jc0JpbmFyeU1vZHVsZToNCj4gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgRWRrTG9nZ2VyLmVycm9yKCdidWlsZCcsIA0KPiBQQVJTRVJfRVJST1IsICJNb2R1 bGUgJXMgTk9UIGZvdW5kIGluIERTQyBmaWxlOyBJcyBpdCByZWFsbHkgYSBiaW5hcnkgDQo+IG1v ZHVsZT8iICUgTW9kdWxlRmlsZSkNCj4gIA0KPiAgICAgICAgICAgICAgICAgIGVsc2U6DQo+ICAg ICAgICAgICAgICAgICAgICAgIGZvciBBcmNoIGluIHNlbGYuQXJjaExpc3Q6DQo+ICAgICAgICAg ICAgICAgICAgICAgICAgICBpZiBBcmNoID09IGtleToNCj4gLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICBQbGF0Zm9ybSA9IHNlbGYuQnVpbGREYXRhYmFzZVtzZWxmLk1ldGFGaWxlLCBBcmNo LCBUYXJnZXQsIFRvb2xjaGFpbl0NCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBQbGF0 Zm9ybSA9IA0KPiArIHNlbGYuQnVpbGREYXRhYmFzZVtzZWxmLk1ldGFGaWxlLCBBcmNoLCBzZWxm LkJ1aWxkVGFyZ2V0LCANCj4gKyBzZWxmLlRvb2xDaGFpbl0NCj4gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBNZXRhRmlsZUxpc3QgPSBzZXQoKQ0KPiAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGZvciBQa2V5IGluIFBsYXRmb3JtLk1vZHVsZXM6DQo+ICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIE1ldGFGaWxlTGlzdC5hZGQoUGxhdGZvcm0uTW9kdWxlc1tQa2V5XS5N ZXRhRmlsZSkNCj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgSW5mIGluIHNlbGYu RmRmUHJvZmlsZS5JbmZEaWN0W2tleV06DQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIE1vZHVsZUZpbGUgPSBQYXRoQ2xhc3MoTm9ybVBhdGgoSW5mKSwgR2xvYmFsRGF0YS5nV29y a3NwYWNlLCBBcmNoKQ0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiBNb2R1 bGVGaWxlIGluIE1ldGFGaWxlTGlzdDoNCj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGNvbnRpbnVlDQo+IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1vZHVs ZURhdGEgPSBzZWxmLkJ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trZXldLlBl bmRpbmcgPSBGYWxzZQ0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2U6DQo+ICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNQY2QgdXNlZCBpbiBMaWJyYXJ5LCBQY2Qg VHlwZSBmcm9tIHJlZmVyZW5jZSBtb2R1bGUgaWYgUGNkIFR5cGUgaXMgUGVuZGluZw0KPiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiBCdWlsZERhdGEuUGNkc1trZXldLlBlbmRp bmc6DQo+IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNR2VuID0gTW9kdWxl QXV0b0dlbihzZWxmLCBCdWlsZERhdGEuTWV0YUZpbGUsIFRhcmdldCwgVG9vbGNoYWluLCBBcmNo LCBzZWxmLk1ldGFGaWxlKQ0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg TUdlbiA9IE1vZHVsZUF1dG9HZW4oc2VsZiwgDQo+ICsgQnVpbGREYXRhLk1ldGFGaWxlLCBzZWxm LkJ1aWxkVGFyZ2V0LCBzZWxmLlRvb2xDaGFpbiwgQXJjaCwgDQo+ICsgc2VsZi5NZXRhRmlsZSkN Cj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIE1HZW4gYW5kIE1HZW4u SXNMaWJyYXJ5Og0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlm IE1HZW4gaW4gUEdlbi5MaWJyYXJ5QXV0b0dlbkxpc3Q6DQo+ICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIFJlZmVyZW5jZU1vZHVsZXMgPSBNR2VuLlJlZmVyZW5j ZU1vZHVsZXMNCj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Zm9yIFJlZmVyZW5jZU1vZHVsZSBpbiBSZWZlcmVuY2VNb2R1bGVzOg0KPiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgUmVmZXJlbmNlTW9kdWxlLk1l dGFGaWxlIGluIFBsYXRmb3JtLk1vZHVsZXM6DQo+IEBAIC00OTcsMTAgKzUzMCwyNCBAQCBjbGFz cyBXb3Jrc3BhY2VBdXRvR2VuKEF1dG9HZW4pOg0KPiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiBQY2RJblJlZmVyZW5jZU1vZHVsZS5U eXBlOg0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgQnVpbGREYXRhLlBjZHNba2V5XS5UeXBlID0gUGNkSW5SZWZlcmVuY2VNb2R1 bGUuVHlwZQ0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgQnVpbGREYXRhLlBjZHNba2V5XS5QZW5kaW5nID0gRmFsc2UNCj4gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGJyZWFrDQo+ICANCj4gKyAgICBkZWYgUHJvY2Vzc01peGVkUGNkKHNlbGYpOg0KPiArICAgICAg ICBmb3IgQXJjaCBpbiBzZWxmLkFyY2hMaXN0Og0KPiArICAgICAgICAgICAgU291cmNlUGNkRGlj dCA9IHtUQUJfUENEU19EWU5BTUlDX0VYOnNldCgpLCBUQUJfUENEU19QQVRDSEFCTEVfSU5fTU9E VUxFOnNldCgpLFRBQl9QQ0RTX0RZTkFNSUM6c2V0KCksVEFCX1BDRFNfRklYRURfQVRfQlVJTEQ6 c2V0KCl9DQo+ICsgICAgICAgICAgICBCaW5hcnlQY2REaWN0ID0ge1RBQl9QQ0RTX0RZTkFNSUNf RVg6c2V0KCksIFRBQl9QQ0RTX1BBVENIQUJMRV9JTl9NT0RVTEU6c2V0KCl9D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u bHkgdXNlIG9uZSB0eXBlIGZvciBhbGwgc291cmNlIG1vZHVsZXMNCj4gICAgICAgICAgICAgICMN Cj4gICAgICAgICAgICAgIGZvciBpIGluIFNvdXJjZVBjZERpY3RfS2V5czoNCj4gICAgICAgICAg ICAgICAgICBmb3IgaiBpbiBTb3VyY2VQY2REaWN0X0tleXM6DQo+IEBAIC01ODgsMjcgKzYzNCwz OCBAQCBjbGFzcyBXb3Jrc3BhY2VBdXRvR2VuKEF1dG9HZW4pOg0KPiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgZGVsIEJ1aWxkRGF0YS5QY2RzW2tleV0NCj4gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1aWxkRGF0YS5QY2RzW25ld2tleV0gPSBWYWx1 ZQ0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsNCj4gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBicmVhaw0KPiAgDQo+IC0gICAgICAgICAgICAjIGhhbmRs ZSB0aGUgbWl4ZWQgcGNkIGluIEZERiBmaWxlDQo+IC0gICAgICAgICAgICBmb3Iga2V5IGluIFBj ZFNldDoNCj4gLSAgICAgICAgICAgICAgICBpZiBrZXkgaW4gR2xvYmFsRGF0YS5NaXhlZFBjZDoN Cj4gLSAgICAgICAgICAgICAgICAgICAgVmFsdWUgPSBQY2RTZXRba2V5XQ0KPiAtICAgICAgICAg ICAgICAgICAgICBkZWwgUGNkU2V0W2tleV0NCj4gLSAgICAgICAgICAgICAgICAgICAgZm9yIGl0 ZW0gaW4gR2xvYmFsRGF0YS5NaXhlZFBjZFtrZXldOg0KPiAtICAgICAgICAgICAgICAgICAgICAg ICAgUGNkU2V0W2l0ZW1dID0gVmFsdWUNCj4gKyAgICAjQ29sbGVjdCBwYWNrYWdlIHNldCBpbmZv cm1hdGlvbiBmcm9tIElORiBvZiBGREYNCj4gKyAgICBAY2FjaGVkX3Byb3BlcnR5DQo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AgICAgUGNkVG9rZW5OdW1iZXIgPSAnUGNkVG9rZW5OdW1iZXI6ICcNCj4gLSAgICAgICAg aWYgUGEuUGNkVG9rZW5OdW1iZXI6DQo+IC0gICAgICAgICAgICBpZiBQYS5EeW5hbWljUGNkTGlz dDoNCj4gLSAgICAgICAgICAgICAgICBmb3IgUGNkIGluIFBhLkR5bmFtaWNQY2RMaXN0Og0KPiAt ICAgICAgICAgICAgICAgICAgICBQY2RUb2tlbk51bWJlciArPSBUQUJfTElORV9CUkVBSw0KPiAt ICAgICAgICAgICAgICAgICAgICBQY2RUb2tlbk51bWJlciArPSBzdHIoKFBjZC5Ub2tlbkNOYW1l LCBQY2QuVG9rZW5TcGFjZUd1aWRDTmFtZSkpDQo+IC0gICAgICAgICAgICAgICAgICAgIFBjZFRv a2VuTnVtYmVyICs9ICcgOiAnDQo+IC0gICAgICAgICAgICAgICAgICAgIFBjZFRva2VuTnVtYmVy ICs9IHN0cihQYS5QY2RUb2tlbk51bWJlcltQY2QuVG9rZW5DTmFtZSwgUGNkLlRva2VuU3BhY2VH dWlkQ05hbWVdKQ0KPiArICAgICAgICBmb3IgQXJjaCBpbiBzZWxmLkFyY2hMaXN0Og0KPiArICAg ICAgICAgICAgUGEgPSBQbGF0Zm9ybUF1dG9HZW4oc2VsZiwgc2VsZi5NZXRhRmlsZSwgc2VsZi5C dWlsZFRhcmdldCwgc2VsZi5Ub29sQ2hhaW4sIEFyY2gpDQo+ICsgICAgICAgICAgICBpZiBQYS5Q Y2RUb2tlbk51bWJlcjoNCj4gKyAgICAgICAgICAgICAgICBpZiBQYS5EeW5hbWljUGNkTGlzdDoN Cj4gKyAgICAgICAgICAgICAgICAgICAgZm9yIFBjZCBpbiBQYS5EeW5hbWljUGNkTGlzdDoNCj4g KyAgICAgICAgICAgICAgICAgICAgICAgIFBjZFRva2VuTnVtYmVyICs9IFRBQl9MSU5FX0JSRUFL DQo+ICsgICAgICAgICAgICAgICAgICAgICAgICBQY2RUb2tlbk51bWJl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