Package: cvsps
Version: 2.1-2
Severity: normal
Tags: patch

Hi,

cvsps fails against a FreeBSD CVS pserver. By fails I mean it fails back
to using the 'log' command rather the 'rlog' which would give me stable
patchsets.

cvsps requires the remote pserver to be 1.11.1 or later for rlog to
work and, indeed, the other side is a later version. Unfortunately
FreeBSD have, misguidedly, modified the version string such that cvsps
misdetects things.

Attached is a patch which fixes that.  Please apply.

Thanks,
Anand

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (650, 'testing'), (600, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)

Versions of packages cvsps depends on:
ii  cvs                          1:1.12.9-17 Concurrent Versions System
ii  libc6                        2.3.5-13    GNU C Library: Shared libraries an
ii  zlib1g                       1:1.2.3-9   compression library - runtime

cvsps recommends no packages.

-- no debconf information
diff -u cvsps-2.1/debian/changelog cvsps-2.1/debian/changelog
--- cvsps-2.1/debian/changelog
+++ cvsps-2.1/debian/changelog
@@ -1,4 +1,10 @@
+cvsps (2.1-2) unstable; urgency=low
+
+  * Handle CVS pserver whose version string has been corrupted (e.g. FreeBSD)
+
+ -- Anand Kumria <[EMAIL PROTECTED]>  Wed, 22 Mar 2006 23:46:35 +1100
+
 cvsps (2.1-1) unstable; urgency=low
 
   * New upstream version.
--- cvsps-2.1.orig/cap.c
+++ cvsps-2.1/cap.c
@@ -121,12 +121,20 @@
 	return 0;
     }
 
+    /* We might have encountered a FreeBSD system which
+     * has a mucked up version string of:
+     *  Concurrent Versions System (CVS) '1.11.17'-FreeBSD (client/server)
+     * so re-test just in case
+     */
     p += skip;
     if (sscanf(p, "%d.%d.%d", &major, &minor, &extra) != 3)
     {	
-	debug(DEBUG_APPMSG1, "WARNING: malformed CVS version: %s", str);
-	return 0;
+        if (sscanf(p, "'%d.%d.%d'", &major, &minor, &extra) != 3)
+	{
+		debug(DEBUG_APPMSG1, "WARNING: malformed CVS version: %s", str);
+		return 0;
+	}
     }
 
     return (major > req_major || 

Reply via email to