From 3772dc74d3e7767980a011e01302dd688b3764fc Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 16 Sep 2006 12:30:38 +0200 Subject: [PATCH] * reverted otavios patch again because it breaks the following behaviour: A depends on X|Y B depends on Y With the old code we get: "apt-get install A B": we get "A B X Y" "apt-get install B A": we get "A B Y" With the new code there is no way to get this right and we always end up with "A B X Y" because we just go over the packages in the order that they are in the cache and run MarkInstall(AutoInstall=true) on them then. When A comes before B we always end up with the unneeded X dependency. --- cmdline/apt-get.cc | 19 ++++--------------- configure.in | 2 +- debian/changelog | 4 +--- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index b33a324ea..64882e3e8 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1144,7 +1144,10 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, } else ExpectedInst++; - + + // Install it with autoinstalling enabled. + if (State.InstBroken() == true && BrokenFix == false) + Cache.MarkInstall(Pkg,true); return true; } /*}}}*/ @@ -1535,20 +1538,6 @@ bool DoInstall(CommandLine &CmdL) } } - for (unsigned J = 0; J < Cache->Head().PackageCount; J++) - { - pkgCache::PkgIterator I(Cache,Cache.List[J]); - if ((*Cache)[I].Install() == false) - continue; - - pkgDepCache::StateCache &State = Cache[I]; - // Install it with autoinstalling enabled (if we not respect the minial - // required deps or the policy) - if (State.InstBroken() == true && BrokenFix == false) - Cache->MarkInstall(I,true); - } - - /* If we are in the Broken fixing mode we do not attempt to fix the problems. This is if the user invoked install without -f and gave packages */ diff --git a/configure.in b/configure.in index dc410b22f..f0b0d6703 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.6.46") +AC_DEFINE_UNQUOTED(VERSION,"0.6.45.1") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 1ec80ca01..4c5841057 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -apt (0.6.46) unstable; urgency=low +apt (0.6.45.1) unstable; urgency=low * debian/control: - switched to libdb4.4 for building (closes: #381019) @@ -7,8 +7,6 @@ apt (0.6.46) unstable; urgency=low versions of the package (closes: #257054) - properly handle recommends/suggests or-groups when printing the list of suggested/recommends packages (closes: #311619) - - fix the way multiple packages are installed so that the order of - packages on the commandline doesn't matter anymore * methods/http.cc: - check more careful for incorrect proxy settings (closes: #378868) * methods/gzip.cc: -- 2.45.2