diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-03-16 22:32:48 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-03-16 23:29:45 +0100 |
commit | a38cec81d349525c447004ef8fe9dc942c8bd9bb (patch) | |
tree | 4df4852338d8f528a90f374937f37d7acf6ddd12 /apt-pkg | |
parent | 5f060c2776606f3166bd6c64119c31be8ba5d857 (diff) |
do not strip epochs from state version strings
The epoch stripping in this code is done since day one, but in other
places we show a version epochs are not stripped. If epochs are present
in packages they tend to be an important information which we can't just
drop and especially can't drop "sometimes" as that confuses users and
tools alike – so even if removing code in use for (close to) 18 years
feels wrong, it is probably the right choice for consistency.
Closes: 818162
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/depcache.cc | 6 | ||||
-rw-r--r-- | apt-pkg/depcache.h | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index dd18305d2..4940387a6 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1700,11 +1700,7 @@ void pkgDepCache::StateCache::Update(PkgIterator Pkg,pkgCache &Cache) CurVersion = ""; if (Pkg->CurrentVer != 0) CurVersion = Pkg.CurrentVer().VerStr(); - - // Strip off the epochs for display - CurVersion = StripEpoch(CurVersion); - CandVersion = StripEpoch(CandVersion); - + // Figure out if its up or down or equal Status = Ver.CompareVer(Pkg.CurrentVer()); if (Pkg->CurrentVer == 0 || Pkg->VersionList == 0 || CandidateVer == 0) diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 10f869f25..99d0e7a63 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -209,7 +209,7 @@ class pkgDepCache : protected pkgCache::Namespace struct StateCache { - // Epoch stripped text versions of the two version fields + // text versions of the two version fields const char *CandVersion; const char *CurVersion; @@ -240,7 +240,7 @@ class pkgDepCache : protected pkgCache::Namespace unsigned char DepState; // DepState Flags // Update of candidate version - const char *StripEpoch(const char *Ver) APT_PURE; + APT_DEPRECATED_MSG("Use the method of the same name in contrib/strutl.h instead if you must") const char *StripEpoch(const char *Ver) APT_PURE; void Update(PkgIterator Pkg,pkgCache &Cache); // Various test members for the current status of the package |