summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2019-02-04 12:44:08 +0000
committerJulian Andres Klode <jak@debian.org>2019-02-04 12:44:08 +0000
commit3a015964dd56edf897ee062b2eafa2cfc0584380 (patch)
treeb7c47f960d6281195ea7fd3f90a6404b939df134 /apt-pkg/acquire-item.cc
parentd5dcc2e9d3008b57c3fae0bcb5b1c2a197f5430c (diff)
parentc2b9b0489538fed4770515bd8853a960b13a2618 (diff)
Merge branch 'pu/dead-pin' into 'master'
A pin of -32768 overrides any other, disables repo See merge request apt-team/apt!40
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r--apt-pkg/acquire-item.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 755e1fb59..bb3bc1b56 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -25,6 +25,7 @@
#include <apt-pkg/hashes.h>
#include <apt-pkg/indexfile.h>
#include <apt-pkg/metaindex.h>
+#include <apt-pkg/netrc.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/pkgrecords.h>
#include <apt-pkg/sourcelist.h>
@@ -3394,6 +3395,7 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *const Owner, pkgSourceList *const Sourc
StoreFilename.clear();
std::set<string> targetComponents, targetCodenames, targetSuites;
+ std::vector<std::unique_ptr<FileFd>> authconfs;
for (auto Vf = Version.FileList(); Vf.end() == false; ++Vf)
{
auto const PkgF = Vf.File();
@@ -3401,6 +3403,8 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire *const Owner, pkgSourceList *const Sourc
continue;
if (PkgF.Flagged(pkgCache::Flag::NotSource))
continue;
+ if (PkgF.Flagged(pkgCache::Flag::PackagesRequireAuthorization) && !IsAuthorized(PkgF, authconfs))
+ continue;
pkgIndexFile *Index;
if (Sources->FindIndex(PkgF, Index) == false)
continue;