From d958636fdf39d8b1f08239f9981c8b6520bde7a6 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 5 Dec 2013 07:53:53 +0100 Subject: add new LocalFileName() method to metaindex --- cmdline/apt-get.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index c38fd2d31..7e59f3d67 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -136,16 +136,12 @@ bool TryToInstallBuildDep(pkgCache::PkgIterator Pkg,pkgCacheFile &Cache, /*}}}*/ -// FIXME: move into more generic code (metaindex ?) +// helper that can go wit hthe next ABI break #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13) std::string MetaIndexFileNameOnDisk(metaIndex *metaindex) { // FIXME: this cast is the horror, the horror debReleaseIndex *r = (debReleaseIndex*)metaindex; -#else -std::string MetaIndexFileNameOnDisk(metaIndex *r) -{ -#endif // see if we have a InRelease file std::string PathInRelease = r->MetaIndexFile("InRelease"); @@ -158,7 +154,7 @@ std::string MetaIndexFileNameOnDisk(metaIndex *r) return ""; } - +#endif // GetReleaseForSourceRecord - Return Suite for the given srcrecord /*{{{*/ // --------------------------------------------------------------------- @@ -178,7 +174,11 @@ std::string GetReleaseForSourceRecord(pkgSourceList *SrcList, { if (&CurrentIndexFile == (*IF)) { +#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13) std::string path = MetaIndexFileNameOnDisk(*S); +#else + std::string path = (*S)->LocalFileName(); +#endif if (path != "") { indexRecords records; -- cgit v1.2.3