X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/916e5cb41edfa015fd8ec42ba140eb7c0c4cb511..ea606ec43a364a8e471fd9502d79fe2dfeb6e4ba:/apt-pkg/deb/debmetaindex.cc diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 345b1ec11..6fd12add8 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -9,8 +9,15 @@ #include #include #include -#include - +#include +#include +#include + +#include +#include +#include +#include +#include #include #include @@ -35,7 +42,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 +77,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