From 1aadba5adf0c32a44548baea9ba734336a578387 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 25 Feb 2011 12:29:13 +0100 Subject: * apt-pkg/deb/debindexfile.cc: - ignore missing deb-src files in /var/lib/apt/lists, thanks to Thorsten Spindler (LP: #85590) --- apt-pkg/deb/debindexfile.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apt-pkg/deb') 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); -- cgit v1.2.3 From cfba4f6908927f46289f9fd945af02f12ee74412 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 3 Mar 2011 17:09:30 +0100 Subject: * apt-pkg/contrib/fileutl.cc, apt-pkg/deb/dpkgpm.cc: - honor Dpkg::Chroot-Directory in the RunScripts*() methods --- apt-pkg/deb/dpkgpm.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 7d0d34a46..5747f1164 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"; -- cgit v1.2.3