From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SkEmw-00072K-DE for garchives@archives.gentoo.org; Thu, 28 Jun 2012 13:29:38 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 71E50E073A; Thu, 28 Jun 2012 13:29:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 45450E073A for ; Thu, 28 Jun 2012 13:29:11 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 643531B4059 for ; Thu, 28 Jun 2012 13:29:06 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 34438E5442 for ; Thu, 28 Jun 2012 13:29:04 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1340890139.d1789f1570486f0ac5f52804801de7f078d0991f.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/packageinfo.py X-VCS-Directories: roverlay/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: d1789f1570486f0ac5f52804801de7f078d0991f X-VCS-Branch: master Date: Thu, 28 Jun 2012 13:29:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: e1775064-2448-44e1-9871-e1134e31e647 X-Archives-Hash: 467d7d19e1414d0d07b7ff00374b6602 commit: d1789f1570486f0ac5f52804801de7f078d0991f Author: Andr=C3=A9 Erdmann mailerd de> AuthorDate: Thu Jun 28 13:28:59 2012 +0000 Commit: Andr=C3=A9 Erdmann mailerd de> CommitDate: Thu Jun 28 13:28:59 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/R_overlay.git= ;a=3Dcommit;h=3Dd1789f15 PackageInfo: fix illegal ebuild names modified: roverlay/packageinfo.py --- roverlay/packageinfo.py | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/roverlay/packageinfo.py b/roverlay/packageinfo.py index 8f59439..cc09a6b 100644 --- a/roverlay/packageinfo.py +++ b/roverlay/packageinfo.py @@ -41,6 +41,10 @@ class PackageInfo ( object ): config.get_or_fail ( 'R_PACKAGE.suffix_regex' ) + '$' ) =20 + ILLEGAL_NAME_CHARS =3D re.compile ( "[.:]{1,}" ) + ILLEGAL_NAME_CHARS_REPLACE_BY =3D '_' + + def __init__ ( self, **initial_info ): """Initializes a PackageInfo. =20 @@ -296,13 +300,20 @@ class PackageInfo ( object ): # TODO: discard or continue with bad version? logging.error ( "Cannot parse version string '%s' for '%s'" - % ( filepath, version_str ) + % ( _filename, version_str ) ) raise =20 # using package name as name (unless modified later), # using pkg_version for the ebuild version - self ['name'] =3D package_name + + # removing illegal chars from the package_name + ebuild_name =3D PackageInfo.ILLEGAL_NAME_CHARS.sub ( + PackageInfo.ILLEGAL_NAME_CHARS_REPLACE_BY, package_name + ) + if ebuild_name !=3D package_name: + self ['name'] =3D ebuild_name + self ['ebuild_verstr'] =3D version_str =20 # for DescriptionReader