summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/contrib/fileutl.cc9
-rw-r--r--apt-pkg/deb/debindexfile.cc5
-rw-r--r--apt-pkg/deb/dpkgpm.cc9
-rw-r--r--debian/changelog11
-rw-r--r--doc/examples/configure-index1
5 files changed, 33 insertions, 2 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 767951daf..50019872e 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -67,6 +67,15 @@ bool RunScripts(const char *Cnf)
// This is the child
if (Child == 0)
{
+ if (_config->FindDir("DPkg::Chroot-Directory","/") != "/")
+ {
+ std::cerr << "Chrooting into "
+ << _config->FindDir("DPkg::Chroot-Directory")
+ << std::endl;
+ if (chroot(_config->FindDir("DPkg::Chroot-Directory","/").c_str()) != 0)
+ _exit(100);
+ }
+
if (chdir("/tmp/") != 0)
_exit(100);
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index 9961b5ae4..1e8c04033 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -66,7 +66,10 @@ pkgSrcRecords::Parser *debSourcesIndex::CreateSrcParser() const
string SourcesURI = _config->FindDir("Dir::State::lists") +
URItoFileName(IndexURI("Sources"));
string SourcesURIgzip = SourcesURI + ".gz";
- if (!FileExists(SourcesURI) && FileExists(SourcesURIgzip))
+
+ if (!FileExists(SourcesURI) && !FileExists(SourcesURIgzip))
+ return NULL;
+ else if (!FileExists(SourcesURI) && FileExists(SourcesURIgzip))
SourcesURI = SourcesURIgzip;
return new debSrcRecordParser(SourcesURI,this);
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index f56e258e3..eeb57f715 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -308,6 +308,15 @@ bool pkgDPkgPM::RunScriptsWithPkgs(const char *Cnf)
SetCloseExec(STDIN_FILENO,false);
SetCloseExec(STDERR_FILENO,false);
+ if (_config->FindDir("DPkg::Chroot-Directory","/") != "/")
+ {
+ std::cerr << "Chrooting into "
+ << _config->FindDir("DPkg::Chroot-Directory")
+ << std::endl;
+ if (chroot(_config->FindDir("DPkg::Chroot-Directory","/").c_str()) != 0)
+ _exit(100);
+ }
+
const char *Args[4];
Args[0] = "/bin/sh";
Args[1] = "-c";
diff --git a/debian/changelog b/debian/changelog
index 34a544b44..6b88f84bf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+apt (0.8.11.5ubuntu2) natty; urgency=low
+
+ [ Michael Vogt ]
+ * apt-pkg/deb/debindexfile.cc:
+ - ignore missing deb-src files in /var/lib/apt/lists, thanks
+ to Thorsten Spindler (LP: #85590)
+ * apt-pkg/contrib/fileutl.cc, apt-pkg/deb/dpkgpm.cc:
+ - honor Dpkg::Chroot-Directory in the RunScripts*() methods
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 03 Mar 2011 17:39:30 +0100
+
apt (0.8.11.5ubuntu1) natty; urgency=low
* Merged from debian/sid
diff --git a/doc/examples/configure-index b/doc/examples/configure-index
index 6119d67d0..03a37287d 100644
--- a/doc/examples/configure-index
+++ b/doc/examples/configure-index
@@ -385,7 +385,6 @@ DPkg
{
// let apt aggressivly use dpkg triggers
NoTriggers "true";
- NoConfigure "true";
ConfigurePending "true";
// Probably don't want to use force-downgrade..