diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-09-11 14:32:24 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-09-11 14:32:24 +0200 |
commit | ad6946e73ca11f79ffd306b511883131dc7babe6 (patch) | |
tree | d6d27694adae0663ab0ee0526e69d07242483415 /apt-pkg/algorithms.cc | |
parent | 4c81d32aada5b78fff4724efb1e039dd429c09f3 (diff) | |
parent | 8ec008808cd6083a633685a732dfe9b8a58a89da (diff) |
merged from lp:~donkult/apt/sid
Diffstat (limited to 'apt-pkg/algorithms.cc')
-rw-r--r-- | apt-pkg/algorithms.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 2f5fcc7ab..1b0161ffd 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -194,6 +194,11 @@ bool pkgSimulate::Remove(PkgIterator iPkg,bool Purge) { // Adapt the iterator PkgIterator Pkg = Sim.FindPkg(iPkg.Name(), iPkg.Arch()); + if (Pkg.end() == true) + { + std::cerr << (Purge ? "Purg" : "Remv") << " invalid package " << iPkg.FullName() << std::endl; + return false; + } Flags[Pkg->ID] = 3; Sim.MarkDelete(Pkg); |