summaryrefslogtreecommitdiff
path: root/apt-pkg/indexfile.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-05-19 15:19:43 +0000
committerJulian Andres Klode <jak@debian.org>2025-05-19 15:19:43 +0000
commitb4e745bfed0c06b1b7faeceeab32a02a76fb8a54 (patch)
tree475fdfe3b426378cfafecdc6cda09155af20b4db /apt-pkg/indexfile.cc
parent9a7e34d491b828a227930654d4f99e4fd2eb93ec (diff)
parent93416f3227685c390c7ab579981efde526134181 (diff)
Merge branch 'include-exclude' into 'main'
Add 'Include'/'Exclude' options to limit packages used from a repository See merge request apt-team/apt!439
Diffstat (limited to 'apt-pkg/indexfile.cc')
-rw-r--r--apt-pkg/indexfile.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc
index 1176903f4..a6da06029 100644
--- a/apt-pkg/indexfile.cc
+++ b/apt-pkg/indexfile.cc
@@ -324,7 +324,9 @@ pkgCacheListParser * pkgDebianIndexFile::CreateListParser(FileFd &Pkg)
bool pkgDebianIndexFile::Merge(pkgCacheGenerator &Gen,OpProgress * const Prog)
{
std::string const PackageFile = IndexFileName();
+ const IndexTarget *Target = nullptr;
FileFd Pkg;
+
if (OpenListFile(Pkg, PackageFile) == false)
return false;
_error->PushToStack();
@@ -339,7 +341,10 @@ bool pkgDebianIndexFile::Merge(pkgCacheGenerator &Gen,OpProgress * const Prog)
if (Prog != NULL)
Prog->SubProgress(0, GetProgressDescription());
- if (Gen.SelectFile(PackageFile, *this, GetArchitecture(), GetComponent(), GetIndexFlags()) == false)
+ if (auto tmp = dynamic_cast<pkgDebianIndexTargetFile *>(this))
+ Target = &tmp->Target;
+
+ if (Gen.SelectFile(PackageFile, *this, GetArchitecture(), GetComponent(), Target, GetIndexFlags()) == false)
return _error->Error("Problem with SelectFile %s",PackageFile.c_str());
// Store the IMS information