2010-10-14 14:32:03 +02:00
|
|
|
--- TagsCheck.py
|
2008-04-17 04:52:37 +02:00
|
|
|
+++ TagsCheck.py
|
2010-10-14 14:32:03 +02:00
|
|
|
@@ -419,6 +419,7 @@
|
2009-08-21 18:19:06 +02:00
|
|
|
# () are here for grouping purpose in the regexp
|
|
|
|
forbidden_words_regex = re.compile('(' + Config.getOption('ForbiddenWords') + ')', re.IGNORECASE)
|
|
|
|
valid_buildhost_regex = re.compile(Config.getOption('ValidBuildHost'))
|
2008-04-17 04:52:37 +02:00
|
|
|
+valid_filedep_regex=re.compile('(?:/s?bin/|^/etc/|^/usr/lib/sendmail$)')
|
2009-09-16 18:41:21 +02:00
|
|
|
use_epoch = Config.getOption('UseEpoch', False)
|
2009-08-21 18:19:06 +02:00
|
|
|
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
2010-10-14 14:32:03 +02:00
|
|
|
max_line_len = Config.getOption('MaxLineLength', 79)
|
|
|
|
@@ -597,6 +598,9 @@
|
2009-08-21 18:19:06 +02:00
|
|
|
if d[0].startswith('/usr/local/'):
|
|
|
|
printError(pkg, 'invalid-dependency', d[0])
|
2008-04-17 04:52:37 +02:00
|
|
|
|
|
|
|
+ if d[0].startswith('/') and not valid_filedep_regex.search(d[0]):
|
|
|
|
+ printWarning(pkg, 'invalid-filepath-dependency', d[0])
|
|
|
|
+
|
2010-10-14 14:32:03 +02:00
|
|
|
if not devel_depend and not is_devel and not is_source and \
|
|
|
|
FilesCheck.devel_regex.search(d[0]):
|
|
|
|
printError(pkg, 'devel-dependency', d[0])
|
|
|
|
@@ -1063,6 +1067,12 @@
|
2009-09-16 18:41:21 +02:00
|
|
|
'''This package provides 2 times the same capacity. It should only provide it
|
|
|
|
once.''',
|
2008-04-17 04:52:37 +02:00
|
|
|
|
|
|
|
+'invalid-filepath-dependency',
|
2009-08-21 18:19:06 +02:00
|
|
|
+'''A package has a file or path based dependency that is not resolveable for
|
2008-04-17 04:52:37 +02:00
|
|
|
+package solvers because it is not in the whitelist for path based dependencies
|
|
|
|
+and therefore not available in repository metadata. Please use a symbolic requires
|
|
|
|
+instead or require a file in bin or /etc.''',
|
|
|
|
+
|
|
|
|
'tag-not-utf8',
|
|
|
|
'''The character encoding of the value of this tag is not UTF-8.''',
|
|
|
|
|