aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2015-05-05 15:13:52 +0200
committerUlrich Müller <ulm@gentoo.org>2015-05-06 08:36:53 +0200
commitbae954e2f69ee76d74570e30d6ddd1482ebad49b (patch)
treee9b8282c86fd8de3c6d943e2e22a51546fe85d5e
parentvarexpand: fix IndexError (bug 548556) (diff)
downloadportage-bae954e2.tar.gz
portage-bae954e2.tar.bz2
portage-bae954e2.zip
Use consistent rules for filenames of ebuils and misc files.
So far non-ebuild filenames were allowed to contain a : (colon). This is a problematic character as it is illegal in both Mac OS and MS-Windows (and there are Prefix profiles for these). Also it has a special meaning as path separator and as remote host indicator in scp and other programs. This limits the allowed characters in filenames to [A-Za-z0-9._+-] which is the same as IEEE Std 1003.1-2013, section 3.278, with the addition of the plus character. See also bug 411127.
-rwxr-xr-xbin/repoman4
-rw-r--r--pym/portage/repository/config.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/repoman b/bin/repoman
index e9c89c2cc..37e11b2d2 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1,5 +1,5 @@
#!/usr/bin/python -bO
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Next to do: dep syntax checking in mask files
@@ -88,7 +88,7 @@ util.initialize_logger()
# 14 is the length of DESCRIPTION=""
max_desc_len = 100
-allowed_filename_chars="a-zA-Z0-9._-+:"
+allowed_filename_chars="a-zA-Z0-9._+-"
pv_toolong_re = re.compile(r'[0-9]{19,}')
GPG_KEY_ID_REGEX = r'(0x)?([0-9a-fA-F]{8}|[0-9a-fA-F]{16}|[0-9a-fA-F]{24}|[0-9a-fA-F]{32}|[0-9a-fA-F]{40})!?'
bad = create_color_func("BAD")
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 5da181040..e44b6193c 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -38,7 +38,7 @@ if sys.hexversion >= 0x3000000:
basestring = str
# Characters prohibited by repoman's file.name check.
-_invalid_path_char_re = re.compile(r'[^a-zA-Z0-9._\-+:/]')
+_invalid_path_char_re = re.compile(r'[^a-zA-Z0-9._\-+/]')
_valid_profile_formats = frozenset(
['pms', 'portage-1', 'portage-2', 'profile-bashrcs', 'profile-set',