summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-01-26 19:17:11 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-01-26 19:17:11 +0100
commitd17f2b1b748c8d297474707cfc9706f673ef0346 (patch)
treec34bd4fa12a0b5d8b35ade9978d5018853d3c110 /apt-pkg
parentb7aa74a1859e3be00f3a20b0956d1cb93d62df5b (diff)
parse version correctly from binary Source field
In commit a221efc331693f8905da870141756c892911c433 I promoted the source package name and version to the binary cache for faster access by e.g. EDSP, but due to changing the interpretation length to soon we always ignored the version part of the Source field, so that packages ended up having the binary version as source version – which while usually just fine it is wrong for binary rebuilds. Closes: 812492
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/deblistparser.cc2
-rw-r--r--apt-pkg/pkgcache.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 090673db2..63343005b 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -154,7 +154,6 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
if (Space != NULL)
{
- Stop = Space;
const char * const Open = (const char * const) memchr(Space, '(', Stop - Space);
if (likely(Open != NULL))
{
@@ -169,6 +168,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
}
}
}
+ Stop = Space;
}
std::string const pkgname(Start, Stop - Start);
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index d6dd169bb..c9c338e1e 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -59,7 +59,7 @@ pkgCache::Header::Header()
/* Whenever the structures change the major version should be bumped,
whenever the generator changes the minor version should be bumped. */
APT_HEADER_SET(MajorVersion, 10);
- APT_HEADER_SET(MinorVersion, 4);
+ APT_HEADER_SET(MinorVersion, 5);
APT_HEADER_SET(Dirty, false);
APT_HEADER_SET(HeaderSz, sizeof(pkgCache::Header));