aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-29 19:46:59 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-30 10:11:15 +0100
commit5bbf8ada48ba06506312eb417d7ec219cfdffcaa (patch)
tree75e5f15c3b56546160354d494dc8945c90fd6179
parentf47d5784e39c26c45b63fd2451abdafc6447ac1c (diff)
downloadpaludis-5bbf8ada48ba06506312eb417d7ec219cfdffcaa.tar.gz
paludis-5bbf8ada48ba06506312eb417d7ec219cfdffcaa.tar.xz
build_options sanity for pbins
-rw-r--r--paludis/repositories/e/e_repository.cc2
-rw-r--r--paludis/repositories/e/eapi.cc1
-rw-r--r--paludis/repositories/e/eapi.hh2
-rw-r--r--paludis/repositories/e/eapis/0.conf1
-rw-r--r--paludis/repositories/e/eapis/1.conf1
-rw-r--r--paludis/repositories/e/eapis/2.conf1
-rw-r--r--paludis/repositories/e/eapis/3.conf1
-rw-r--r--paludis/repositories/e/eapis/4.conf1
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf1
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf1
-rw-r--r--paludis/repositories/e/eapis/pbin-1+0.conf1
-rw-r--r--paludis/repositories/e/eapis/pbin-1+1.conf1
-rw-r--r--paludis/repositories/e/eapis/pbin-1+2.conf1
-rw-r--r--paludis/repositories/e/eapis/pbin-1+3.conf1
-rw-r--r--paludis/repositories/e/eapis/pbin-1+4.conf1
-rw-r--r--paludis/repositories/e/eapis/pbin-1+exheres-0.conf1
-rw-r--r--paludis/repositories/e/eapis/pbin-1+paludis-1.conf1
-rw-r--r--paludis/repositories/e/ebuild_id.cc103
18 files changed, 71 insertions, 51 deletions
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index c15700f..5f2c8d5 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -2410,7 +2410,7 @@ ERepository::install(const std::shared_ptr<const ERepositoryID> & id,
}
else if (phase->option("strip"))
{
- if (! strip_restrict)
+ if ((! id->eapi()->supported()->is_pbin()) && (! strip_restrict))
{
std::string libdir("lib");
FSEntry root(install_action.options.destination()->installed_root_key() ?
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index bcbbdc2..dfce2e5 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -326,6 +326,7 @@ namespace
n::ebuild_metadata_variables() = make_ebuild_metadata_variables(k),
n::ebuild_options() = make_ebuild_options(k),
n::ebuild_phases() = make_ebuild_phases(k),
+ n::is_pbin() = destringify_key<bool>(k, "is_pbin"),
n::iuse_flag_parse_options() = iuse_flag_parse_options,
n::merger_options() = merger_options,
n::package_dep_spec_parse_options() = package_dep_spec_parse_options,
diff --git a/paludis/repositories/e/eapi.hh b/paludis/repositories/e/eapi.hh
index ffee931..5085cc4 100644
--- a/paludis/repositories/e/eapi.hh
+++ b/paludis/repositories/e/eapi.hh
@@ -125,6 +125,7 @@ namespace paludis
typedef Name<struct ignore_pivot_env_functions_name> ignore_pivot_env_functions;
typedef Name<struct ignore_pivot_env_variables_name> ignore_pivot_env_variables;
typedef Name<struct inherited_name> inherited;
+ typedef Name<struct is_pbin_name> is_pbin;
typedef Name<struct iuse_name> iuse;
typedef Name<struct iuse_effective_name> iuse_effective;
typedef Name<struct iuse_flag_parse_options_name> iuse_flag_parse_options;
@@ -271,6 +272,7 @@ namespace paludis
NamedValue<n::ebuild_metadata_variables, std::shared_ptr<const EAPIEbuildMetadataVariables> > ebuild_metadata_variables;
NamedValue<n::ebuild_options, std::shared_ptr<const EAPIEbuildOptions> > ebuild_options;
NamedValue<n::ebuild_phases, std::shared_ptr<const EAPIEbuildPhases> > ebuild_phases;
+ NamedValue<n::is_pbin, bool> is_pbin;
NamedValue<n::iuse_flag_parse_options, IUseFlagParseOptions> iuse_flag_parse_options;
NamedValue<n::merger_options, MergerOptions> merger_options;
NamedValue<n::package_dep_spec_parse_options, ELikePackageDepSpecOptions> package_dep_spec_parse_options;
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index 9bdf7ae..fab2136 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -3,6 +3,7 @@
exported_name = 0
can_be_pbin = true
+is_pbin = false
package_dep_spec_parse_options =
dependency_spec_tree_parse_options =
diff --git a/paludis/repositories/e/eapis/1.conf b/paludis/repositories/e/eapis/1.conf
index 46f8bb4..6ea3827 100644
--- a/paludis/repositories/e/eapis/1.conf
+++ b/paludis/repositories/e/eapis/1.conf
@@ -4,6 +4,7 @@
source ${PALUDIS_EAPIS_DIR}/0.conf
exported_name = 1
can_be_pbin = true
+is_pbin = false
package_dep_spec_parse_options = allow_slot_deps
iuse_flag_parse_options = allow_iuse_defaults
diff --git a/paludis/repositories/e/eapis/2.conf b/paludis/repositories/e/eapis/2.conf
index 0063937..c841935 100644
--- a/paludis/repositories/e/eapis/2.conf
+++ b/paludis/repositories/e/eapis/2.conf
@@ -4,6 +4,7 @@
source ${PALUDIS_EAPIS_DIR}/1.conf
exported_name = 2
can_be_pbin = true
+is_pbin = false
package_dep_spec_parse_options = allow_slot_deps allow_use_deps_portage
dependency_spec_tree_parse_options = uri_supports_arrow double_bang_blocks
diff --git a/paludis/repositories/e/eapis/3.conf b/paludis/repositories/e/eapis/3.conf
index 2b390c4..3df3127 100644
--- a/paludis/repositories/e/eapis/3.conf
+++ b/paludis/repositories/e/eapis/3.conf
@@ -4,6 +4,7 @@
source ${PALUDIS_EAPIS_DIR}/2.conf
exported_name = 3
can_be_pbin = true
+is_pbin = false
ebuild_module_suffixes = 3 2 1 0
merger_options = ${merger_options} preserve_mtimes
diff --git a/paludis/repositories/e/eapis/4.conf b/paludis/repositories/e/eapis/4.conf
index 31e66ec..47e53b2 100644
--- a/paludis/repositories/e/eapis/4.conf
+++ b/paludis/repositories/e/eapis/4.conf
@@ -4,6 +4,7 @@
source ${PALUDIS_EAPIS_DIR}/3.conf
exported_name = 4
can_be_pbin = true
+is_pbin = false
ebuild_functions = ${ebuild_functions} pkg_pretend
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index 1aa4001..44a8914 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -4,6 +4,7 @@
exported_name = exheres-0
can_be_pbin = true
+is_pbin = false
package_dep_spec_parse_options = allow_slot_deps allow_use_deps \
allow_ranged_deps allow_tilde_greater_deps strict_parsing \
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index 0542b0b..25c3f38 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -4,6 +4,7 @@
exported_name = paludis-1
can_be_pbin = true
+is_pbin = false
package_dep_spec_parse_options = allow_slot_deps allow_use_deps allow_use_deps_portage allow_ranged_deps \
allow_repository_deps allow_tilde_greater_deps strict_parsing \
diff --git a/paludis/repositories/e/eapis/pbin-1+0.conf b/paludis/repositories/e/eapis/pbin-1+0.conf
index 379d787..dcfac15 100644
--- a/paludis/repositories/e/eapis/pbin-1+0.conf
+++ b/paludis/repositories/e/eapis/pbin-1+0.conf
@@ -3,6 +3,7 @@
source ${PALUDIS_EAPIS_DIR}/0.conf
can_be_pbin = false
+is_pbin = true
ebuild_module_suffixes = pbin-1 ${ebuild_module_suffixes}
support_eclasses = false
diff --git a/paludis/repositories/e/eapis/pbin-1+1.conf b/paludis/repositories/e/eapis/pbin-1+1.conf
index 5e7cc80..da518a4 100644
--- a/paludis/repositories/e/eapis/pbin-1+1.conf
+++ b/paludis/repositories/e/eapis/pbin-1+1.conf
@@ -3,6 +3,7 @@
source ${PALUDIS_EAPIS_DIR}/1.conf
can_be_pbin = false
+is_pbin = true
ebuild_module_suffixes = pbin-1 ${ebuild_module_suffixes}
support_eclasses = false
diff --git a/paludis/repositories/e/eapis/pbin-1+2.conf b/paludis/repositories/e/eapis/pbin-1+2.conf
index 6d900b9..bd8f979 100644
--- a/paludis/repositories/e/eapis/pbin-1+2.conf
+++ b/paludis/repositories/e/eapis/pbin-1+2.conf
@@ -3,6 +3,7 @@
source ${PALUDIS_EAPIS_DIR}/2.conf
can_be_pbin = false
+is_pbin = true
ebuild_module_suffixes = pbin-1 ${ebuild_module_suffixes}
support_eclasses = false
diff --git a/paludis/repositories/e/eapis/pbin-1+3.conf b/paludis/repositories/e/eapis/pbin-1+3.conf
index 91da125..35af6f3 100644
--- a/paludis/repositories/e/eapis/pbin-1+3.conf
+++ b/paludis/repositories/e/eapis/pbin-1+3.conf
@@ -3,6 +3,7 @@
source ${PALUDIS_EAPIS_DIR}/3.conf
can_be_pbin = false
+is_pbin = true
ebuild_module_suffixes = pbin-1 ${ebuild_module_suffixes}
support_eclasses = false
diff --git a/paludis/repositories/e/eapis/pbin-1+4.conf b/paludis/repositories/e/eapis/pbin-1+4.conf
index f3d1d38..bd01c01 100644
--- a/paludis/repositories/e/eapis/pbin-1+4.conf
+++ b/paludis/repositories/e/eapis/pbin-1+4.conf
@@ -3,6 +3,7 @@
source ${PALUDIS_EAPIS_DIR}/4.conf
can_be_pbin = false
+is_pbin = true
ebuild_module_suffixes = pbin-1 ${ebuild_module_suffixes}
support_eclasses = false
diff --git a/paludis/repositories/e/eapis/pbin-1+exheres-0.conf b/paludis/repositories/e/eapis/pbin-1+exheres-0.conf
index bfee77b..36500e4 100644
--- a/paludis/repositories/e/eapis/pbin-1+exheres-0.conf
+++ b/paludis/repositories/e/eapis/pbin-1+exheres-0.conf
@@ -4,6 +4,7 @@
source ${PALUDIS_EAPIS_DIR}/exheres-0.conf
can_be_pbin = false
+is_pbin = true
ebuild_module_suffixes = pbin-1 ${ebuild_module_suffixes}
support_exlibs = false
diff --git a/paludis/repositories/e/eapis/pbin-1+paludis-1.conf b/paludis/repositories/e/eapis/pbin-1+paludis-1.conf
index 188082f..fc315ac 100644
--- a/paludis/repositories/e/eapis/pbin-1+paludis-1.conf
+++ b/paludis/repositories/e/eapis/pbin-1+paludis-1.conf
@@ -4,6 +4,7 @@
source ${PALUDIS_EAPIS_DIR}/paludis-1.conf
can_be_pbin = false
+is_pbin = true
ebuild_module_suffixes = pbin-1 ${ebuild_module_suffixes}
support_eclasses = false
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 88be9dd..3c8cfb9 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -1448,59 +1448,72 @@ EbuildID::add_build_options(const std::shared_ptr<Choices> & choices) const
)));
choices->add(build_options);
- bool may_be_unrestricted_test(true), may_be_unrestricted_strip(true);
-
- /* if we unconditionally restrict an action, don't add a build option
- * for it. but if we conditionally restrict it, do, to avoid weirdness
- * in cases like RESTRICT="test? ( test )." */
- if (restrict_key())
+ if (! eapi()->supported()->is_pbin())
{
- UnconditionalRestrictFinder f;
- restrict_key()->value()->root()->accept(f);
- may_be_unrestricted_test = f.s.end() == f.s.find("test");
- may_be_unrestricted_strip = f.s.end() == f.s.find("strip");
- }
+ bool may_be_unrestricted_test(true), may_be_unrestricted_strip(true);
- /* optional_tests */
- if (eapi()->supported()->choices_options()->has_optional_tests())
- if (may_be_unrestricted_test)
- build_options->add(std::make_shared<ELikeOptionalTestsChoiceValue>(shared_from_this(), _imp->environment, build_options));
+ /* if we unconditionally restrict an action, don't add a build option
+ * for it. but if we conditionally restrict it, do, to avoid weirdness
+ * in cases like RESTRICT="test? ( test )." */
+ if (restrict_key())
+ {
+ UnconditionalRestrictFinder f;
+ restrict_key()->value()->root()->accept(f);
+ may_be_unrestricted_test = f.s.end() == f.s.find("test");
+ may_be_unrestricted_strip = f.s.end() == f.s.find("strip");
+ }
- /* recommended_tests */
- if (eapi()->supported()->choices_options()->has_recommended_tests())
- if (may_be_unrestricted_test)
- build_options->add(std::make_shared<ELikeRecommendedTestsChoiceValue>(shared_from_this(), _imp->environment, build_options));
+ /* optional_tests */
+ if (eapi()->supported()->choices_options()->has_optional_tests())
+ if (may_be_unrestricted_test)
+ build_options->add(std::make_shared<ELikeOptionalTestsChoiceValue>(shared_from_this(), _imp->environment, build_options));
- /* expensive_tests */
- if (eapi()->supported()->choices_options()->has_expensive_tests())
- {
- if (! _imp->defined_phases)
- throw InternalError(PALUDIS_HERE, "bug! no defined_phases yet");
+ /* recommended_tests */
+ if (eapi()->supported()->choices_options()->has_recommended_tests())
+ if (may_be_unrestricted_test)
+ build_options->add(std::make_shared<ELikeRecommendedTestsChoiceValue>(shared_from_this(), _imp->environment, build_options));
- bool has_expensive_test_phase(false);
- EAPIPhases phases(_imp->eapi->supported()->ebuild_phases()->ebuild_install());
- for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
- phase != phase_end ; ++phase)
+ /* expensive_tests */
+ if (eapi()->supported()->choices_options()->has_expensive_tests())
{
- if (phase->option("expensive_tests"))
+ if (! _imp->defined_phases)
+ throw InternalError(PALUDIS_HERE, "bug! no defined_phases yet");
+
+ bool has_expensive_test_phase(false);
+ EAPIPhases phases(_imp->eapi->supported()->ebuild_phases()->ebuild_install());
+ for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ;
+ phase != phase_end ; ++phase)
{
- if (_imp->defined_phases->value()->end() != _imp->defined_phases->value()->find(phase->equal_option("skipname")))
+ if (phase->option("expensive_tests"))
{
- has_expensive_test_phase = true;
- break;
+ if (_imp->defined_phases->value()->end() != _imp->defined_phases->value()->find(phase->equal_option("skipname")))
+ {
+ has_expensive_test_phase = true;
+ break;
+ }
}
}
+
+ if (has_expensive_test_phase)
+ build_options->add(std::make_shared<ELikeExpensiveTestsChoiceValue>(shared_from_this(), _imp->environment, build_options));
}
- if (has_expensive_test_phase)
- build_options->add(std::make_shared<ELikeExpensiveTestsChoiceValue>(shared_from_this(), _imp->environment, build_options));
- }
+ /* split, strip */
+ if (may_be_unrestricted_strip)
+ {
+ build_options->add(std::make_shared<ELikeSplitChoiceValue>(shared_from_this(), _imp->environment, build_options));
+ build_options->add(std::make_shared<ELikeStripChoiceValue>(shared_from_this(), _imp->environment, build_options));
+ }
- /* split, strip */
- if (may_be_unrestricted_strip)
- {
- build_options->add(std::make_shared<ELikeSplitChoiceValue>(shared_from_this(), _imp->environment, build_options));
- build_options->add(std::make_shared<ELikeStripChoiceValue>(shared_from_this(), _imp->environment, build_options));
+ /* jobs */
+ if (! eapi()->supported()->ebuild_environment_variables()->env_jobs().empty())
+ {
+ if (! _imp->defined_phases)
+ throw InternalError(PALUDIS_HERE, "bug! no defined_phases yet");
+
+ build_options->add(std::make_shared<ELikeJobsChoiceValue>(
+ shared_from_this(), _imp->environment, build_options));
+ }
}
/* trace */
@@ -1510,16 +1523,6 @@ EbuildID::add_build_options(const std::shared_ptr<Choices> & choices) const
/* preserve_work */
build_options->add(std::make_shared<ELikePreserveWorkChoiceValue>(
shared_from_this(), _imp->environment, build_options, false));
-
- /* jobs */
- if (! eapi()->supported()->ebuild_environment_variables()->env_jobs().empty())
- {
- if (! _imp->defined_phases)
- throw InternalError(PALUDIS_HERE, "bug! no defined_phases yet");
-
- build_options->add(std::make_shared<ELikeJobsChoiceValue>(
- shared_from_this(), _imp->environment, build_options));
- }
}
}