aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2010-03-09 05:59:37 +0000
committerAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2010-03-09 11:49:29 +0000
commit81633f02d9b43b010d82bb28759c49f3a7c0a601 (patch)
tree4c2ff13a996aa937fc2773b931fc92169de78f6d
parent53dee1d023f7e45cba0a45130b04a81e4129c46b (diff)
downloadpaludis-81633f02d9b43b010d82bb28759c49f3a7c0a601.tar.gz
paludis-81633f02d9b43b010d82bb28759c49f3a7c0a601.tar.xz
Fix parents handling in exheres-0.
-rw-r--r--paludis/repositories/e/e_installed_repository.cc1
-rw-r--r--paludis/repositories/e/e_repository.cc6
-rw-r--r--paludis/repositories/e/ebuild.cc17
-rw-r--r--paludis/repositories/e/ebuild.hh7
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash18
-rw-r--r--paludis/repositories/e/exheres_profile.cc11
-rw-r--r--paludis/repositories/e/exheres_profile.hh3
-rw-r--r--paludis/repositories/e/profile.hh3
-rw-r--r--paludis/repositories/e/traditional_profile.cc11
-rw-r--r--paludis/repositories/e/traditional_profile.hh3
10 files changed, 70 insertions, 10 deletions
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index ef7d222..38af704 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -365,6 +365,7 @@ EInstalledRepository::perform_info(
value_for<n::info_vars>(i ? i : make_shared_ptr(new const Set<std::string>)),
value_for<n::load_environment>(load_env.get()),
value_for<n::profiles>(make_shared_ptr(new FSEntrySequence)),
+ value_for<n::profiles_with_parents>(make_shared_ptr(new FSEntrySequence)),
value_for<n::use>(""),
value_for<n::use_ebuild_file>(false),
value_for<n::use_expand>(""),
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index fc11f48..a137f38 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -2054,6 +2054,7 @@ ERepository::fetch(const std::tr1::shared_ptr<const ERepositoryID> & id,
value_for<n::expand_vars>(expand_vars),
value_for<n::loadsaveenv_dir>(package_builddir / "temp"),
value_for<n::profiles>(_imp->params.profiles()),
+ value_for<n::profiles_with_parents>(profile()->profiles_with_parents()),
value_for<n::slot>(id->slot_key() ? stringify(id->slot_key()->value()) : ""),
value_for<n::use>(use),
value_for<n::use_expand>(join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " ")),
@@ -2100,6 +2101,7 @@ ERepository::fetch(const std::tr1::shared_ptr<const ERepositoryID> & id,
value_for<n::aa>(all_archives),
value_for<n::expand_vars>(expand_vars),
value_for<n::profiles>(_imp->params.profiles()),
+ value_for<n::profiles_with_parents>(profile()->profiles_with_parents()),
value_for<n::use>(use),
value_for<n::use_expand>(join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " ")),
value_for<n::use_expand_hidden>(join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " "))
@@ -2450,6 +2452,7 @@ ERepository::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
value_for<n::expand_vars>(expand_vars),
value_for<n::loadsaveenv_dir>(package_builddir / "temp"),
value_for<n::profiles>(_imp->params.profiles()),
+ value_for<n::profiles_with_parents>(profile()->profiles_with_parents()),
value_for<n::replacing_ids>(install_action.options.replacing()),
value_for<n::slot>(id->slot_key() ? stringify(id->slot_key()->value()) : ""),
value_for<n::use>(use),
@@ -2559,6 +2562,7 @@ ERepository::info(const std::tr1::shared_ptr<const ERepositoryID> & id,
info_vars_key()->value() : make_shared_ptr(new const Set<std::string>)),
value_for<n::load_environment>(static_cast<const FSEntry *>(0)),
value_for<n::profiles>(_imp->params.profiles()),
+ value_for<n::profiles_with_parents>(profile()->profiles_with_parents()),
value_for<n::use>(use),
value_for<n::use_ebuild_file>(true),
value_for<n::use_expand>(join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " ")),
@@ -2781,6 +2785,7 @@ ERepository::pretend(
make_named_values<EbuildBadOptionsCommandParams>(
value_for<n::expand_vars>(expand_vars),
value_for<n::profiles>(_imp->params.profiles()),
+ value_for<n::profiles_with_parents>(profile()->profiles_with_parents()),
value_for<n::unmet_requirements>(verifier.unmet_requirements()),
value_for<n::use>(use),
value_for<n::use_expand>(join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " ")),
@@ -2835,6 +2840,7 @@ ERepository::pretend(
make_named_values<EbuildPretendCommandParams>(
value_for<n::expand_vars>(expand_vars),
value_for<n::profiles>(_imp->params.profiles()),
+ value_for<n::profiles_with_parents>(profile()->profiles_with_parents()),
value_for<n::use>(use),
value_for<n::use_expand>(join(profile()->use_expand()->begin(), profile()->use_expand()->end(), " ")),
value_for<n::use_expand_hidden>(join(profile()->use_expand_hidden()->begin(), profile()->use_expand_hidden()->end(), " "))
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 47444a3..7b283e5 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -264,6 +264,7 @@ EbuildCommand::operator() ()
.with_setenv("SLOT", "")
.with_setenv("PALUDIS_PROFILE_DIR", "")
.with_setenv("PALUDIS_PROFILE_DIRS", "")
+ .with_setenv("PALUDIS_PROFILES_DIRS", "")
.with_setenv("ROOT", params.root());
if (! params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_kv().empty())
@@ -744,6 +745,8 @@ EbuildNoFetchCommand::extend_command(const Command & cmd)
.with_setenv("PALUDIS_PROFILE_DIR", stringify(*fetch_params.profiles()->begin()))
.with_setenv("PALUDIS_PROFILE_DIRS", join(fetch_params.profiles()->begin(),
fetch_params.profiles()->end(), " "))
+ .with_setenv("PALUDIS_PROFILES_DIRS", join(fetch_params.profiles_with_parents()->begin(),
+ fetch_params.profiles_with_parents()->end(), " "))
.with_setenv("PALUDIS_ARCHIVES_VAR",
params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_a()));
@@ -800,6 +803,8 @@ EbuildInstallCommand::extend_command(const Command & cmd)
.with_setenv("PALUDIS_PROFILE_DIR", stringify(*install_params.profiles()->begin()))
.with_setenv("PALUDIS_PROFILE_DIRS", join(install_params.profiles()->begin(),
install_params.profiles()->end(), " "))
+ .with_setenv("PALUDIS_PROFILES_DIRS", join(install_params.profiles_with_parents()->begin(),
+ install_params.profiles_with_parents()->end(), " "))
.with_setenv("PALUDIS_ARCHIVES_VAR",
params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_a())
.with_setenv("SLOT", stringify(install_params.slot())));
@@ -1061,7 +1066,9 @@ EbuildPretendCommand::extend_command(const Command & cmd)
.with_prefix_blank_lines()
.with_setenv("PALUDIS_PROFILE_DIR", stringify(*pretend_params.profiles()->begin()))
.with_setenv("PALUDIS_PROFILE_DIRS", join(pretend_params.profiles()->begin(),
- pretend_params.profiles()->end(), " ")));
+ pretend_params.profiles()->end(), " "))
+ .with_setenv("PALUDIS_PROFILES_DIRS", join(pretend_params.profiles_with_parents()->begin(),
+ pretend_params.profiles_with_parents()->end(), " ")));
if (! params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_use().empty())
result.with_setenv(params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_use(),
@@ -1125,7 +1132,9 @@ EbuildInfoCommand::extend_command(const Command & cmd)
.with_setenv("PALUDIS_PROFILE_DIR",
info_params.profiles()->empty() ? std::string("") : stringify(*info_params.profiles()->begin()))
.with_setenv("PALUDIS_PROFILE_DIRS", join(info_params.profiles()->begin(),
- info_params.profiles()->end(), " ")));
+ info_params.profiles()->end(), " "))
+ .with_setenv("PALUDIS_PROFILES_DIRS", join(info_params.profiles_with_parents()->begin(),
+ info_params.profiles_with_parents()->end(), " ")));
if (! params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_use().empty())
result.with_setenv(params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_use(),
@@ -1250,6 +1259,8 @@ EbuildBadOptionsCommand::extend_command(const Command & cmd)
.with_setenv("PALUDIS_PROFILE_DIR", stringify(*bad_options_params.profiles()->begin()))
.with_setenv("PALUDIS_PROFILE_DIRS", join(bad_options_params.profiles()->begin(),
bad_options_params.profiles()->end(), " "))
+ .with_setenv("PALUDIS_PROFILES_DIRS", join(bad_options_params.profiles_with_parents()->begin(),
+ bad_options_params.profiles_with_parents()->end(), " "))
.with_setenv("EX_UNMET_REQUIREMENTS", join(bad_options_params.unmet_requirements()->begin(),
bad_options_params.unmet_requirements()->end(), "\n"))
);
@@ -1301,6 +1312,8 @@ EbuildFetchExtraCommand::extend_command(const Command & cmd)
.with_setenv("PALUDIS_PROFILE_DIR", stringify(*fetch_extra_params.profiles()->begin()))
.with_setenv("PALUDIS_PROFILE_DIRS", join(fetch_extra_params.profiles()->begin(),
fetch_extra_params.profiles()->end(), " "))
+ .with_setenv("PALUDIS_PROFILES_DIRS", join(fetch_extra_params.profiles_with_parents()->begin(),
+ fetch_extra_params.profiles_with_parents()->end(), " "))
.with_setenv("PALUDIS_ARCHIVES_VAR",
params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_a())
.with_setenv("SLOT", stringify(fetch_extra_params.slot()))
diff --git a/paludis/repositories/e/ebuild.hh b/paludis/repositories/e/ebuild.hh
index 56fba87..fb12b19 100644
--- a/paludis/repositories/e/ebuild.hh
+++ b/paludis/repositories/e/ebuild.hh
@@ -73,6 +73,7 @@ namespace paludis
struct package_id;
struct portdir;
struct profiles;
+ struct profiles_with_parents;
struct replaced_by;
struct replacing_ids;
struct root;
@@ -135,6 +136,7 @@ namespace paludis
NamedValue<n::aa, std::string> aa;
NamedValue<n::expand_vars, std::tr1::shared_ptr<const Map<std::string, std::string> > > expand_vars;
NamedValue<n::profiles, std::tr1::shared_ptr<const FSEntrySequence> > profiles;
+ NamedValue<n::profiles_with_parents, std::tr1::shared_ptr<const FSEntrySequence> > profiles_with_parents;
NamedValue<n::use, std::string> use;
NamedValue<n::use_expand, std::string> use_expand;
NamedValue<n::use_expand_hidden, std::string> use_expand_hidden;
@@ -154,6 +156,7 @@ namespace paludis
NamedValue<n::expand_vars, std::tr1::shared_ptr<const Map<std::string, std::string> > > expand_vars;
NamedValue<n::loadsaveenv_dir, FSEntry> loadsaveenv_dir;
NamedValue<n::profiles, std::tr1::shared_ptr<const FSEntrySequence> > profiles;
+ NamedValue<n::profiles_with_parents, std::tr1::shared_ptr<const FSEntrySequence> > profiles_with_parents;
NamedValue<n::slot, std::string> slot;
NamedValue<n::use, std::string> use;
NamedValue<n::use_expand, std::string> use_expand;
@@ -176,6 +179,7 @@ namespace paludis
NamedValue<n::expand_vars, std::tr1::shared_ptr<const Map<std::string, std::string> > > expand_vars;
NamedValue<n::loadsaveenv_dir, FSEntry> loadsaveenv_dir;
NamedValue<n::profiles, std::tr1::shared_ptr<const FSEntrySequence> > profiles;
+ NamedValue<n::profiles_with_parents, std::tr1::shared_ptr<const FSEntrySequence> > profiles_with_parents;
NamedValue<n::replacing_ids, std::tr1::shared_ptr<const PackageIDSequence> > replacing_ids;
NamedValue<n::slot, std::string> slot;
NamedValue<n::use, std::string> use;
@@ -194,6 +198,7 @@ namespace paludis
{
NamedValue<n::expand_vars, std::tr1::shared_ptr<const Map<std::string, std::string> > > expand_vars;
NamedValue<n::profiles, std::tr1::shared_ptr<const FSEntrySequence> > profiles;
+ NamedValue<n::profiles_with_parents, std::tr1::shared_ptr<const FSEntrySequence> > profiles_with_parents;
NamedValue<n::use, std::string> use;
NamedValue<n::use_expand, std::string> use_expand;
NamedValue<n::use_expand_hidden, std::string> use_expand_hidden;
@@ -210,6 +215,7 @@ namespace paludis
{
NamedValue<n::expand_vars, std::tr1::shared_ptr<const Map<std::string, std::string> > > expand_vars;
NamedValue<n::profiles, std::tr1::shared_ptr<const FSEntrySequence> > profiles;
+ NamedValue<n::profiles_with_parents, std::tr1::shared_ptr<const FSEntrySequence> > profiles_with_parents;
NamedValue<n::unmet_requirements, std::tr1::shared_ptr<const Sequence<std::string> > > unmet_requirements;
NamedValue<n::use, std::string> use;
NamedValue<n::use_expand, std::string> use_expand;
@@ -256,6 +262,7 @@ namespace paludis
NamedValue<n::info_vars, std::tr1::shared_ptr<const Set<std::string> > > info_vars;
NamedValue<n::load_environment, const FSEntry *> load_environment;
NamedValue<n::profiles, std::tr1::shared_ptr<const FSEntrySequence> > profiles;
+ NamedValue<n::profiles_with_parents, std::tr1::shared_ptr<const FSEntrySequence> > profiles_with_parents;
NamedValue<n::use, std::string> use;
NamedValue<n::use_ebuild_file, bool> use_ebuild_file;
NamedValue<n::use_expand, std::string> use_expand;
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index aa1b7d0..552265f 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -199,12 +199,14 @@ export PALUDIS_HOME="$(canonicalise ${PALUDIS_HOME:-${HOME}} )"
ebuild_source_profile()
{
- if [[ -f ${1}/parent ]] ; then
- while read line ; do
- grep --silent '^[[:space:]]*#' <<<"${line}" && continue
- grep --silent '[^[:space:]]' <<<"${line}" || continue
- ebuild_source_profile $(canonicalise ${1}/${line} )
- done <${1}/parent
+ if [[ -z ${PALUDIS_PROFILES_DIRS} ]]; then
+ if [[ -f ${1}/parent ]] ; then
+ while read line ; do
+ grep --silent '^[[:space:]]*#' <<<"${line}" && continue
+ grep --silent '[^[:space:]]' <<<"${line}" || continue
+ ebuild_source_profile $(canonicalise ${1}/${line} )
+ done <${1}/parent
+ fi
fi
local paludis_old_set=$-
@@ -417,8 +419,8 @@ ebuild_load_em_up_dan()
fi
ebuild_sanitise_envvars
- if [[ -n ${PALUDIS_PROFILE_DIRS} ]] ; then
- for paludis_var in ${PALUDIS_PROFILE_DIRS} ; do
+ if [[ -n ${PALUDIS_PROFILES_DIRS:-${PALUDIS_PROFILE_DIRS}} ]] ; then
+ for paludis_var in ${PALUDIS_PROFILES_DIRS:-${PALUDIS_PROFILE_DIRS}} ; do
ebuild_source_profile "$(canonicalise "${paludis_var}")"
done
elif [[ -n ${PALUDIS_PROFILE_DIR} ]] ; then
diff --git a/paludis/repositories/e/exheres_profile.cc b/paludis/repositories/e/exheres_profile.cc
index b3c6399..ca83384 100644
--- a/paludis/repositories/e/exheres_profile.cc
+++ b/paludis/repositories/e/exheres_profile.cc
@@ -74,6 +74,8 @@ namespace paludis
const Environment * const env;
const ERepository * const repository;
+ std::tr1::shared_ptr<FSEntrySequence> profiles_with_parents;
+
PaludisLikeOptionsConf options_conf;
EnvironmentVariablesMap environment_variables;
PackageMaskMap package_mask;
@@ -96,6 +98,7 @@ namespace paludis
const std::string &, const bool) :
env(e),
repository(p),
+ profiles_with_parents(new FSEntrySequence),
options_conf(make_named_values<PaludisLikeOptionsConfParams>(
value_for<n::allow_locking>(true),
value_for<n::environment>(e),
@@ -245,6 +248,14 @@ ExheresProfile::_load_dir(const FSEntry & f)
k != k_end ; ++k)
_imp->environment_variables[k->first] = k->second;
}
+
+ _imp->profiles_with_parents->push_back(f);
+}
+
+std::tr1::shared_ptr<const FSEntrySequence>
+ExheresProfile::profiles_with_parents() const
+{
+ return _imp->profiles_with_parents;
}
bool
diff --git a/paludis/repositories/e/exheres_profile.hh b/paludis/repositories/e/exheres_profile.hh
index 4ff761e..55b63b3 100644
--- a/paludis/repositories/e/exheres_profile.hh
+++ b/paludis/repositories/e/exheres_profile.hh
@@ -45,6 +45,9 @@ namespace paludis
virtual ~ExheresProfile();
+ virtual std::tr1::shared_ptr<const FSEntrySequence> profiles_with_parents() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
virtual bool use_masked(
const std::tr1::shared_ptr<const PackageID> &,
const std::tr1::shared_ptr<const Choice> &,
diff --git a/paludis/repositories/e/profile.hh b/paludis/repositories/e/profile.hh
index 150de42..bfbb778 100644
--- a/paludis/repositories/e/profile.hh
+++ b/paludis/repositories/e/profile.hh
@@ -46,6 +46,9 @@ namespace paludis
public:
virtual ~Profile() = 0;
+ virtual std::tr1::shared_ptr<const FSEntrySequence> profiles_with_parents() const
+ PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
+
virtual bool use_masked(
const std::tr1::shared_ptr<const PackageID> &,
const std::tr1::shared_ptr<const Choice> &,
diff --git a/paludis/repositories/e/traditional_profile.cc b/paludis/repositories/e/traditional_profile.cc
index 4ae36bb..2bbad81 100644
--- a/paludis/repositories/e/traditional_profile.cc
+++ b/paludis/repositories/e/traditional_profile.cc
@@ -133,6 +133,8 @@ namespace paludis
const Environment * const env;
const ERepository * const repository;
+ std::tr1::shared_ptr<FSEntrySequence> profiles_with_parents;
+
///\}
///\name Environment variables
@@ -192,6 +194,7 @@ namespace paludis
package_mask_file(p),
env(e),
repository(p),
+ profiles_with_parents(new FSEntrySequence),
system_packages(new SetSpecTree(make_shared_ptr(new AllDepSpec))),
system_tag(new GeneralSetDepTag(SetName("system"), stringify(name))),
virtuals(new Map<QualifiedPackageName, PackageDepSpec>),
@@ -279,6 +282,8 @@ Implementation<TraditionalProfile>::load_profile_directory_recursively(const FSE
if ((*DistributionData::get_instance()->distribution_from_string(env->distribution())).support_old_style_virtuals())
virtuals_file.add_file(dir / "virtuals");
package_mask_file.add_file(dir / "package.mask");
+
+ profiles_with_parents->push_back(dir);
}
void
@@ -838,6 +843,12 @@ TraditionalProfile::~TraditionalProfile()
{
}
+std::tr1::shared_ptr<const FSEntrySequence>
+TraditionalProfile::profiles_with_parents() const
+{
+ return _imp->profiles_with_parents;
+}
+
bool
TraditionalProfile::use_masked(
const std::tr1::shared_ptr<const PackageID> & id,
diff --git a/paludis/repositories/e/traditional_profile.hh b/paludis/repositories/e/traditional_profile.hh
index db2cab0..3861952 100644
--- a/paludis/repositories/e/traditional_profile.hh
+++ b/paludis/repositories/e/traditional_profile.hh
@@ -42,6 +42,9 @@ namespace paludis
virtual ~TraditionalProfile();
+ virtual std::tr1::shared_ptr<const FSEntrySequence> profiles_with_parents() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
virtual bool use_masked(
const std::tr1::shared_ptr<const PackageID> &,
const std::tr1::shared_ptr<const Choice> &,