aboutsummaryrefslogtreecommitdiff
path: root/paludis/resolver/destination_utils.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2014-01-05 18:35:48 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2014-01-05 19:03:25 +0000
commitda285b5d7279a823e680c8e3a8f7d7c5d538ca03 (patch)
treebeb01a1505f0184d87380921cc3454673ea991af /paludis/resolver/destination_utils.cc
parente7bcd85c494e5bdc6d2446bb94dd49df0c39dbb2 (diff)
downloadpaludis-da285b5d7279a823e680c8e3a8f7d7c5d538ca03.tar.gz
paludis-da285b5d7279a823e680c8e3a8f7d7c5d538ca03.tar.xz
Don't try to make binaries out of binaries
Diffstat (limited to 'paludis/resolver/destination_utils.cc')
-rw-r--r--paludis/resolver/destination_utils.cc27
1 files changed, 26 insertions, 1 deletions
diff --git a/paludis/resolver/destination_utils.cc b/paludis/resolver/destination_utils.cc
index 0e42da8e6..b7d6968f2 100644
--- a/paludis/resolver/destination_utils.cc
+++ b/paludis/resolver/destination_utils.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010, 2011 Ciaran McCreesh
+ * Copyright (c) 2010, 2011, 2014 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -120,3 +120,28 @@ paludis::resolver::destination_filtered_generator(
throw InternalError(PALUDIS_HERE, "unhandled dt");
}
+Filter
+paludis::resolver::make_destination_type_filter(
+ const DestinationType t)
+{
+ switch (t)
+ {
+ case dt_install_to_slash:
+ return filter::All();
+
+ case dt_install_to_chroot:
+ return filter::All();
+
+ case dt_create_binary:
+ return filter::ByFunction([] (const std::shared_ptr<const PackageID> & id) {
+ return ! can_make_binary_for(id);
+ },
+ "can be made into a binary");
+
+ case last_dt:
+ break;
+ }
+
+ throw InternalError(PALUDIS_HERE, "unhandled dt");
+}
+