[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#544315: marked as done (DDPO: developer.php logs errors about dpkg to /var/log/apache/error.log)



Your message dated Sat, 23 Jan 2010 22:23:07 +0000
with message-id <E1NYoNn-0008WM-K4@alioth.debian.org>
and subject line qa.debian.org bug fixed in revision 2334
has caused the Debian Bug report #544315,
regarding DDPO: developer.php logs errors about dpkg to /var/log/apache/error.log
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
544315: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544315
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: qa.debian.org
Tags: patch

The php script developer.php writes quite some error messages to
/var/log/apache/error.log about dpkg.

Use this command on merkel:

   tail -f /var/log/apache/error.log

and see many lines about dpkg appear, including this one:

   dpkg: --compare-versions takes three arguments: <version> <relation> <version>

The php script developer.php uses "dpkg --compare-versions..." in the functions
"ver_comp" and "compare_versions".  In function "ver_comp" argument $a can contain "-",
so not a real version number.

Use this command to reproduce the logged error message:

    dpkg --compare-versions '-' gt '2.21.0.0'

One solution is to modify function ver_comp to treat "-" with return 3.
Another solution could be to escape the dash, so make it "\-".

Patch:

--- /org/qa.debian.org/web/developer.php	2009-07-25 00:28:47.000000000 +0200
+++ developer.php	2009-08-30 17:05:02.000000000 +0200
@@ -526,6 +526,8 @@
     return $debvers;
 }
 function ver_comp($a, $b, $mangle = true) {
+  if( $a == "-" )
+    return 3;
   exec('dpkg --compare-versions ' . escapeshellarg($a) . ' gt ' . escapeshellarg($mangle? vers_conv($b) : $b),$output,$res);
   if ($res==0) return 1;
   exec('dpkg --compare-versions ' . escapeshellarg($a) . ' lt ' . escapeshellarg($mangle? vers_conv($b) : $b),$output,$res);

Regards,

Bart Martens



--- End Message ---
--- Begin Message ---
Version: 2334

This bug was closed by Christoph Berg (myon) in SVN revision 2334.
Note that it might take some time until the qa.debian.org code has
been updated and cronjobs have picked up changed data.

Commit message:

Do not call dpkg --compare-versions when one argument is "-". Spotted by Bart Martens, thanks! (Closes: #544315)




--- End Message ---

Reply to: