From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 918F72118EF59 for ; Fri, 9 Nov 2018 07:26:13 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Nov 2018 07:24:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,483,1534834800"; d="scan'208";a="248425770" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga004.jf.intel.com with ESMTP; 09 Nov 2018 07:24:50 -0800 Received: from fmsmsx101.amr.corp.intel.com ([169.254.1.202]) by FMSMSX105.amr.corp.intel.com ([169.254.4.33]) with mapi id 14.03.0415.000; Fri, 9 Nov 2018 07:24:50 -0800 From: "Carsey, Jaben" To: "Feng, Bob C" , "edk2-devel@lists.01.org" CC: "Gao, Liming" Thread-Topic: [Patch V2] BaseTools: Replace the sqlite database with list Thread-Index: AQHUeAgZMgTQ/J4KCEeUF6Bod8pAG6VHjuBQ Date: Fri, 9 Nov 2018 15:24:49 +0000 Message-ID: References: <20181109084157.37996-1-bob.c.feng@intel.com> In-Reply-To: <20181109084157.37996-1-bob.c.feng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzllMGE2OTMtYTNjMS00NTE4LWI4MmUtN2ZhMzIzNDUzYTcyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRTdYNk42OUJoWUJrXC9RQnBUQ2RQWmZ4RlBlOGpXSjV2WVdFc21DSGQ2YTVnelJEa2xOako5WkFheUZhaEpHb28ifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.1.200.108] MIME-Version: 1.0 Subject: Re: [Patch V2] BaseTools: Replace the sqlite database with list X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2018 15:26:13 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 VGhpcyBpcyBtdWNoIGVhc2llciB0byByZXZpZXchIFRoYW5rcyENCg0KSSBhbSBnb29kIHdpdGgg dGhlIGNvZGUgY2hhbmdlLg0KDQpJIHdvbmRlcjogSWYgd2UgZG8gbm90IGhhdmUgdGhlIERCIGRv ZXMgaXQgdGFrZSBsb25nZXIgaWYgSSBkbyBidWlsZCwgY2xlYW4sIGJ1aWxkIHRoYW4gaXQgZGlk IGJlZm9yZT8NCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBGZW5nLCBC b2IgQw0KPiBTZW50OiBGcmlkYXksIE5vdmVtYmVyIDA5LCAyMDE4IDEyOjQyIEFNDQo+IFRvOiBl ZGsyLWRldmVsQGxpc3RzLjAxLm9yZw0KPiBDYzogR2FvLCBMaW1pbmcgPGxpbWluZy5nYW9AaW50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CBWYWx1ZTIsIFZhbHVlMywNCj4gU2NvcGUxPVRBQl9BUkNIX0NPTU1PTiwgU2Nv cGUyPVRBQl9DT01NT04sDQo+ICAgICAgICAgICAgICAgICBCZWxvbmdzVG9JdGVtPS0xLCBTdGFy dExpbmU9LTEsIFN0YXJ0Q29sdW1uPS0xLCBFbmRMaW5lPS0xLA0KPiBFbmRDb2x1bW49LTEsIEVu YWJsZWQ9MCk6DQo+IC0gICAgICAgIChWYWx1ZTEsIFZhbHVlMiwgVmFsdWUzLCBTY29wZTEsIFNj b3BlMikgPSBDb252ZXJ0VG9TcWxTdHJpbmcoKFZhbHVlMSwNCj4gVmFsdWUyLCBWYWx1ZTMsIFNj b3BlMSwgU2NvcGUyKSkNCj4gLSAgICAgICAgcmV0dXJuIFRhYmxlLkluc2VydCgNCj4gLSAgICAg ICAgICAgICAgICAgICAgICAgIHNlbGYsDQo+IC0gICAgICAgICAgICAgICAgICAgICAgICBNb2Rl bCwNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgIFZhbHVlMSwNCj4gLSAgICAgICAgICAgICAg ICAgICAgICAgIFZhbHVlMiwNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgIFZhbHVlMywNCj4g LSAgICAgICAgICAgICAgICAgICAgICAgIFNjb3BlMSwNCj4gLSAgICAgICAgICAgICAgICAgICAg ICAgIFNjb3BlMiwNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgIEJlbG9uZ3NUb0l0ZW0sDQo+ IC0gICAgICAgICAgICAgICAgICAgICAgICBTdGFydExpbmUsDQo+IC0gICAgICAgICAgICAgICAg ICAgICAgICBTdGFydENvbHVtbiwNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgIEVuZExpbmUs DQo+IC0gICAgICAgICAgICAgICAgICAgICAgICBFbmRDb2x1bW4sDQo+IC0gICAgICAgICAgICAg ICAgICAgICAgICBFbmFibGVkDQo+IC0gICAgICAgICAgICAgICAgICAgICAgICApDQo+ICsNCj4g KyAgICAgICAgKFZhbHVlMSwgVmFsdWUyLCBWYWx1ZTMsIFNjb3BlMSwgU2NvcGUyKSA9IChWYWx1 ZTEuc3RyaXAoKSwNCj4gVmFsdWUyLnN0cmlwKCksIFZhbHVlMy5zdHJpcCgpLCBTY29wZTEuc3Ry aXAoKSwgU2NvcGUyLnN0cmlwKCkpDQo+ICsgICAgICAgIHNlbGYuSUQgPSBzZWxmLklEICsgc2Vs Zi5fSURfU1RFUF8NCj4gKyAgICAgICAgaWYgc2VsZi5JRCA+PSAoTU9ERUxfRklMRV9JTkYgKyBz ZWxmLl9JRF9NQVhfKToNCj4gKyAgICAgICAgICAgIHNlbGYuSUQgPSBNT0RFTF9GSUxFX0lORiAr IHNlbGYuX0lEX1NURVBfDQo+ICsNCj4gKyAgICAgICAgcm93ID0gWyBzZWxmLklELA0KPiArICAg ICAgICAgICAgICAgIE1vZGVsLA0KPiArICAgICAgICAgICAgICAgIFZhbHVlMSwNCj4gKyAgICAg ICAgICAgICAgICBWYWx1ZTIsDQo+ICsgICAgICAgICAgICAgICAgVmFsdWUzLA0KPiArICAgICAg ICAgICAgICAgIFNjb3BlMSwNCj4gKyAgICAgICAgICAgICAgICBTY29wZTIsDQo+ICsgICAgICAg ICAgICAgICAgQmVsb25nc1RvSXRlbSwNCj4gKyAgICAgICAgICAgICAgICBTdGFydExpbmUsDQo+ ICsgICAgICAgICAgICAgICAgU3RhcnRDb2x1bW4sDQo+ICsgICAgICAgICAgICAgICAgRW5kTGlu ZSwNCj4gKyAgICAgICAgICAgICAgICBFbmRDb2x1bW4sDQo+ICsgICAgICAgICAgICAgICAgRW5h YmxlZA0KPiArICAgICAgICAgICAgXQ0KPiArICAgICAgICBzZWxmLkN1cnJlbnRDb250ZW50LmFw cGVuZChyb3cpDQo+ICsgICAgICAgIHJldHVybiBzZWxmLklEDQo+ICsNCj4gDQo+ICAgICAgIyMg UXVlcnkgdGFibGUNCj4gICAgICAjDQo+ICAgICAgIyBAcGFyYW0gICAgTW9kZWw6ICAgICAgV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ICAg ICAgICAgICAgU2NvcGUxLA0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgU2NvcGUyLA0KPiAt ICAgICAgICAgICAgICAgICAgICAgICAgQmVsb25nc1RvSXRlbSwNCj4gLSAgICAgICAgICAgICAg ICAgICAgICAgIFN0YXJ0TGluZSwNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgIFN0YXJ0Q29s dW1uLA0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgRW5kTGluZSwNCj4gLSAgICAgICAgICAg ICAgICAgICAgICAgIEVuZENvbHVtbiwNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgIEVuYWJs ZWQNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgICkNCj4gKyAgICAgICAgKFZhbHVlMSwgVmFs dWUyLCBWYWx1ZTMsIFNjb3BlMSwgU2NvcGUyKSA9IChWYWx1ZTEuc3RyaXAoKSwNCj4gVmFsdWUy LnN0cmlwKCksIFZhbHVlMy5zdHJpcCgpLCBTY29wZTEuc3RyaXAoKSwgU2NvcGUyLnN0cmlwKCkp DQo+ICsgICAgICAgIHNlbGYuSUQgPSBzZWxmLklEICsgc2VsZi5fSURfU1RFUF8NCj4gKyAgICAg ICAgaWYgc2VsZi5JRCA+PSAoTU9ERUxfRklMRV9JTkYgKyBzZWxmLl9JRF9NQVhfKToNCj4gKyAg ICAgICAgICAgIHNlbGYuSUQgPSBNT0RFTF9GSUxFX0lORiArIHNlbGYuX0lEX1NURVBfDQo+ICsN Cj4gKyAgICAgICAgcm93ID0gWyBzZWxmLklELA0KPiArICAgICAgICAgICAgICAgIE1vZGVsLA0K PiArICAgICAgICAgICAgICAgIFZhbHVlMSwNCj4gKyAgICAgICAgICAgICAgICBWYWx1ZTIsDQo+ ICsgICAgICAgICAgICAgICAgVmFsdWUzLA0KPiArICAgICAgICAgICAgICAgIFNjb3BlMSwNCj4g KyAgICAgICAgICAgICAgICBTY29wZTIsDQo+ICsgICAgICAgICAgICAgICAgQmVsb25nc1RvSXR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ykgPQ0KPiBDb252ZXJ0VG9TcWxTdHJpbmcoKFZh bHVlMSwgVmFsdWUyLCBWYWx1ZTMsIFNjb3BlMSwgU2NvcGUyLCBTY29wZTMpKQ0KPiAtICAgICAg ICByZXR1cm4gVGFibGUuSW5zZXJ0KA0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgc2VsZiwN Cj4gLSAgICAgICAgICAgICAgICAgICAgICAgIE1vZGVsLA0KPiAtICAgICAgICAgICAgICAgICAg ICAgICAgVmFsdWUxLA0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgVmFsdWUyLA0KPiAtICAg ICAgICAgICAgICAgICAgICAgICAgVmFsdWUzLA0KPiAtICAgICAgICAgICAgICAgICAgICAgICAg U2NvcGUxLA0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgU2NvcGUyLA0KPiAtICAgICAgICAg ICAgICAgICAgICAgICAgU2NvcGUzLA0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgQmVsb25n c1RvSXRlbSwNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgIEZyb21JdGVtLA0KPiAtICAgICAg ICAgICAgICAgICAgICAgICAgU3RhcnRMaW5lLA0KPiAtICAgICAgICAgICAgICAgICAgICAgICAg U3RhcnRDb2x1bW4sDQo+IC0gICAgICAgICAgICAgICAgICAgICAgICBFbmRMaW5lLA0KPiAtICAg ICAgICAgICAgICAgICAgICAgICAgRW5kQ29sdW1uLA0KPiAtICAgICAgICAgICAgICAgICAgICAg ICAgRW5hYmxlZA0KPiAtICAgICAgICAgICAgICAgICAgICAgICAgKQ0KPiArICAgICAgICAoVmFs dWUxLCBWYWx1ZTIsIFZhbHVlMywgU2NvcGUxLCBTY29wZTIsIFNjb3BlMykgPSAoVmFsdWUxLnN0 cmlwKCksDQo+IFZhbHVlMi5zdHJpcCgpLCBWYWx1ZTMuc3RyaXAoKSwgU2NvcGUxLnN0cmlwKCks IFNjb3BlMi5zdHJpcCgpLCBTY29wZTMuc3RyaXAoKSkNCj4gKyAgICAgICAgc2VsZi5JRCA9IHNl bGYuSUQgKyBzZWxmLl9JRF9TVEVQXw0KPiArICAgICAgICBpZiBzZWxmLklEID49IChNT0RFTF9G SUxFX0lORiArIHNlbGYuX0lEX01BWF8pOg0KPiArICAgICAgICAgICAgc2VsZi5JRCA9IE1PREVM X0ZJTEVfSU5GICsgc2VsZi5fSURfU1RFUF8NCj4gKw0KPiArICAgICAgICByb3cgPSBbIHNlbGYu SUQsDQo+ICsgICAgICAgICAgICAgICAgTW9kZWwsDQo+ICsgICAgICAgICAgICAgICAgVmFsdWUx LA0KPiArICAgICAgICAgICAgICAgIFZhbHVlMiwNCj4gKyAgICAgICAgICAgICAgICBWYWx1ZTMs DQo+ICsgICAgICAgICAgICAgICAgU2NvcGUxLA0KPiArICAgICAgICAgICAgICAgIFNjb3BlMiwN Cj4gKyAgICAgICAgICAgICAgICBTY29wZTMsDQo+ICsgICAgICAgICAgICAgICAgQmVsb25nc1Rv SXRlbSwNCj4gKyAgICAgICAgICAgICAgICBGcm9tSXRlbSwNCj4gKyAgICAgICAgICAgICAgICBT dGFydExpbmUsDQo+ICsgICAgICAgICAgICAgICAgU3RhcnRDb2x1bW4sDQo+ICsgICAgICAgICAg ICAgICAgRW5kTGluZSwNCj4gKyAgICAgICAgICAgICAgICBFbmRDb2x1bW4sDQo+ICsgICAgICAg ICAgICAgICAgRW5hYmxlZA0KPiArICAgICAgICAgICAgXQ0KPiArICAgICAgICBzZWxmLkN1cnJl bnRDb250ZW50LmFwcGVuZChyb3cpDQo+ICsgICAgICAgIHJldHVybiBzZWxmLklEDQo+ICsNCj4g DQo+ICAgICAgIyMgUXVlcnkgdGFibGUNCj4gICAgICAjDQo+ICAgICAgIyBAcGFyYW0gTW9kZWw6 ICAgICAgICAgIFRoZSBNb2RlbCBvZiBSZWNvcmQNCj4gICAgICAjIEBwYXJhbSBTY29wZTE6ICAg ICAgICAgQXJjaCBvZiBhIERzYyBpdGVtDQo+IEBAIC0zMzcsMzQgKzM3MC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plY3QpOg0KPiAgICAgICAgICAgICAgIyBnZXQgdGhlIHBh cnNlciByZWFkeSBmb3IgdGhpcyBmaWxlDQo+ICAgICAgICAgICAgICBNZXRhRmlsZSA9IHNlbGYu X0ZJTEVfUEFSU0VSX1tGaWxlVHlwZV0oDQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIEZpbGVQYXRoLA0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGaWxlVHlw ZSwNCj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQXJjaCwNCj4gLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgTWV0YUZpbGVTdG9yYWdlKHNlbGYuV29ya3NwYWNlRGIu Q3VyLCBGaWxlUGF0aCwgRmlsZVR5cGUpDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIE1ldGFGaWxlU3RvcmFnZShzZWxmLldvcmtzcGFjZURiLCBGaWxlUGF0aCwgRmlsZVR5cGUp DQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkNCj4gICAgICAgICAgICAgICMg YWx3YXN5IGRvIHBvc3QtcHJvY2VzcywgaW4gY2FzZSBvZiBtYWNyb3MgY2hhbmdlDQo+ICAgICAg ICAgICAgICBNZXRhRmlsZS5Eb1Bvc3RQcm9jZXNzKCkNCj4gICAgICAgICAgICAgICMgb2JqZWN0 IHRoZSBidWlsZCBpcyBiYXNlZCBvbg0KPiAgICAgICAgICAgICAgQnVpbGRPYmplY3QgPSBzZWxm Ll9HRU5FUkFUT1JfW0ZpbGVUeXBlXSgNCj4gQEAgLTE0NywxMzcgKzE0NiwyNyBAQCBjbGFzcyBX b3Jrc3BhY2VEYXRhYmFzZShvYmplY3QpOg0KPiAgICAgICMNCj4gICAgICAjIEBwYXJhbSBEYlBh dGggICAgICAgICAgICAgUGF0aCBvZiBkYXRhYmFzZSBmaWxlDQo+ICAgICAgIyBAcGFyYW0gR2xv YmFsTWFjcm9zIC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siLnN2biIsICJfc3ZuIiwgImN2cyJdOg0KPiAtICAgICAgICAg ICAgICAgICAgICAgICAgZGlycy5yZW1vdmUoZGlyKQ0KPiArICAgIGRlZiBTZXRGaWxlVGltZVN0 YW1wKHNlbGYsRmlsZUlkLFRpbWVTdGFtcCk6DQo+ICsgICAgICAgIHNlbGYuVGJsRmlsZVtGaWxl SWRdWzZdID0gVGltZVN0YW1wDQo+IA0KPiAtICAgICAgICAgICAgICAgIGZvciBmaWxlIGluIGZp bGVzOg0KPiAtICAgICAgICAgICAgICAgICAgICBleHQgPSBvcy5wYXRoLnNwbGl0ZXh0KGZpbGUp WzFdDQo+IC0gICAgICAgICAgICAgICAgICAgIGlmIGV4dC5sb3dlcigpID09ICIucHkiOiAgICAg ICAgICAgICMgb25seSBjaGVjayAucHkgZmlsZXMNCj4gLSAgICAgICAgICAgICAgICAgICAgICAg IGZkID0gb3Muc3RhdChvcy5wYXRoLmpvaW4ocm9vdCwgZmlsZSkpDQo+IC0gICAgICAgICAgICAg ICAgICAgICAgICBpZiB0aW1lT2ZUb29sTW9kaWZpZWQgPCBmZC5zdF9tdGltZToNCj4gLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICB0aW1lT2ZUb29sTW9kaWZpZWQgPSBmZC5zdF9tdGltZQ0K PiAtICAgICAgICBpZiB0aW1lT2ZUb29sTW9kaWZpZWQgPiBvcy5zdGF0KERiUGF0aCkuc3RfbXRp bWU6DQo+IC0gICAgICAgICAgICBFZGtMb2dnZXIudmVyYm9zZSgiXG5Xb3Jrc3BhY2UgZGF0YWJh c2UgaXMgb3V0IG9mIGRhdGEhIikNCj4gLSAgICAgICAgICAgIHJldHVybiBUcnVlDQo+ICsgICAg ZGVmIEdldEZpbGVUaW1lU3RhbXAoc2VsZixGaWxlSWQpOg0KPiArICAgICAgICByZXR1cm4gc2Vs Zi5UYmxGaWxlW0ZpbGVJZF1bNl0NCj4gDQo+IC0gICAgICAgIHJldHVybiBGYWxzZQ0KPiAtDQo+ I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