summaryrefslogtreecommitdiff
path: root/src/cstore/cstore.cpp
diff options
context:
space:
mode:
authorThomas Jepp <tom@tomjepp.co.uk>2015-11-23 17:12:18 +0000
committerThomas Jepp <tom@tomjepp.co.uk>2015-11-23 17:12:18 +0000
commitae41f9478892be200ecc45e2d831712136aac058 (patch)
treec7284934ddf657f72c1cc29fff877cbbb5657c79 /src/cstore/cstore.cpp
parent2fef9b9461cec9487f0df6648d8395b3475cb08e (diff)
downloadvyatta-cfg-ae41f9478892be200ecc45e2d831712136aac058.tar.gz
vyatta-cfg-ae41f9478892be200ecc45e2d831712136aac058.zip
Build fixes for updated libraries on Jessie.
Diffstat (limited to 'src/cstore/cstore.cpp')
-rw-r--r--src/cstore/cstore.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/cstore/cstore.cpp b/src/cstore/cstore.cpp
index 43abebd..485dcdb 100644
--- a/src/cstore/cstore.cpp
+++ b/src/cstore/cstore.cpp
@@ -28,6 +28,7 @@
// for debian's version comparison algorithm
#define APT_COMPATIBILITY 986
#include <apt-pkg/version.h>
+#include <apt-pkg/debversion.h>
#include <cli_cstore.h>
#include <cstore/cstore.hpp>
@@ -2023,7 +2024,14 @@ Cstore::assert_internal(bool cond, const char *fmt, ...)
bool
Cstore::sort_func_deb_version(string a, string b)
{
- return (pkgVersionCompare(a, b) < 0);
+ debVersioningSystem debVersioning;
+
+ const char* A = a.c_str();
+ const char* B = b.c_str();
+ const char* Aend = A + a.length();
+ const char* Bend = B + b.length();
+
+ return debVersioning.DoCmpVersion(A, Aend, B, Bend) > 0;
}
void
@@ -2987,6 +2995,7 @@ Cstore::vexit_internal(const char *fmt, va_list alist)
char buf[256];
vsnprintf(buf, 256, fmt, alist);
output_internal("%s\n", buf);
+ fprintf(stderr, "DEBUG vexit_internal: %s\n", buf); // DEBUG
if (Perl_get_context()) {
/* we're in a perl context. do a croak to provide more information.
* note that the message should not end in "\n", or the croak message