aboutsummaryrefslogtreecommitdiff
path: root/paludis/resolver/required_confirmations.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-18 12:42:42 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-18 12:42:42 +0100
commitf3c1ae18f68788ed6a6752114fe6e93b454499b6 (patch)
tree2fbd6dbda6b0a89ef513416fdcc3b138cca96924 /paludis/resolver/required_confirmations.cc
parentd78e25b173a5078036054cff43833c49ec766db5 (diff)
downloadpaludis-f3c1ae18f68788ed6a6752114fe6e93b454499b6.tar.gz
paludis-f3c1ae18f68788ed6a6752114fe6e93b454499b6.tar.xz
Protect against removing system packages
Fixes: ticket:848
Diffstat (limited to 'paludis/resolver/required_confirmations.cc')
-rw-r--r--paludis/resolver/required_confirmations.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/paludis/resolver/required_confirmations.cc b/paludis/resolver/required_confirmations.cc
index 1b2bbefac..62a654aa4 100644
--- a/paludis/resolver/required_confirmations.cc
+++ b/paludis/resolver/required_confirmations.cc
@@ -36,6 +36,8 @@ RequiredConfirmation::deserialise(Deserialisation & d)
return NotBestConfirmation::deserialise(d);
else if (d.class_name() == "BreakConfirmation")
return BreakConfirmation::deserialise(d);
+ else if (d.class_name() == "RemoveSystemPackageConfirmation")
+ return RemoveSystemPackageConfirmation::deserialise(d);
else
throw InternalError(PALUDIS_HERE, "unknown class '" + stringify(d.class_name()) + "'");
@@ -84,6 +86,20 @@ BreakConfirmation::serialise(Serialiser & s) const
;
}
+const std::tr1::shared_ptr<RemoveSystemPackageConfirmation>
+RemoveSystemPackageConfirmation::deserialise(Deserialisation & d)
+{
+ Deserialisator v(d, "RemoveSystemPackageConfirmation");
+ return make_shared_ptr(new RemoveSystemPackageConfirmation);
+}
+
+void
+RemoveSystemPackageConfirmation::serialise(Serialiser & s) const
+{
+ s.object("RemoveSystemPackageConfirmation")
+ ;
+}
+
template class Sequence<std::tr1::shared_ptr<const RequiredConfirmation> >;
template class WrappedForwardIterator<RequiredConfirmations::ConstIteratorTag, const std::tr1::shared_ptr<const RequiredConfirmation> >;