From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WKtdK27PAF8HRAAA0tVLHw (envelope-from ) for ; Sat, 04 Jul 2020 18:50:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gBJBJ27PAF8+eAAAB5/wlQ (envelope-from ) for ; Sat, 04 Jul 2020 18:50:22 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5D7E09408FC for ; Sat, 4 Jul 2020 18:50:22 +0000 (UTC) Received: from localhost ([::1]:32960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrnEz-0000KH-9M for larch@yhetil.org; Sat, 04 Jul 2020 14:50:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrmzC-0001y7-Tb for guix-patches@gnu.org; Sat, 04 Jul 2020 14:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48057) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrmzC-00025L-Ix for guix-patches@gnu.org; Sat, 04 Jul 2020 14:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jrmzC-0004kY-Fg for guix-patches@gnu.org; Sat, 04 Jul 2020 14:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42192] [PATCH 3/3] import: launchpad: Recognize more URLs. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Jul 2020 18:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42192 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42192@debbugs.gnu.org Cc: Arun Isaac Received: via spool by 42192-submit@debbugs.gnu.org id=B42192.159388762918225 (code B ref 42192); Sat, 04 Jul 2020 18:34:02 +0000 Received: (at 42192) by debbugs.gnu.org; 4 Jul 2020 18:33:49 +0000 Received: from localhost ([127.0.0.1]:59600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrmyr-0004jd-HF for submit@debbugs.gnu.org; Sat, 04 Jul 2020 14:33:49 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:34722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrmyp-0004jG-4r for 42192@debbugs.gnu.org; Sat, 04 Jul 2020 14:33:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=v8m9yMJiZ/em8UnHU6jMll5EpQLiM5b4olljWqIPC0E=; b=qNtdUeTgvSoP92D6kF8cFpGKff f2qB6qrxNkDlwHdhmmg2p9BX630SORv9lL7nlueEKaq3BQAA1Lg7CGvdmp3V8MzjKilBoKr4ofz6F Fcxmmeb47sUO10b5ssb+f9qCO97sTt72Itad0Axn/RUep78kF5sBhyp90Q/3nhCtRnI8=; Received: from [192.168.2.1] (helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1jrmym-0004Fh-BW; Sun, 05 Jul 2020 00:03:36 +0530 From: Arun Isaac Date: Sun, 5 Jul 2020 00:03:32 +0530 Message-Id: <20200704183332.25445-3-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200704183332.25445-1-arunisaac@systemreboot.net> References: <20200704183332.25445-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=systemreboot.net header.s=default header.b=qNtdUeTg; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 5.09 X-TUID: DAczSgT8dhj3 * guix/import/launchpad.scm (updated-launchpad-url): Recognize more URLs. --- guix/import/launchpad.scm | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/guix/import/launchpad.scm b/guix/import/launchpad.scm index c991ccfe6e..fd3cfa8444 100644 --- a/guix/import/launchpad.scm +++ b/guix/import/launchpad.scm @@ -46,15 +46,35 @@ false if none is recognized" (version (package-version old-package)) (repo (launchpad-repository url))) (cond - ((and - (>= (length (string-split version #\.)) 2) - (string=? (string-append "https://launchpad.net/" - repo "/" (version-major+minor version) - "/" version "/+download/" repo "-" version ext) - url)) + ((< (length (string-split version #\.)) 2) #f) + ((string=? (string-append "https://launchpad.net/" + repo "/" (version-major+minor version) + "/" version "/+download/" repo "-" version ext) + url) (string-append "https://launchpad.net/" repo "/" (version-major+minor new-version) "/" new-version "/+download/" repo "-" new-version ext)) + ((string=? (string-append "https://launchpad.net/" + repo "/" (version-major+minor version) + "/" version "/+download/" repo "_" version ext) + url) + (string-append "https://launchpad.net/" + repo "/" (version-major+minor new-version) + "/" new-version "/+download/" repo "-" new-version ext)) + ((string=? (string-append "https://launchpad.net/" + repo "/trunk/" version "/+download/" + repo "-" version ext) + url) + (string-append "https://launchpad.net/" + repo "/trunk/" new-version + "/+download/" repo "-" new-version ext)) + ((string=? (string-append "https://launchpad.net/" + repo "/trunk/" version "/+download/" + repo "_" version ext) + url) + (string-append "https://launchpad.net/" + repo "/trunk/" new-version + "/+download/" repo "_" new-version ext)) (#t #f))))) ; Some URLs are not recognised. (match (package-source old-package) -- 2.26.2