summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debversion.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:03:39 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:03:39 +0000
commit74c1e22b4a6b7c8d89e5d563f7a1f48d25b38fef (patch)
treeb16cf58a360ec9e995d42bea1e409aefb146f1c9 /apt-pkg/deb/debversion.cc
parentc8ca0ce1e16444e632d1e7cda0b787cd4b2b2db5 (diff)
* Patch from Koblinger Egmont <egmont@uhulinux.hu> to f...
Author: mdz Date: 2003-09-10 23:39:49 GMT * Patch from Koblinger Egmont <egmont@uhulinux.hu> to fix version comparisons with '~' (Closes: #205960)
Diffstat (limited to 'apt-pkg/deb/debversion.cc')
-rw-r--r--apt-pkg/deb/debversion.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/apt-pkg/deb/debversion.cc b/apt-pkg/deb/debversion.cc
index e6132bea8..aeee61929 100644
--- a/apt-pkg/deb/debversion.cc
+++ b/apt-pkg/deb/debversion.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: debversion.cc,v 1.7 2003/07/18 14:13:59 mdz Exp $
+// $Id: debversion.cc,v 1.8 2003/09/10 23:39:49 mdz Exp $
/* ######################################################################
Debian Version - Versioning system for Debian
@@ -48,9 +48,15 @@ int debVersioningSystem::CmpFragment(const char *A,const char *AEnd,
if (A >= AEnd && B >= BEnd)
return 0;
if (A >= AEnd)
+ {
+ if (*B == '~') return 1;
return -1;
+ }
if (B >= BEnd)
+ {
+ if (*A == '~') return -1;
return 1;
+ }
/* Iterate over the whole string
What this does is to spilt the whole string into groups of
@@ -101,11 +107,17 @@ int debVersioningSystem::CmpFragment(const char *A,const char *AEnd,
// lhs is shorter
if (lhs == AEnd)
+ {
+ if (*rhs == '~') return 1;
return -1;
+ }
// rhs is shorter
if (rhs == BEnd)
+ {
+ if (*lhs == '~') return -1;
return 1;
+ }
// Shouldnt happen
return 1;