From 0b4c0a0fe8ecc81e9b0e05ac3a37732ba8aed80c Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 26 Aug 2022 19:35:47 +0800 Subject: python: supress "failed to check new pip version" or "a new pip version is available" warnings --- chapter08/python.xml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/chapter08/python.xml b/chapter08/python.xml index da1f75cdc..0f50bf6ef 100644 --- a/chapter08/python.xml +++ b/chapter08/python.xml @@ -102,12 +102,24 @@ root user. The main reason of this recommendation is for avoiding a conflict with the system package manager (dpkg for example), but LFS does not - have a system-wide package manager so this is not a problem. If desired, - suppress this warning by running the following commands: + have a system-wide package manager so this is not a problem. And, + pip3 will attempt to check for a new version of + itself whenever it's run. As domain name resolving is not configured + yet in LFS chroot environment, it will fail to check for a new version + and produce a warning. Once we boot the LFS system and set up network + connection, it will then produce a warning telling the user to update it + from a pre-built wheel on PyPI if any new version is available. But LFS + consider pip3 a part of Python 3 so it should not be + updated separately, and an update from a pre-built wheel will deviate + from our purpose to build a Linux system from source code. So the + warning for a new pip3 version should be ignored as + well. If desired, suppress these warnings by running the following + commands: cat > /etc/pip.conf << EOF [global] root-user-action = ignore +disable-pip-version-check = true EOF