From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 556C0138335 for ; Sat, 20 Apr 2019 23:21:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1C4F3E088C; Sat, 20 Apr 2019 23:20:21 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F41AFE088C for ; Sat, 20 Apr 2019 23:20:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 417A4341B9C for ; Fri, 19 Apr 2019 12:29:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E50C3580 for ; Fri, 19 Apr 2019 12:29:52 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1555676985.9d61dc4ca6b4a8f68806d336c5b6eb888332582e.blueness@gentoo> Subject: [gentoo-commits] proj/grss:master commit in: grs/ X-VCS-Repository: proj/grss X-VCS-Files: grs/Kernel.py X-VCS-Directories: grs/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 9d61dc4ca6b4a8f68806d336c5b6eb888332582e X-VCS-Branch: master Date: Fri, 19 Apr 2019 12:29:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5942348f-3bfd-46f8-99c9-1892f2dcaf90 X-Archives-Hash: 68593a64ac3a4d0dabe0d2b2bddaad13 commit: 9d61dc4ca6b4a8f68806d336c5b6eb888332582e Author: Anthony G. Basile gentoo org> AuthorDate: Fri Apr 19 12:29:40 2019 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Fri Apr 19 12:29:45 2019 +0000 URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=9d61dc4c grs/Kernel.py: correctly parse vanilla-sources Signed-off-by: Anthony G. Basile gentoo.org> grs/Kernel.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/grs/Kernel.py b/grs/Kernel.py index 82e6d04..3abea6a 100644 --- a/grs/Kernel.py +++ b/grs/Kernel.py @@ -67,10 +67,15 @@ class Kernel(): pkg_name = flavor + '-sources-' + vanilla_version + '-' + revision except AttributeError: # Or the verison is of the form '4.0.6-hardened' with one - - _match = re.search(r'(\S+?)-(\S+)', gentoo_version) - vanilla_version = _match.group(1) - flavor = _match.group(2) - pkg_name = flavor + '-sources-' + vanilla_version + try: + _match = re.search(r'(\S+?)-(\S+)', gentoo_version) + vanilla_version = _match.group(1) + flavor = _match.group(2) + pkg_name = flavor + '-sources-' + vanilla_version + except AttributeError: + # Finally the verison is of the form '4.0.6' with no - + vanilla_version = gentoo_version + pkg_name = 'vanilla-sources-' + vanilla_version pkg_name = '=sys-kernel/' + pkg_name return (gentoo_version, pkg_name, has_modules)