From patchwork Mon Sep 27 20:09:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xinglu Chen X-Patchwork-Id: 382 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8F9E527BBE3; Mon, 27 Sep 2021 21:14:38 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3AF0C27BBE1 for ; Mon, 27 Sep 2021 21:14:38 +0100 (BST) Received: from localhost ([::1]:53460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUx1J-0007dw-Ah for patchwork@mira.cbaines.net; Mon, 27 Sep 2021 16:14:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUwws-0002Xo-VD for guix-patches@gnu.org; Mon, 27 Sep 2021 16:10:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUwws-0000CW-Ni for guix-patches@gnu.org; Mon, 27 Sep 2021 16:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mUwws-0003Bd-CF for guix-patches@gnu.org; Mon, 27 Sep 2021 16:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50854] [PATCH 0/2] Make the PyPI importer honor the =?utf-8?b?4oCYdXBzdHJlYW0tbmFtZeKAmQ==?= package property Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Sep 2021 20:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50854 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50854@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163277339012220 (code B ref -1); Mon, 27 Sep 2021 20:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Sep 2021 20:09:50 +0000 Received: from localhost ([127.0.0.1]:42938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUwwg-0003B1-5Z for submit@debbugs.gnu.org; Mon, 27 Sep 2021 16:09:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:49552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mUwwe-0003At-Td for submit@debbugs.gnu.org; Mon, 27 Sep 2021 16:09:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUwwd-0002Ru-K4 for guix-patches@gnu.org; Mon, 27 Sep 2021 16:09:48 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:51798 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUwwb-0008K3-5A for guix-patches@gnu.org; Mon, 27 Sep 2021 16:09:46 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1632773372; bh=SCgJkqP5g4Y05eZ2idpoQXwtUBeoge2jT/7qEdJlcBM=; h=From:To:Subject:Date; b=YpekHuwewAiu/ZfaG4iUFSHMjfNxLjOMjPteorepR1UTVbgca/r27mtaefFUsKmMl 0bSvKw62SHII0MB/mqWzs2wLdk+B+HNTZTu2ZzSIxFWpACA+bLJRpUTZ4iZjN7tkR9 y83YFR2eRzZCcLiU7abS+FP2tM0yUDB86t+YW/Ac= Message-Id: Date: Mon, 27 Sep 2021 22:09:21 +0200 MIME-Version: 1.0 Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 45 X-Spam_score: 4.5 X-Spam_bar: ++++ X-Spam_report: (4.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=0.8, PDS_OTHER_BAD_TLD=1.999, PDS_RDNS_DYNAMIC_FP=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TO_NO_BRKTS_DYNIP=2.299 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches If a PyPI package contains a “-” followed by one or more digits, e.g., “AV-98”, the PyPI importer/updater will think that the digits after the “-” is the version of the package, and instead of trying to update “AV-98” it will try to update “AV”. --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix refresh av-98 following redirection to `https://pypi.org/pypi/av/json'... /home/yoctocell/src/guix/gnu/packages/web-browsers.scm:914:13: av-98 would be upgraded from 1.0.1 to 8.0.3 --8<---------------cut here---------------end--------------->8--- The first patch makes the PyPI importer honor the ‘upstream-name’ property; it will also generate a package with an ‘upstream-name’ property if the package name contains a “-” followed by one or more digits. The second patch sets the ‘upstream-name’ property for the ‘av-98’ package. Xinglu Chen (2): import: pypi: Honor the 'upstream-name' package property. gnu: av-98: Set 'upstream-name' property. gnu/packages/web-browsers.scm | 2 + guix/import/pypi.scm | 20 +++++-- tests/pypi.scm | 106 +++++++++++++++++++++++++++++++--- 3 files changed, 115 insertions(+), 13 deletions(-) base-commit: 6ae4644984608b7eff7ab54d3a5787c661d85b2e