From 2fa855f6bf4aefe2c4806a8dac1743dbead53b56f1a57ea6ac9a10f1ad5d5245 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 16 Mar 2012 13:26:48 +0000 Subject: [PATCH 1/3] - fix parsing of update-alternatives and clarify info message OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=105 --- CheckAlternativesGhostFiles.py | 18 +++++++++++------- rpmlint.changes | 5 +++++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/CheckAlternativesGhostFiles.py b/CheckAlternativesGhostFiles.py index d24f419..7bd7b66 100644 --- a/CheckAlternativesGhostFiles.py +++ b/CheckAlternativesGhostFiles.py @@ -32,8 +32,12 @@ class CheckAlternativesGhostFiles(AbstractCheck.AbstractCheck): if cls.INSTALL in c): #parse install - xs = command.split(None, 4) - ghost_files.append(xs[1]) + command_args = [] + for arg in command.split(None): + if not arg.startswith("--"): + command_args.append(arg) + + ghost_files.append(command_args[1]) if cls.SLAVE in command: for sc in ( \ @@ -70,12 +74,12 @@ if Config.info: addDetails( 'generic-name-not-marked-as-ghost', -'''The generic name is not marked as a ghost, which may cause a problems during -update. Mark it as a %ghost in %files section.''', +'''The update-alternatives generic name is not marked as a ghost in the %files section. +This causes problems during update. Mark it as a %ghost in %files section.''', 'generic-name-not-in-filelist', -'''The generic name is not in a filelist of package, add it to list marked as -%ghost. Note: this error will be raised, if you use a hash ($) in file name, -use rpm macros in spec file instead.''', +'''The update-alternatives generic name is not in a filelist of package. +Add it to list marked as %ghost. Note: this error will be raised, +if you use a hash ($) in file name, use rpm macros in spec file instead.''', ) diff --git a/rpmlint.changes b/rpmlint.changes index ef69485..58ef0ed 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Mar 16 14:26:34 CET 2012 - dmueller@suse.de + +- fix parsing of update-alternatives and clarify info message + ------------------------------------------------------------------- Tue Mar 13 15:14:07 CET 2012 - dmueller@suse.de From d055a4f37917d7659ae79c633a14de660137e485983087822f76021fbf47c466 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 16 Mar 2012 13:29:33 +0000 Subject: [PATCH 2/3] offbyone OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=106 --- CheckAlternativesGhostFiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CheckAlternativesGhostFiles.py b/CheckAlternativesGhostFiles.py index 7bd7b66..5595cd2 100644 --- a/CheckAlternativesGhostFiles.py +++ b/CheckAlternativesGhostFiles.py @@ -37,7 +37,7 @@ class CheckAlternativesGhostFiles(AbstractCheck.AbstractCheck): if not arg.startswith("--"): command_args.append(arg) - ghost_files.append(command_args[1]) + ghost_files.append(command_args[0]) if cls.SLAVE in command: for sc in ( \ From fad9b7334a749aa3aba85850645f4af253c57813786457924de88c4542cf2224 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Tue, 20 Mar 2012 08:34:26 +0000 Subject: [PATCH 3/3] - better deal with spaces in logrotate config - add colord-sane dbus service to whitelist (bnc#752518) OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=107 --- CheckLogrotate.py | 3 ++- config | 5 ++++- rpmlint.changes | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CheckLogrotate.py b/CheckLogrotate.py index 54d2371..d7577cf 100644 --- a/CheckLogrotate.py +++ b/CheckLogrotate.py @@ -63,7 +63,8 @@ class LogrotateCheck(AbstractCheck.AbstractCheck): if line.endswith('{'): insection = True for logfile in line.split(' '): - if logfile == '{': + logfile = logfile.strip() + if len(logfile) == 0 or logfile == '{': continue dn = os.path.dirname(logfile) if not dn in dirs: diff --git a/config b/config index bf79ddc..a9124d8 100644 --- a/config +++ b/config @@ -1,5 +1,5 @@ # -*- python -*- -# vim: syntax=python +# vim: syntax=python sw=4 et # Configuration for the rpmlint utility. # Loaded before ~/.rpmlintrc # $Id: config,v 1.39 2003/12/22 11:20:55 flepied Exp $ @@ -481,6 +481,9 @@ setOption("DBUSServices.WhiteList", ( # colord (bnc#698250) "org.freedesktop.ColorManager.service", "org.freedesktop.ColorManager.conf", + # colord-sane (bnc#752518) + "org.freedesktop.colord-sane.service", + "org.freedesktop.colord-sane.conf", # lightdm (bnc#708205) "org.freedesktop.DisplayManager.conf", # kdepim4/kalarm (bnc#707723) diff --git a/rpmlint.changes b/rpmlint.changes index 58ef0ed..0065791 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 20 08:32:33 UTC 2012 - lnussel@suse.de + +- better deal with spaces in logrotate config +- add colord-sane dbus service to whitelist (bnc#752518) + ------------------------------------------------------------------- Fri Mar 16 14:26:34 CET 2012 - dmueller@suse.de