From c427b1e218e61bd1aacbddf9013e58b8aa445a7c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 29 Nov 2010 21:43:07 +0100 Subject: * apt-pkg/algorithms.cc: - mark all installed packages first without auto installation in a dist-upgrade to prefer upgrading packages instead of installing new packages in versioned or-groups (Closes: #605394) --- apt-pkg/algorithms.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 9abb7a947..0fbce3c2a 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -374,6 +374,13 @@ bool pkgDistUpgrade(pkgDepCache &Cache) { pkgDepCache::ActionGroup group(Cache); + /* Upgrade all installed packages first without autoinst to help the resolver + in versioned or-groups to upgrade the old solver instead of installing + a new one (if the old solver is not the first one [anymore]) */ + for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I) + if (I->CurrentVer != 0) + Cache.MarkInstall(I, false, 0, false); + /* Auto upgrade all installed packages, this provides the basis for the installation */ for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) -- cgit v1.2.3 From 710aba4a9c0edd415e5daabb497ee8fffe803a96 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 1 Feb 2011 15:51:29 +0100 Subject: * apt-pkg/cdrom.cc, apt-pkg/init.cc, methods/cdrom.cc: - use /media/cdrom as default mountoint (closes: #611569) --- apt-pkg/cdrom.cc | 4 ++-- apt-pkg/init.cc | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 0e36f44a2..124410b11 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -198,7 +198,7 @@ int pkgCdrom::Score(string Path) // a symlink gets a big penalty struct stat Buf; string statPath = flNotFile(Path); - string cdromPath = _config->FindDir("Acquire::cdrom::mount","/cdrom/"); + string cdromPath = _config->FindDir("Acquire::cdrom::mount"); while(statPath != cdromPath && statPath != "./") { statPath.resize(statPath.size()-1); // remove the trailing '/' if (lstat(statPath.c_str(),&Buf) == 0) { @@ -509,7 +509,7 @@ bool pkgCdrom::Ident(string &ident, pkgCdromStatus *log) /*{{{*/ stringstream msg; // Startup - string CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/"); + string CDROM = _config->FindDir("Acquire::cdrom::mount"); if (CDROM[0] == '.') CDROM= SafeGetCWD() + '/' + CDROM; diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index f0bad78df..184942321 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -52,7 +52,7 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.Set("Dir::State::lists","lists/"); Cnf.Set("Dir::State::cdroms","cdroms.list"); Cnf.Set("Dir::State::mirrors","mirrors/"); - + // Cache Cnf.Set("Dir::Cache","var/cache/apt/"); Cnf.Set("Dir::Cache::archives","archives/"); @@ -88,6 +88,9 @@ bool pkgInitConfig(Configuration &Cnf) // Translation Cnf.Set("APT::Acquire::Translation", "environment"); + // Default cdrom mount point + Cnf.Set("Acquire::cdrom::mount", "/media/cdrom/"); + bool Res = true; // Read an alternate config file -- cgit v1.2.3 From a92392501b5981b41da8497a99f5964e2f6075b0 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 1 Feb 2011 18:41:56 +0100 Subject: apt-pkg/cdrom.cc: fix another hardcoded /cdrom --- apt-pkg/cdrom.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 124410b11..04ace10a6 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -568,7 +568,7 @@ bool pkgCdrom::Add(pkgCdromStatus *log) /*{{{*/ stringstream msg; // Startup - string CDROM = _config->FindDir("Acquire::cdrom::mount","/cdrom/"); + string CDROM = _config->FindDir("Acquire::cdrom::mount"); if (CDROM[0] == '.') CDROM= SafeGetCWD() + '/' + CDROM; -- cgit v1.2.3