summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc12
1 files changed, 6 insertions, 6 deletions
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;