summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@bottom>2006-10-02 01:12:29 +0200
committerMichael Vogt <egon@bottom>2006-10-02 01:12:29 +0200
commit5f23b53e0978d985415bf53249d5bd4acfafc66a (patch)
tree00ac4b9c283a32fe324a097c0f7e4e7cb17c4145 /apt-pkg/algorithms.cc
parentdd09a217ac0d331f4a0324cf42559da5d35edc9a (diff)
parent320854985be0fe14491385ca349783ab8a9d7797 (diff)
* merged from apt--auto-mark
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r--apt-pkg/algorithms.cc9
1 files changed, 7 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);
+ }
}
}
}