summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-03-26 17:02:27 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-03-26 17:02:27 +0100
commit1c56c17a3c5548a3bb86c0d7967c0f790c7c2cca (patch)
tree0b99e9d904fc0d1292261a03d0932e4911797103
parent3226fe2bef62975976ebab7522759428a813ad4d (diff)
cherry pick -r 1956..1957 lp:~donkult/apt/sid
-rw-r--r--apt-pkg/deb/debversion.cc18
-rw-r--r--debian/changelog9
2 files changed, 25 insertions, 2 deletions
diff --git a/apt-pkg/deb/debversion.cc b/apt-pkg/deb/debversion.cc
index ad45e9a44..755ffbe96 100644
--- a/apt-pkg/deb/debversion.cc
+++ b/apt-pkg/deb/debversion.cc
@@ -190,8 +190,22 @@ int debVersioningSystem::DoCmpVersion(const char *A,const char *AEnd,
dlhs++;
if (drhs != rhs)
drhs++;
-
- return CmpFragment(dlhs,AEnd,drhs,BEnd);
+
+ // no debian revision need to be treated like -0
+ if (*(dlhs-1) == '-' && *(drhs-1) == '-')
+ return CmpFragment(dlhs,AEnd,drhs,BEnd);
+ else if (*(dlhs-1) == '-')
+ {
+ const char* null = "0";
+ return CmpFragment(dlhs,AEnd,null, null+1);
+ }
+ else if (*(drhs-1) == '-')
+ {
+ const char* null = "0";
+ return CmpFragment(null, null+1, drhs, BEnd);
+ }
+ else
+ return 0;
}
/*}}}*/
// debVS::CheckDep - Check a single dependency /*{{{*/
diff --git a/debian/changelog b/debian/changelog
index 4164fd726..bf07b9f30 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+apt (0.7.25.3ubuntu4) UNRELEASED; urgency=low
+
+ [ David Kalnischkies ]
+ * apt-pkg/deb/debversion.cc:
+ - consider absent of debian revision equivalent to 0 (Closes: #573592)
+ LP: #540228
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 26 Mar 2010 16:57:49 +0100
+
apt (0.7.25.3ubuntu3) lucid; urgency=low
* apt-pkg/indexfile.cc: