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) --- debian/changelog | 3 +++ 1 file changed, 3 insertions(+) (limited to 'debian/changelog') diff --git a/debian/changelog b/debian/changelog index 986b6f876..68c83808b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ apt (0.8.12) UNRELEASED; urgency=low mistake reported in bug LP: #641673, thanks to Robert Roth * merged lp:~evfool/apt/fix418552: - Grammar fix for bug LP: #418552, thanks to Robert Roth + * apt-pkg/deb/debindexfile.cc: + - ignore missing deb-src files in /var/lib/apt/lists, thanks + to Thorsten Spindler (LP: #85590) -- Michael Vogt Thu, 10 Feb 2011 17:37:56 +0100 -- cgit v1.2.3-70-g09d2 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/contrib/fileutl.cc | 9 +++++++++ apt-pkg/deb/dpkgpm.cc | 9 +++++++++ debian/changelog | 2 ++ 3 files changed, 20 insertions(+) (limited to 'debian/changelog') diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 52f517ee0..935c4bebf 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -62,6 +62,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/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"; diff --git a/debian/changelog b/debian/changelog index 68c83808b..ff5675a0c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ apt (0.8.12) UNRELEASED; urgency=low * 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 Thu, 10 Feb 2011 17:37:56 +0100 -- cgit v1.2.3-70-g09d2 From c9952021ba65db0581f6053cd6d6e8bf7d563e8f Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 10 Mar 2011 11:13:44 +0100 Subject: * apt-pkg/contrib/cdromutl.{cc,h}, apt-pkg/cdrom.{cc,h}: - deal with missing FSTAB_DIR when using libudev to discover cdrom - add experimental APT::cdrom::CdromOnly option (on by default). When this is set to false apt-cdrom will handle any removable deivce (like a usb-stick) as a "cdrom/dvd" source --- apt-pkg/cdrom.cc | 3 ++- debian/changelog | 5 +++++ doc/examples/configure-index | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'debian/changelog') diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 83438f1c4..55600fe57 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -875,7 +875,8 @@ pkgUdevCdromDevices::Dlopen() /*{{{*/ vector pkgUdevCdromDevices::Scan() { - return ScanForRemovable(true); + bool CdromOnly = _config->FindB("APT::cdrom::CdromOnly", true); + return ScanForRemovable(CdromOnly); }; /*}}}*/ /*{{{*/ diff --git a/debian/changelog b/debian/changelog index ff5675a0c..fba168110 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,11 @@ apt (0.8.12) UNRELEASED; urgency=low to Thorsten Spindler (LP: #85590) * apt-pkg/contrib/fileutl.cc, apt-pkg/deb/dpkgpm.cc: - honor Dpkg::Chroot-Directory in the RunScripts*() methods + * apt-pkg/contrib/cdromutl.{cc,h}, apt-pkg/cdrom.{cc,h}: + - deal with missing FSTAB_DIR when using libudev to discover cdrom + - add experimental APT::cdrom::CdromOnly option (on by default). + When this is set to false apt-cdrom will handle any removable + deivce (like a usb-stick) as a "cdrom/dvd" source -- Michael Vogt Thu, 10 Feb 2011 17:37:56 +0100 diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 03a37287d..6884e06e3 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -265,7 +265,10 @@ Acquire cdrom { // do auto detection of the cdrom mountpoint - AutoDetect "true"; + AutoDetect "true"; + // when auto-detecting, only look for cdrom/dvd. when this is false + // it will support any removable device as a "cdrom" source + CdromOnly "true"; // cdrom mountpoint (needs to be defined in fstab if AutoDetect is not used) mount "/cdrom"; -- cgit v1.2.3-70-g09d2