From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=urYDt+cV; spf=pass (domain: linaro.org, ip: 209.85.128.65, mailfrom: leif.lindholm@linaro.org) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by groups.io with SMTP; Tue, 23 Jul 2019 02:44:39 -0700 Received: by mail-wm1-f65.google.com with SMTP id l2so37867312wmg.0 for ; Tue, 23 Jul 2019 02:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BoiZECu3XPsVBg7Xp4Mp1fMKhLJ0BVwSSfE1W1Ga87g=; b=urYDt+cVFofg/U7WMNyJ+uaKA1K8uuPma76QX7APjwl+CzkgzwH+CzpDuIcPctxKAj VKGfyIvY/91iTtysbfCvRDpnZ1qnihR1KijSWen61pqi/Ey1O4sJkuPz4NiUuJd4sEhV XuD+14ydLn1umRaFNc2u26PyUIRR5gqC9dOrXKlUdZ49WGzaE+pSHeDkuUzstwk5NX4I V8GNLeec/JEYmOpC06/cG56C4yB45RQzkoqqaaqsGfrdiT/wUlOVB0S3IoemKW0JeS7Z 9WUpFzuEnrJ2i4fXEg5h17Yta5slT+L1HjP+mu649MuoUAusVn7OlIRopYZXk45mAi8R uqTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=BoiZECu3XPsVBg7Xp4Mp1fMKhLJ0BVwSSfE1W1Ga87g=; b=qyIqzUX3lRw3K66hrgRWxsYxXnVT6sxap4O+4r3BgOITQhz2PTb781NEdDxuaDQKuH ImZICUDIhkyxDkf3xQJem7n2VEfWzwR0wS0MCG+9Lc6TPxuGU+3KgmiQe3x1CpKgtjuZ mIOP5g0koiUdO7G9TMyIm+p1HnFyAH0O3TeOYVKMsuQkOWxPiMHlfi4spEFCZFo4jmxj ROg+8tX0d3fmtn/+/3WCnWtHxBmBxEP0EnKdLUGjSSqGH5WdYjz5uD74bKNmvw6VQ3NH mwsPFhZoRa51vsz0HqrsYDSwDnKeNKv4IlDaie+iIDkuSOokgRmnNR9FrsCKRtDfQMn+ Iw6w== X-Gm-Message-State: APjAAAXMnsqrXEpSXh+GbzFxhfVys+ZtL66sYGreRrNTaT1p1U1gcw+6 Q66XgJJwDNTib1OCPXQ1JVtQJw== X-Google-Smtp-Source: APXvYqxpSuZermC6ExnI2N8hLoJwhzdOK+Cd2i1Mv5NmUFwhiZdO0UTOvw1o2iWm+BLnkoO/HF/6Vw== X-Received: by 2002:a1c:a1c1:: with SMTP id k184mr70485313wme.81.1563875077952; Tue, 23 Jul 2019 02:44:37 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id 91sm88411947wrp.3.2019.07.23.02.44.37 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 02:44:37 -0700 (PDT) Date: Tue, 23 Jul 2019 10:44:35 +0100 From: "Leif Lindholm" 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 executable scanning Message-ID: <20190723094435.GE11541@bivouac.eciton.net> 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> MIME-Version: 1.0 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4AC9E5@SHSMSX104.ccr.corp.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 base > > > on PATH to find the python interpreter. > > > Current logic is to find the high version in the available python interpreter. > > > 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 interpreter? > > > > 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 version > python interpreter. The same source may have the different build result on those dockers. 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. 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). 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. > > *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 remove it? Yes, will do. / Leif