diff options
-rw-r--r-- | cmdline/apt-get.cc | 21 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | debian/changelog | 5 |
3 files changed, 26 insertions, 2 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 4ffb9414b..430b1bccb 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1556,6 +1556,7 @@ bool DoInstall(CommandLine &CmdL) if (Cache->BrokenCount() != 0) BrokenFix = true; + unsigned int AutoMarkChanged = 0; unsigned int ExpectedInst = 0; unsigned int Packages = 0; pkgProblemResolver Fix(Cache); @@ -1692,6 +1693,18 @@ bool DoInstall(CommandLine &CmdL) return false; if (TryToInstall(Pkg,Cache,Fix,Remove,BrokenFix,ExpectedInst) == false) return false; + + // see if we need to fix the auto-mark flag + // e.g. apt-get install foo + // where foo is marked automatic + if(Cache[Pkg].Install() == false && + (Cache[Pkg].Flags & pkgCache::Flag::Auto)) + { + ioprintf(c1out,_("%s set to manual installed.\n"), + Pkg.Name()); + Cache->MarkAuto(Pkg,false); + AutoMarkChanged++; + } } } @@ -1854,6 +1867,14 @@ bool DoInstall(CommandLine &CmdL) } + // if nothing changed in the cache, but only the automark information + // we write the StateFile here, otherwise it will be written in + // cache.commit() + if (AutoMarkChanged > 0 && + Cache->DelCount() == 0 && Cache->InstCount() == 0 && + Cache->BadCount() == 0) + Cache->writeStateFile(NULL); + // See if we need to prompt if (Cache->InstCount() == ExpectedInst && Cache->DelCount() == 0) return InstallPackages(Cache,false,false); diff --git a/configure.in b/configure.in index 940601e21..ca841df36 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.4ubuntu9") +AC_DEFINE_UNQUOTED(VERSION,"0.6.46.4ubuntu10") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 3038e49bd..bb134f780 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,8 +5,11 @@ apt (0.6.46.4ubuntu10) feisty; urgency=low of packages in this section manual * debian/apt.conf.ubuntu: - added APT::Never-MarkAuto-Section "metapackages"; + * cmdline/apt-get.cc: + - "apt-get install foo" on a already installed package foo will + clean the automatic installed flag - -- + -- Michael Vogt <michael.vogt@ubuntu.com> Wed, 14 Mar 2007 12:34:46 +0100 apt (0.6.46.4ubuntu9) feisty; urgency=low |