added lib-package-without-%mklibname

git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@716 9bc8b190-ac0f-0410-8968-dc7d1f502856
This commit is contained in:
Frédéric Lepied 2003-01-16 22:28:57 +00:00
parent 4fe7057728
commit fb27795511
1 changed files with 17 additions and 0 deletions

View File

@ -25,6 +25,8 @@ clean_regex=re.compile('^%clean')
changelog_regex=re.compile('^%changelog')
configure_start_regex=re.compile('\./configure')
configure_libdir_spec_regex=re.compile('\./configure[^#]*--libdir=([^\s]+)[^#]*')
lib_package_regex=re.compile('^%package.*lib')
mklibname_regex=re.compile('%mklibname')
# Only check for /lib, /usr/lib, /usr/X11R6/lib
# TODO: better handling of X libraries and modules.
@ -69,6 +71,8 @@ class SpecCheck(AbstractCheck.AbstractCheck):
changelog=0
configure=0
configure_cmdline=""
mklibname=0
lib=0
# gather info from spec lines
for line in spec:
@ -127,12 +131,21 @@ class SpecCheck(AbstractCheck.AbstractCheck):
if not clean and clean_regex.search(line):
clean=1
if mklibname_regex.search(line):
mklibname=1
if lib_package_regex.search(line):
lib=1
if not buildroot:
printError(pkg, 'no-buildroot-tag')
if not clean:
printError(pkg, 'no-%clean-section')
if lib and not mklibname:
printError(pkg, 'lib-package-without-%mklibname')
# process gathered info
for p in patches.keys():
@ -189,6 +202,10 @@ options must be augmented with something like libdir=%{_libdir}.''',
'''The spec file doesn't contain a %clean section to remove the files installed
by the %install section.''',
'lib-package-without-%mklibname',
'''The package name must be built using %mklibname to allow lib64 and lib32
coexistence.''',
)
# SpecCheck.py ends here