summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2012-07-27 19:18:59 +0200
committerMichael Vogt <egon@debian-devbox>2012-07-27 19:18:59 +0200
commitb9c917bd62e7b1eb227d4f3a7321559ddb96e494 (patch)
tree3169d9875a6b94fbf03d3eb8ab265e67b40d4b25 /apt-pkg
parent24123a1f4341dfc45481af1a8462d7f9aeecc746 (diff)
parentfbda0ee9d9f5ecd34d38f0e416837e8ef3a10f68 (diff)
merged from david0.9.7.3
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/cacheset.cc2
-rw-r--r--apt-pkg/contrib/mmap.cc15
-rw-r--r--apt-pkg/packagemanager.cc2
3 files changed, 16 insertions, 3 deletions
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc
index 784d1f0bf..1fea4f94a 100644
--- a/apt-pkg/cacheset.cc
+++ b/apt-pkg/cacheset.cc
@@ -193,6 +193,8 @@ bool PackageContainerInterface::FromGroup(PackageContainerInterface * const pci,
if (archfound != std::string::npos) {
arch = pkg.substr(archfound+1);
pkg.erase(archfound);
+ if (arch == "all" || arch == "native")
+ arch = _config->Find("APT::Architecture");
}
pkgCache::GrpIterator Grp = Cache.GetPkgCache()->FindGrp(pkg);
diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc
index 593bb063b..3e6ef3520 100644
--- a/apt-pkg/contrib/mmap.cc
+++ b/apt-pkg/contrib/mmap.cc
@@ -102,6 +102,7 @@ bool MMap::Map(FileFd &Fd)
{
// for readonly, we don't need sync, so make it simple
Base = malloc(iSize);
+ SyncToFd = new FileFd();
return Fd.Read(Base, iSize);
}
// FIXME: Writing to compressed fd's ?
@@ -216,7 +217,17 @@ DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long const &Work
{
if (_error->PendingError() == true)
return;
-
+
+ // disable Moveable if we don't grow
+ if (Grow == 0)
+ this->Flags &= ~Moveable;
+
+#ifndef __linux__
+ // kfreebsd doesn't have mremap, so we use the fallback
+ if ((this->Flags & Moveable) == Moveable)
+ this->Flags |= Fallback;
+#endif
+
unsigned long long EndOfFile = Fd->Size();
if (EndOfFile > WorkSpace)
WorkSpace = EndOfFile;
@@ -328,7 +339,7 @@ unsigned long DynamicMMap::RawAllocate(unsigned long long Size,unsigned long Aln
if(!Grow())
{
_error->Fatal(_("Dynamic MMap ran out of room. Please increase the size "
- "of APT::Cache-Limit. Current value: %lu. (man 5 apt.conf)"), WorkSpace);
+ "of APT::Cache-Start. Current value: %lu. (man 5 apt.conf)"), WorkSpace);
return 0;
}
}
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index 46fc499c6..b93bf6ab9 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -643,7 +643,7 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
}
// Look for something that could be configured.
- for (DepIterator Cur = Start; Bad == true; ++Cur)
+ for (DepIterator Cur = Start; Bad == true && Cur.end() == false; ++Cur)
{
SPtrArray<Version *> VList = Cur.AllTargets();
for (Version **I = VList; *I != 0; ++I)