forked from pool/rpmlint
226fb20156
this package. OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=931
38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
diff --git a/rpmlint/lint.py b/rpmlint/lint.py
|
|
index 7afadbc3..df5437e4 100644
|
|
--- a/rpmlint/lint.py
|
|
+++ b/rpmlint/lint.py
|
|
@@ -5,6 +5,7 @@ import operator
|
|
import os
|
|
from pathlib import Path
|
|
from pstats import Stats
|
|
+import re
|
|
import sys
|
|
from tempfile import gettempdir
|
|
import time
|
|
@@ -22,6 +23,8 @@ class Lint(object):
|
|
Generic object handling the basic rpmlint operations
|
|
"""
|
|
|
|
+ rpmlint_package = re.compile(r'/home/abuild/rpmbuild/RPMS/noarch/rpmlint-\d')
|
|
+
|
|
def __init__(self, options):
|
|
# initialize configuration
|
|
self.checks = {}
|
|
@@ -53,6 +56,15 @@ class Lint(object):
|
|
self.config.configuration['ExtractDir'] = gettempdir()
|
|
# initialize output buffer
|
|
self.output = Filter(self.config)
|
|
+
|
|
+ # Do not run rpmlint on rpmlint package that easily leads
|
|
+ # to run-time error as old rpmlint (taken from rpmlint-mini)
|
|
+ # uses a modified configuration.
|
|
+ for file in self.options['rpmfile']:
|
|
+ if self.rpmlint_package.search(str(file)):
|
|
+ print('Skipping rpmlint for rpmlint package!')
|
|
+ sys.exit(3)
|
|
+
|
|
# preload the check list if we not print config
|
|
# some of the config values are transformed e.g. to regular
|
|
# expressions
|