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
# 14 is the length of DESCRIPTION=""
max_desc_len = 100
allowed_filename_chars="a-zA-Z0-9._-+:"
-disallowed_filename_chars_re = re.compile(r'[^a-zA-Z0-9._\-+:]')
pv_toolong_re = re.compile(r'[0-9]{19,}')
bad = create_color_func("BAD")
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import errno
import io
+import re
import warnings
import portage
MANIFEST2_HASH_FUNCTIONS, MANIFEST2_IDENTIFIERS, MANIFEST2_REQUIRED_HASH)
from portage.localization import _
+# Characters prohibited by repoman's file.name check.
+_prohibited_filename_chars_re = re.compile(r'[^a-zA-Z0-9._\-+:]')
+
class FileNotInManifestException(PortageException):
pass
for x in mysplit:
if x[:1] == '.':
return False
+ if _prohibited_filename_chars_re.search(x) is not None:
+ return False
return not filename[:7] == 'digest-'
def manifest2MiscfileFilter(filename):
filename = 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 filename.endswith(".ebuild"))
def guessManifestFileType(filename):