Received: by 2002:ac0:c50a:0:0:0:0:0 with SMTP id y10csp1050347imi; Fri, 1 Jul 2022 01:51:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uF6m6cR1mJNxDThZKlwFN6RXbNaZDPuX19lNGjZRq4UXr3gOYxy+7oZSsySoUHMukCKkKz X-Received: by 2002:a17:902:6b05:b0:168:ee36:1928 with SMTP id o5-20020a1709026b0500b00168ee361928mr19579360plk.114.1656665487517; Fri, 01 Jul 2022 01:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656665487; cv=none; d=google.com; s=arc-20160816; b=wH44SI/apis5iHn4Gldsu0A25ad91yXQ0q8+e7UG6bCvsDOnCvGLCSgShO9mHU591c waSvV/0KcAYTp7aq0Ahq7Bc61xjAqhFPI4Qf/IQjsSkjOgtbRcWU207Mwekpsszr5Hw8 ZjBTwKZ3hjM/YPiWwNi7ePlycASmJzayh+lxvM4iXbQZ9DA/pkffHAUA9L2c0NvTGV1Z /9q+MfKCVmt5j1kh15Y1uOwM1hFqUVp/515cPhG5xTWDYVYnCih1RYoxJUTKygodJE/m Ac1xBJXE9MAzznbnMB2T/Q+FawTYupEWuuxISAqDVgqN7p2vVec/DDiCFrqqsUcV7DDA WY7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/tCMbSBSSGqSq/w6l+5dUEB1GDqGiHeU1EE8fEc3DzY=; b=zp/esT8ePdDgbDq4b+479jiefSKZtfNXNYVCMfoTT6qR7TvnG3vkoW1vOFNbn3eAyn qmEOa041858Rdy4nXN+WD0dl8/EX31/+3IkFS5mo1hHK/pLkyt3E81EP9MMoEgPrHO74 UurhhUK1gtO7QqRR1Wp/+3flUTecjYacmRHqcAmyU7wkqLIQ8Hu/RL9l5939Eqw73UTI ttO5+spsIC8JGtrKzAcN3q3PU3DOQOCqE6SOSv/Vpj7kWUcjZaZi61oaKFmKToqLxtmI 7WD/6aaX9hAcDKTPNizWXQOHmD04UomE8wqFRQYOI978tWAkOlWgDFL0K8NJVJT6teCW ScVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YjUvQ6ld; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e28-20020a631e1c000000b0040cd5d37ca3si270425pge.364.2022.07.01.01.51.15; Fri, 01 Jul 2022 01:51:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YjUvQ6ld; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233050AbiGAItk (ORCPT + 99 others); Fri, 1 Jul 2022 04:49:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233288AbiGAItM (ORCPT ); Fri, 1 Jul 2022 04:49:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B103101ED; Fri, 1 Jul 2022 01:48:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 69D4DB82F2F; Fri, 1 Jul 2022 08:48:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14C3BC3411E; Fri, 1 Jul 2022 08:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656665335; bh=h5ZruEJ95WKJ2GkkQoahYktyKw9EOQdVkp6S/Q58M/I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YjUvQ6ldjSecl9YK6o+96aDdSYZlAySFkpsb/m9xVhslmuoV3a8QB4r22WhgvZ7aA bj318/1wCaFEsl2ahHyJioDNDMC+LxKCLV186jos4gUb8lRZXr+5U6nSzunuiUqh14 b6atIYfcy2M8poLGDiFWWvpZcpAYbr0VFt+gipmVIgvE+0OL83Nr31Su3xFOvKlBy7 QygFWDFtT5K72RPjm8G0rrTJ5g/aAQwSa7uxBVT+BtjlWD3IL3GAq6kwIq14pVYwgP JE4SLDobYts7WwdC0cunxRm515oelOt9Uu26/ryT2IBnUaP7MhEpx2nMhDAzPn8tcq tJBAjnTBe5HQg== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1o7CKZ-006T9E-RI; Fri, 01 Jul 2022 09:48:51 +0100 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , ksummit-discuss@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] scripts: sphinx-pre-install: report broken venv Date: Fri, 1 Jul 2022 09:48:47 +0100 Message-Id: X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cc: "Jonathan Corbet" Cc: "Mauro Carvalho Chehab" Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Cc: ksummit-discuss@lists.linuxfoundation.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org After distro upgrades, the directory names for python may change. On such case, the previously-created venv will be broken, and sphinx-build won't run. Add a logic to report it. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 0/4] at: https://lore.kernel.org/all/cover.1656664906.git.mchehab@kernel.org/ scripts/sphinx-pre-install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install index ae8c49734899..18537e5af692 100755 --- a/scripts/sphinx-pre-install +++ b/scripts/sphinx-pre-install @@ -720,6 +720,12 @@ sub get_virtenv() next if (! -f $sphinx_cmd); my $ver = get_sphinx_version($sphinx_cmd); + + if (!$ver) { + $f =~ s#/bin/activate##; + print("Warning: virtual envionment $f is not working.\nPython version upgrade? Remove it with:\n\n\trm -rf $f\n\n"); + } + if ($need_sphinx && ($ver ge $min_version)) { return ($f, $ver); } elsif ($ver gt $cur_version) { -- 2.36.1