summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debmetaindex.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-01-06 07:51:45 +0100
committerMichael Vogt <mvo@debian.org>2014-01-06 07:51:45 +0100
commit1b4560fec66a6e7b2dff9aaa19095fb8423f69a0 (patch)
tree7fb2b63e31f356ef87af4699ba87b4f1443f508c /apt-pkg/deb/debmetaindex.cc
parent81d183681aea972fddd453d62109f8ccda3f447a (diff)
parent74d4bb26e09146b9d5f01889a676dc58ff5d63cd (diff)
Merge branch 'debian/sid' into feature/apt-manpage
Diffstat (limited to 'apt-pkg/deb/debmetaindex.cc')
-rw-r--r--apt-pkg/deb/debmetaindex.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index b597b6f3c..504877558 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -1,4 +1,3 @@
-// ijones, walters
#include <config.h>
#include <apt-pkg/debmetaindex.h>
@@ -72,6 +71,22 @@ string debReleaseIndex::MetaIndexURI(const char *Type) const
return Res;
}
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
+std::string debReleaseIndex::LocalFileName() const
+{
+ // see if we have a InRelease file
+ std::string PathInRelease = MetaIndexFile("InRelease");
+ if (FileExists(PathInRelease))
+ return PathInRelease;
+
+ // and if not return the normal one
+ if (FileExists(PathInRelease))
+ return MetaIndexFile("Release");
+
+ return "";
+}
+#endif
+
string debReleaseIndex::IndexURISuffix(const char *Type, string const &Section, string const &Arch) const
{
string Res ="";