]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debmetaindex.cc
Merge remote-tracking branch 'mvo/debian/sid' into debian/sid
[apt.git] / apt-pkg / deb / debmetaindex.cc
index 345b1ec118cbec2ab8c4d632546f5da84d3dfc5b..504877558c5d82670c04f0ad8c39999b7531fd5a 100644 (file)
@@ -35,7 +35,6 @@ string debReleaseIndex::Info(const char *Type, string const &Section, string con
    return Info;
 }
 
-#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13)
 string debReleaseIndex::MetaIndexInfo(const char *Type) const
 {
    string Info = ::URI::SiteOnly(URI) + ' ';
@@ -71,6 +70,21 @@ string debReleaseIndex::MetaIndexURI(const char *Type) const
    Res += Type;
    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