summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/algorithms.cc11
-rw-r--r--apt-pkg/deb/debindexfile.cc4
-rw-r--r--apt-pkg/deb/deblistparser.cc11
-rw-r--r--apt-pkg/deb/deblistparser.h3
-rw-r--r--apt-pkg/depcache.cc3
5 files changed, 22 insertions, 10 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc
index 98bd8dd8b..dd16b5dc8 100644
--- a/apt-pkg/algorithms.cc
+++ b/apt-pkg/algorithms.cc
@@ -1330,11 +1330,12 @@ void pkgMarkPkgUsed(pkgDepCache &Cache, pkgCache::PkgIterator Pkg,
bool pkgMarkUsed(pkgDepCache &Cache)
{
// debug only
- for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); ! Pkg.end(); ++Pkg)
- if(!Cache[Pkg].Dirty() && Cache[Pkg].AutomaticRemove > 0)
- std::cout << "has auto-remove information: " << Pkg.Name()
- << " " << (int)Cache[Pkg].AutomaticRemove
- << std::endl;
+ if(_config->FindI("Debug::pkgAutoRemove",false) == true)
+ for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); ! Pkg.end(); ++Pkg)
+ if(!Cache[Pkg].Dirty() && Cache[Pkg].AutomaticRemove > 0)
+ std::cout << "has auto-remove information: " << Pkg.Name()
+ << " " << (int)Cache[Pkg].AutomaticRemove
+ << std::endl;
// init with defaults
for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); ! Pkg.end(); ++Pkg)
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index f26265fff..ff8bce85d 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -24,7 +24,7 @@
#include <apt-pkg/strutl.h>
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/debmetaindex.h>
-
+
#include <sys/stat.h>
/*}}}*/
@@ -290,7 +290,7 @@ bool debPackagesIndex::Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const
FileFd Rel(ReleaseFile,FileFd::ReadOnly);
if (_error->PendingError() == true)
return false;
- Parser.LoadReleaseInfo(File,Rel);
+ Parser.LoadReleaseInfo(File,Rel,Section);
}
return true;
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 96a80582d..25b533773 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -564,13 +564,20 @@ bool debListParser::Step()
// ---------------------------------------------------------------------
/* */
bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI,
- FileFd &File)
+ FileFd &File, string component)
{
pkgTagFile Tags(&File, File.Size() + 256); // XXX
pkgTagSection Section;
if (Tags.Step(Section) == false)
return false;
+ //mvo: I don't think we need to fill that in (it's unused since apt-0.6)
+ //FileI->Architecture = WriteUniqString(Arch);
+
+ // apt-secure does no longer download individual (per-section) Release
+ // file. to provide Component pinning we use the section name now
+ FileI->Component = WriteUniqString(component);
+
const char *Start;
const char *Stop;
if (Section.Find("Suite",Start,Stop) == true)
@@ -589,7 +596,7 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator FileI,
if (Section.FindFlag("NotAutomatic",FileI->Flags,
pkgCache::Flag::NotAutomatic) == false)
_error->Warning("Bad NotAutomatic flag");
-
+
return !_error->PendingError();
}
/*}}}*/
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index 9f305211a..3a0e0421b 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -55,7 +55,8 @@ class debListParser : public pkgCacheGenerator::ListParser
virtual bool Step();
- bool LoadReleaseInfo(pkgCache::PkgFileIterator FileI,FileFd &File);
+ bool LoadReleaseInfo(pkgCache::PkgFileIterator FileI,FileFd &File,
+ string section);
static const char *ParseDepends(const char *Start,const char *Stop,
string &Package,string &Ver,unsigned int &Op,
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index 269fe8543..54cfcb8bb 100644
--- a/apt-pkg/depcache.cc
+++ b/apt-pkg/depcache.cc
@@ -98,6 +98,9 @@ bool pkgDepCache::Init(OpProgress *Prog)
}
Update(Prog);
+
+ if(Prog != 0)
+ Prog->Done();
return true;
}