From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: liming.gao@intel.com) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by groups.io with SMTP; Wed, 24 Jul 2019 08:29:55 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2019 08:29:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,303,1559545200"; d="scan'208";a="193494349" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 24 Jul 2019 08:29:18 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 24 Jul 2019 08:29:18 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 24 Jul 2019 08:29:17 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 24 Jul 2019 08:29:17 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.22]) with mapi id 14.03.0439.000; Wed, 24 Jul 2019 23:29:16 +0800 From: "Liming Gao" To: Leif Lindholm CC: "devel@edk2.groups.io" , Laszlo Ersek , Rebecca Cran , "Feng, Bob C" , "Kinney, Michael D" , "afish@apple.com" Subject: Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning Thread-Topic: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning Thread-Index: AQHVPBfvoF4E+Ey0NE+TBGgFSaKUcqbNRqyAgADYoWCAAMK/gIABrs0Q//+U3gCAAcBxIIAFkgSAgAJ15NA= Date: Wed, 24 Jul 2019 15:29:15 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4B214D@SHSMSX104.ccr.corp.intel.com> References: <20190716190754.25412-1-leif.lindholm@linaro.org> <20579d07-778d-ef9f-9226-25e9629fa2d5@redhat.com> <20190716220449.r7kfozr7yaasi64k@bivouac.eciton.net> <4A89E2EF3DFEDB4C8BFDE51014F606A14E4A974D@SHSMSX104.ccr.corp.intel.com> <20190717223711.GE2712@bivouac.eciton.net> <4A89E2EF3DFEDB4C8BFDE51014F606A14E4AC021@SHSMSX104.ccr.corp.intel.com> <20190718175538.GK2712@bivouac.eciton.net> <4A89E2EF3DFEDB4C8BFDE51014F606A14E4AC9E5@SHSMSX104.ccr.corp.intel.com> <20190723094435.GE11541@bivouac.eciton.net> In-Reply-To: <20190723094435.GE11541@bivouac.eciton.net> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDRkZGUyYjQtNThlOC00OTQ5LWIwYjctNzJhN2MwOWU2NWVlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMWx6V2lncm1qR0NIVmU4bmVVRlV0TWlLelBSZE9ReEpuMVVObjRVc051citodGhLXC9hbHppS2dQVzdOa1lvSVEifQ== dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Leif: > -----Original Message----- > From: Leif Lindholm [mailto:leif.lindholm@linaro.org] > Sent: Tuesday, July 23, 2019 5:45 PM > To: Gao, Liming > Cc: devel@edk2.groups.io; Laszlo Ersek ; Rebecca Cran = ; Feng, Bob C ; > Kinney, Michael D ; afish@apple.com > Subject: Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executab= le scanning >=20 > On Fri, Jul 19, 2019 at 01:07:54PM +0000, Gao, Liming wrote: > > > Yes. > > > But perhaps the user isn't the admin, and the admin installs a new > > > version of python without updating the default links, in order to let > > > a different user test the new version. Thinking this will not affect > > > users, because python, python2 and python3 all behave exactly like > > > before. > > > > > > > Current edksetup.sh can easily apply the new version python. > > > > Now, the difference is the default policy to choose python version. > > > > Your suggestion is to use default version python interpreter or bas= e > > > > on PATH to find the python interpreter. > > > > Current logic is to find the high version in the available python i= nterpreter. > > > > It is added @d8238aaf862a55eec77040844c71a02c71294e86 commit. > > > > > > Yes, and ideally I would have noticed that and had this conversation > > > back then. But I didn't. Sorry. > > > > > > > Do you meet with the real problem with the high version python inte= rpreter? > > > > > > Not yet. > > > But I can easily see this causing issues with the various docker > > > images we have set up for various (not just TianoCore) CI jobs. > > > > What issue here? You mean the variable docker may have the different ve= rsion > > python interpreter. The same source may have the different build result= on those dockers. >=20 > Sorry, I'm going to stop giving specifics here. I was trying to use it > as an example, but it has clearly turned into just a distraction, > bringing us further from the actual problem. >=20 > The fundamental issue is this: > * As a distribution mainteiner (or docker image owner), I will pick > whatever default version of system tools are. I may also decide to > install multiple versions, but keeping the default at a lower than > latest version. > * As a user, or CI implementer, I may choose to override that (by for > example installing my own version of python and updating my PATH to > look there first). >=20 > Scanning through the path looking for "highest version" breaks both of > these. Just like scanning through the path looking for the highest > C compiler version would. >=20 I agree C compiler version is a good case. Edk2 tool chain GCC5 uses the de= fault gcc compiler,=20 doesn't find the highest version GCC compiler. They can align to the same r= ule. If we=20 change the policy to find the default python3, how we let user know python3= 7 have the=20 better performance improvement?=20 > > > *But* the latest version of my script does not behave in this way, so > > > that still needs to change. > > > > > > > > If PYTHON_COMMAND is set, it should always be respected. If it's = not > > > > > set, python3 is picked in preference anyway. > > > > > > > > So, PYTHON_COMMAND is higher priority than PYTHON3_ENABLE. > > > > That means PYTHON3_ENABLE value will be ignored. Right? > > > > > > Exactly. So I think it it not needed. > > > > OK. If you think that PYTHON3_ENABLE is not used, can you send RFC to r= emove it? >=20 > Yes, will do. Thanks=20 Liming >=20 > / > Leif