diff options
author | Michael Vogt <egon@bottom> | 2006-05-17 17:58:24 +0200 |
---|---|---|
committer | Michael Vogt <egon@bottom> | 2006-05-17 17:58:24 +0200 |
commit | 4f5bd4471049f89c4ce52864e62f54aadf1804d4 (patch) | |
tree | 25284272f8e1ccfc3450166a01308c21db7223c0 /apt-pkg/deb | |
parent | 131a2dc0cb36c29d002c2a61f96411e5d84f4adf (diff) | |
parent | 8c64fc132ce0743f02b4d7216a3646a8fb93d8b6 (diff) |
merged with the debian-sid branch
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r-- | apt-pkg/deb/debversion.cc | 23 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 8 |
2 files changed, 26 insertions, 5 deletions
diff --git a/apt-pkg/deb/debversion.cc b/apt-pkg/deb/debversion.cc index aeee61929..064d8fa5b 100644 --- a/apt-pkg/deb/debversion.cc +++ b/apt-pkg/deb/debversion.cc @@ -59,7 +59,7 @@ int debVersioningSystem::CmpFragment(const char *A,const char *AEnd, } /* Iterate over the whole string - What this does is to spilt the whole string into groups of + What this does is to split the whole string into groups of numeric and non numeric portions. For instance: a67bhgs89 Has 4 portions 'a', '67', 'bhgs', '89'. A more normal: @@ -140,6 +140,27 @@ int debVersioningSystem::DoCmpVersion(const char *A,const char *AEnd, if (rhs == BEnd) rhs = B; + // Special case: a zero epoch is the same as no epoch, + // so remove it. + if (lhs != A) + { + for (; *A == '0'; ++A); + if (A == lhs) + { + ++A; + ++lhs; + } + } + if (rhs != B) + { + for (; *B == '0'; ++B); + if (B == rhs) + { + ++B; + ++rhs; + } + } + // Compare the epoch int Res = CmpFragment(A,lhs,B,rhs); if (Res != 0) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index fe8fbca74..667db8ff2 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -375,8 +375,8 @@ bool pkgDPkgPM::Go(int OutStatusFd) }, // Purge operation { - {"config-files", _("Preparing for remove with config %s")}, - {"not-installed", _("Removed with config %s")}, + {"config-files", _("Preparing to completely remove %s")}, + {"not-installed", _("Completely removed %s")}, {NULL, NULL} }, }; @@ -623,8 +623,8 @@ bool pkgDPkgPM::Go(int OutStatusFd) 'status: conffile-prompt: conffile : 'current-conffile' 'new-conffile' useredited distedited */ - char* list[4]; - TokSplitString(':', line, list, 5); + char* list[5]; + TokSplitString(':', line, list, sizeof(list)/sizeof(list[0])); char *pkg = list[1]; char *action = _strstrip(list[2]); |