diff --git a/check-cron-dependency.diff b/check-cron-dependency.diff index b33bc5f..81d0e73 100644 --- a/check-cron-dependency.diff +++ b/check-cron-dependency.diff @@ -1,24 +1,33 @@ --- FilesCheck.py +++ FilesCheck.py -@@ -835,6 +835,9 @@ +@@ -832,6 +832,12 @@ logrotate_file=res or logrotate_file if res and res.group(1) != pkg.name: printError(pkg, 'incoherent-logrotate-file', f) -+ if (f.startswith('/etc/cron.') or res) \ -+ and not ('cron' in pkg.requires()+pkg.recommends()+pkg.suggests()): -+ printError(pkg, 'missing-dependency-to-cron', "for logrotate script", f) ++ deps=[x[0] for x in pkg.requires()+pkg.recommends()+pkg.suggests()] ++ if res and not ('logrotate' in deps) and pkg.name != "logrotate": ++ 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] if 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 the debuginfo package.''', +'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, -+your package should explicitely require cron to make sure that your logrotate -+or cron job is executed.''', ++your package should explicitely require cron to make sure that your cron job is ++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', '''This file could not be read. A reason for this could be that the info about diff --git a/rpmlint.changes b/rpmlint.changes index 4ecf52b..bc4cf6c 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -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 diff --git a/rpmlint.spec b/rpmlint.spec index ca7e3a1..5f46c1d 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -15,7 +15,7 @@ Name: rpmlint BuildRequires: rpm-python Summary: Rpm correctness checker Version: 0.83 -Release: 5 +Release: 7 Source0: %{name}-%{version}.tar.bz2 Source1: config Source1001: config.in @@ -196,6 +196,8 @@ rm -rf $RPM_BUILD_ROOT /usr/share/man/man1/rpmlint.1.gz %changelog +* Tue Jul 01 2008 dmueller@suse.de +- update cron dependency checker (bnc#400921) * Sun Jun 29 2008 schwab@suse.de - No PT_GNU_STACK on ia64 and ppc64. * Sat Jun 28 2008 dmueller@suse.de