http://bugzilla.novell.com/show_bug.cgi?id=546166 Summary: check_zypper always reports zero Updates Classification: openSUSE Product: openSUSE 11.2 Version: Factory Platform: x86-64 OS/Version: SLES 11 Status: NEW Severity: Major Priority: P5 - None Component: Maintenance AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: sven.giller@uni-wuerzburg.de QAContact: qa@suse.de Found By: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en; rv:1.9.0.14) Gecko/20080528 Epiphany/2.22 Firefox/3.0 'check_zypper' reports that no updates are available, while 'zypper lu' reports new updates. Testet with check_zypper v1.21, same bug at previous version 1.01 Reproducible: Always Steps to Reproduce: 1. add Repository repos-server-monitoring-sle11 2. install check_zypper (zypper install nagios-plugins-zypper) 3. wait for updates (zypper lu) 4. execute 'check_zypper' with debug option (/usr/lib/nagios/plugins/check_zypper -d) Actual Results: INFO: SLE,11,0 INFO: Trying unset LANG; /usr/bin/zypper sl 2>/dev/null 1>&2 INFO: Trying unset LANG; /usr/bin/zypper --xmlout --non-interactive list-updates -t package -t patch LINE: <?xml version='1.0'?> LINE: <stream> LINE: <message type="info">Loading repository data...</message> LINE: <message type="info">Reading installed packages...</message> LINE: <update-status version="0.6"> LINE: <update-list> LINE: <update name="slessp0-sysconfig" edition="1358" category="recommended" pkgmanager="false" restart="false" interactive="false" kind="patch"> LINE: <summary>Recommended update for sysconfig </summary> LINE: <description>The following bugs are fixed by this update: Bug 542230: .. LINE: </update> LINE: </update-list> LINE: </update-status> LINE: </stream> INFO: Packages (paccount): 0 INFO: Optional (optcount): 0 INFO: Recommended (reccount): 0 INFO: Security (seccount): 0 $VAR1 = { 'security' => {}, 'optional' => {}, 'recommended' => {}, 'package' => {} }; Updates OK: no updates available | security=0;;;; recommended=0;;;; optional=0;;;; packages=0;;;; INFO: Exit-Code: 0 Expected Results: /usr/lib/nagios/plugins/check_zypper Updates OK : 1 package update(s); | security=0;;;; recommended=1;;;; optional=0;;;; packages=1;;;; on previous version 1.01 a small change on line 282 solved the problem, but didn't work with 1.21: original line 282: if (( "$release" eq "10.2" ) || ("$dist" eq "SLE") ){ my fixed line 282: if (( "$release" eq "10.2" ) || (("$dist" eq "SLE") && ("$release" eq "10") && ($patchlevel gt 0)) ){ when i make the same change to version 1.21, new updates were reported, but the Status is OK instead of WARNING and returncode is wrong (RC=0 instead of 1) results of modified 1.21: LINE: </update> LINE: </update-list> LINE: </update-status> LINE: </stream> INFO: Packages (paccount): 1 INFO: Optional (optcount): 0 INFO: Recommended (reccount): 1 INFO: Security (seccount): 0 $VAR1 = { 'security' => {}, 'optional' => {}, 'package' => { 'sysconfig' => { 'status' => 'Needed', 'name' => 'sysconfig', 'category' => 'package' } }, 'recommended' => { 'slessp0-sysconfig' => { 'status' => 'Needed', 'name' => 'slessp0-sysconfig', 'category' => 'recommended' } } }; Updates OK : 1 package update(s); | security=0;;;; recommended=1;;;; optional=0;;;; packages=1;;;; INFO: Exit-Code: 0 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.