From c15f569038c9d08cfb5186945d9c5095f7776768 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 8 Sep 2006 19:36:31 +0200 Subject: * apt-pkg/algorithms.cc: - bugfix in the InstallProcted() code (preserver the auto-install information) * cmdline/makefile: - install apt-mark as well --- apt-pkg/algorithms.cc | 9 +++++++-- cmdline/makefile | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index ac9d3be0b..55f44fbd5 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -1229,8 +1229,13 @@ void pkgProblemResolver::InstallProtect() { if ((Flags[I->ID] & ToRemove) == ToRemove) Cache.MarkDelete(I); - else - Cache.MarkInstall(I, false, 0, false); + else + { + // preserver the information if the package was auto + // or manual installed + bool autoInst = (Cache[I].Flags & pkgCache::Flag::Auto); + Cache.MarkInstall(I, false, 0, !autoInst); + } } } } diff --git a/cmdline/makefile b/cmdline/makefile index 882a0e1b5..49035be44 100644 --- a/cmdline/makefile +++ b/cmdline/makefile @@ -52,3 +52,9 @@ SOURCE=apt-key TO=$(BIN) TARGET=program include $(COPY_H) + +# The apt-mark program +SOURCE=apt-mark +TO=$(BIN) +TARGET=program +include $(COPY_H) -- cgit v1.2.3