summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-12-05 07:53:53 +0100
committerMichael Vogt <mvo@debian.org>2013-12-05 07:53:53 +0100
commitd958636fdf39d8b1f08239f9981c8b6520bde7a6 (patch)
tree34fb658423e811a81acb3b2ba4c9093e88d1715c /cmdline/apt-get.cc
parent86e3c55052737d57f9d0123f8aaacd044774c698 (diff)
add new LocalFileName() method to metaindex
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;