[Popcon-commits] cvs commit to popularity-contest by pere

pere at cvs.alioth.debian.org pere at cvs.alioth.debian.org
Mon Jul 18 06:19:54 UTC 2005


Update of /cvsroot/popcon/popularity-contest
In directory haydn:/tmp/cvs-serv4425

Modified Files:
	popularity-contest 
Log Message:
Change code for detecting old dpkg version to avoid error message when dpkg-query is missing.

Index: popularity-contest
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/popularity-contest,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- popularity-contest	4 Jul 2005 21:47:20 -0000	1.13
+++ popularity-contest	18 Jul 2005 06:19:44 -0000	1.14
@@ -60,12 +60,16 @@
 
 # Set if dpkg package version is older than 1.10, thus missing dpkg-query.
 my $olddpkg = 0;
+if ( ! -x "/usr/bin/dpkg-query" ) {
+    $olddpkg = 1;
+}
 
 # Popcon release
-my $popconver=`dpkg-query --showformat='\${version}' --show popularity-contest 2>/dev/null`;
-if ($?) {
+my $popconver;
+if ($olddpkg) {
     $popconver = `dpkg-awk "Package: *popularity-contest.*" -- Version|grep ^Version|sed 's/^Version: //'`;
-    $olddpkg = 1;
+} else {
+    $popconver=`dpkg-query --showformat='\${version}' --show popularity-contest 2>/dev/null`;
 }
 
 # Initialise time computations




More information about the Popcon-commits mailing list