rpmlint/rpmlint-0.71-prereq.patch

45 lines
1.8 KiB
Diff
Raw Normal View History

Index: SpecCheck.py
===================================================================
RCS file: /cooker/soft/rpmlint/SpecCheck.py,v
retrieving revision 1.32
diff -u -r1.32 SpecCheck.py
--- SpecCheck.py 15 Jan 2006 09:59:04 -0000 1.32
+++ SpecCheck.py 15 Jan 2006 21:05:12 -0000
@@ -45,6 +45,7 @@
biarch_package_regex=re.compile(DEFAULT_BIARCH_PACKAGES)
hardcoded_lib_path_exceptions_regex=re.compile(Config.getOption('HardcodedLibPathExceptions', DEFAULT_HARDCODED_LIB_PATH_EXCEPTIONS))
prereq_regex=re.compile('^PreReq:\s*(.+?)\s*$', re.IGNORECASE)
+buildprereq_regex=re.compile('^BuildPreReq:\s*(.+?)\s*$', re.IGNORECASE)
use_utf8=Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
# Only check for /lib, /usr/lib, /usr/X11R6/lib
@@ -190,7 +191,11 @@
res=prereq_regex.search(line)
if res:
- printError(pkg, 'prereq-use', res.group(1))
+ printWarning(pkg, 'prereq-use', res.group(1))
+
+ res=buildprereq_regex.search(line)
+ if res:
+ printWarning(pkg, 'buildprereq-use', res.group(1))
if not buildroot:
printError(pkg, 'no-buildroot-tag')
@@ -284,8 +289,13 @@
patch to be effective only on a given arch.''',
'prereq-use',
-'''The use of PreReq is deprecated. You should use Requires(pre), Requires(post),
-Requires(preun) or Requires(postun) according to your needs.''',
+'''The use of PreReq is deprecated. In the majority of cases, a plain Requires
+is enough and the right thing to do. Sometimes Requires(pre), Requires(post),
+Requires(preun) and/or Requires(postun) can also be used instead of PreReq.''',
+
+'buildprereq-use',
+'''The use of BuildPreReq is deprecated, build dependencies are always required
+before a package can be built. Use plain BuildRequires instead.''',
)