SHA256
1
0
forked from pool/rpmlint
OBS User unknown 2008-07-03 11:01:55 +00:00 committed by Git OBS Bridge
parent 6a768455fc
commit 2fbd24d117
3 changed files with 25 additions and 9 deletions

View File

@ -1,24 +1,33 @@
--- FilesCheck.py --- FilesCheck.py
+++ FilesCheck.py +++ FilesCheck.py
@@ -835,6 +835,9 @@ @@ -832,6 +832,12 @@
logrotate_file=res or logrotate_file logrotate_file=res or logrotate_file
if res and res.group(1) != pkg.name: if res and res.group(1) != pkg.name:
printError(pkg, 'incoherent-logrotate-file', f) printError(pkg, 'incoherent-logrotate-file', f)
+ if (f.startswith('/etc/cron.') or res) \ + deps=[x[0] for x in pkg.requires()+pkg.recommends()+pkg.suggests()]
+ and not ('cron' in pkg.requires()+pkg.recommends()+pkg.suggests()): + if res and not ('logrotate' in deps) and pkg.name != "logrotate":
+ printError(pkg, 'missing-dependency-to-cron', "for logrotate script", f) + printError(pkg, 'missing-dependency-to-logrotate', "for logrotate script", f)
+ if f.startswith('/etc/cron.') \
+ and not ('cron' in deps) and pkg.name != "cron":
+ printError(pkg, 'missing-dependency-to-cron', "for cron script", f)
link=enreg[3] link=enreg[3]
if link != '': if link != '':
ext=compr_regex.search(link) ext=compr_regex.search(link)
@@ -1463,6 +1466,12 @@ @@ -1464,6 +1470,18 @@
if there's no way to produce useful debuginfo out of it, disable creation of if there's no way to produce useful debuginfo out of it, disable creation of
the debuginfo package.''', the debuginfo package.''',
+'missing-dependency-to-cron', +'missing-dependency-to-cron',
+'''This package installs a file in /etc/logrotate.d/ or in /etc/cron.*/ but +'''This package installs a file in /etc/cron.*/ but
+doesn't require cron to be installed. as cron is not part of the essential packages, +doesn't require cron to be installed. as cron is not part of the essential packages,
+your package should explicitely require cron to make sure that your logrotate +your package should explicitely require cron to make sure that your cron job is
+or cron job is executed.''', +executed. If it is an optional feature of your package, recommend or suggest cron.''',
+
+'missing-dependency-to-logrotate',
+'''This package installs a file in /etc/logrotate.d/ but
+doesn't require logrotate to be installed. Because logrotate is not part of the essential packages,
+your package should explicitely depend on logrotate to make sure that your logrotate
+job is executed. If it is an optional feature of your package, recommend or suggest logrotate.''',
+ +
'read-error', 'read-error',
'''This file could not be read. A reason for this could be that the info about '''This file could not be read. A reason for this could be that the info about

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jul 1 09:14:36 CEST 2008 - dmueller@suse.de
- update cron dependency checker (bnc#400921)
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Jun 29 15:54:17 CEST 2008 - schwab@suse.de Sun Jun 29 15:54:17 CEST 2008 - schwab@suse.de

View File

@ -15,7 +15,7 @@ Name: rpmlint
BuildRequires: rpm-python BuildRequires: rpm-python
Summary: Rpm correctness checker Summary: Rpm correctness checker
Version: 0.83 Version: 0.83
Release: 5 Release: 7
Source0: %{name}-%{version}.tar.bz2 Source0: %{name}-%{version}.tar.bz2
Source1: config Source1: config
Source1001: config.in Source1001: config.in
@ -196,6 +196,8 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/man/man1/rpmlint.1.gz /usr/share/man/man1/rpmlint.1.gz
%changelog %changelog
* Tue Jul 01 2008 dmueller@suse.de
- update cron dependency checker (bnc#400921)
* Sun Jun 29 2008 schwab@suse.de * Sun Jun 29 2008 schwab@suse.de
- No PT_GNU_STACK on ia64 and ppc64. - No PT_GNU_STACK on ia64 and ppc64.
* Sat Jun 28 2008 dmueller@suse.de * Sat Jun 28 2008 dmueller@suse.de