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 1S8wkA-0000Zs-Cq for garchives@archives.gentoo.org; Sat, 17 Mar 2012 16:44:38 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6A941E06B0; Sat, 17 Mar 2012 16:44:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 20A9BE06B0 for ; Sat, 17 Mar 2012 16:44:30 +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 7C3231B401E for ; Sat, 17 Mar 2012 16:44:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 2BBECE5402 for ; Sat, 17 Mar 2012 16:44:27 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1332002643.2dac56fa282645031eb29860abc403e983a04b2d.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/, pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: bin/repoman pym/portage/manifest.py X-VCS-Directories: bin/ pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 2dac56fa282645031eb29860abc403e983a04b2d X-VCS-Branch: master Date: Sat, 17 Mar 2012 16:44:27 +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: 592e174e-8076-4073-b664-a86eea5f8839 X-Archives-Hash: 1ba88522559ed7af0fe247df2405998f commit: 2dac56fa282645031eb29860abc403e983a04b2d Author: Zac Medico gentoo org> AuthorDate: Sat Mar 17 16:44:03 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Mar 17 16:44:03 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D2dac56fa Manifest: filter file names with repoman's regex This makes Manifest generation consistent with repoman, which is necessary if repoman is going to ignore irrelevant files as requested in bug #406877. --- bin/repoman | 3 ++- pym/portage/manifest.py | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/repoman b/bin/repoman index 3f16603..ffedf2e 100755 --- a/bin/repoman +++ b/bin/repoman @@ -69,6 +69,8 @@ from portage import cvstree, normalize_path from portage import util from portage.exception import (FileNotFound, MissingParameter, ParseError, PermissionDenied) +from portage.manifest import _prohibited_filename_chars_re as \ + disallowed_filename_chars_re from portage.process import find_binary, spawn from portage.output import bold, create_color_func, \ green, nocolor, red @@ -85,7 +87,6 @@ util.initialize_logger() # 14 is the length of DESCRIPTION=3D"" max_desc_len =3D 100 allowed_filename_chars=3D"a-zA-Z0-9._-+:" -disallowed_filename_chars_re =3D re.compile(r'[^a-zA-Z0-9._\-+:]') pv_toolong_re =3D re.compile(r'[0-9]{19,}') bad =3D create_color_func("BAD") =20 diff --git a/pym/portage/manifest.py b/pym/portage/manifest.py index da40ae1..90324ee 100644 --- a/pym/portage/manifest.py +++ b/pym/portage/manifest.py @@ -1,8 +1,9 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 =20 import errno import io +import re import warnings =20 import portage @@ -22,6 +23,9 @@ from portage.const import (MANIFEST1_HASH_FUNCTIONS, MA= NIFEST2_HASH_DEFAULTS, MANIFEST2_HASH_FUNCTIONS, MANIFEST2_IDENTIFIERS, MANIFEST2_REQUIRED_HAS= H) from portage.localization import _ =20 +# Characters prohibited by repoman's file.name check. +_prohibited_filename_chars_re =3D re.compile(r'[^a-zA-Z0-9._\-+:]') + class FileNotInManifestException(PortageException): pass =20 @@ -33,10 +37,14 @@ def manifest2AuxfileFilter(filename): for x in mysplit: if x[:1] =3D=3D '.': return False + if _prohibited_filename_chars_re.search(x) is not None: + return False return not filename[:7] =3D=3D 'digest-' =20 def manifest2MiscfileFilter(filename): filename =3D filename.strip(os.sep) + if _prohibited_filename_chars_re.search(filename) is not None: + return False return not (filename in ["CVS", ".svn", "files", "Manifest"] or filenam= e.endswith(".ebuild")) =20 def guessManifestFileType(filename):