aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-03-31 20:05:30 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-03-31 20:05:30 +0000
commite6016d11e034d8fb85a500f919a588bd6ac09ee8 (patch)
tree77f5acf170b3160a9b5ac3e3182900a3852e11ee
parent5c78d348eba9585b7d9cc7246ebd5660b7ea152b (diff)
downloadpaludis-e6016d11e034d8fb85a500f919a588bd6ac09ee8.tar.gz
paludis-e6016d11e034d8fb85a500f919a588bd6ac09ee8.tar.xz
Fix importance for overlays
-rw-r--r--paludis/environments/portage/portage_environment.cc13
-rw-r--r--paludis/environments/portage/portage_environment.hh2
2 files changed, 9 insertions, 6 deletions
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index 725c9ec..c4043e6 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -72,10 +72,13 @@ namespace paludis
mutable std::tr1::shared_ptr<Hooker> hooker;
mutable std::list<FSEntry> hook_dirs;
+ int overlay_importance;
+
Implementation(const std::string & s) :
conf_dir(FSEntry(s.empty() ? "/" : s) / SYSCONFDIR),
paludis_command("paludis"),
- done_hooks(false)
+ done_hooks(false),
+ overlay_importance(10)
{
}
@@ -348,12 +351,12 @@ void
PortageEnvironment::_add_portdir_repository(const FSEntry & portdir)
{
Context context("When creating PORTDIR repository:");
- _add_ebuild_repository(portdir, "", _imp->vars->get("SYNC"));
+ _add_ebuild_repository(portdir, "", _imp->vars->get("SYNC"), 1);
}
void
PortageEnvironment::_add_ebuild_repository(const FSEntry & portdir, const std::string & master,
- const std::string & sync)
+ const std::string & sync, int importance)
{
std::tr1::shared_ptr<AssociativeCollection<std::string, std::string> > keys(
new AssociativeCollection<std::string, std::string>::Concrete);
@@ -372,7 +375,7 @@ PortageEnvironment::_add_ebuild_repository(const FSEntry & portdir, const std::s
buildroot.append("/portage");
keys->insert("buildroot", buildroot);
- package_database()->add_repository(2,
+ package_database()->add_repository(importance,
RepositoryMaker::get_instance()->find_maker("ebuild")(this, keys));
}
@@ -380,7 +383,7 @@ void
PortageEnvironment::_add_portdir_overlay_repository(const FSEntry & portdir)
{
Context context("When creating PORTDIR_OVERLAY repository '" + stringify(portdir) + "':");
- _add_ebuild_repository(portdir, "gentoo", "");
+ _add_ebuild_repository(portdir, "gentoo", "", ++_imp->overlay_importance);
}
void
diff --git a/paludis/environments/portage/portage_environment.hh b/paludis/environments/portage/portage_environment.hh
index 94c5241..d917e9d 100644
--- a/paludis/environments/portage/portage_environment.hh
+++ b/paludis/environments/portage/portage_environment.hh
@@ -42,7 +42,7 @@ namespace paludis
void _add_portdir_repository(const FSEntry &);
void _add_portdir_overlay_repository(const FSEntry &);
void _add_ebuild_repository(const FSEntry &, const std::string &,
- const std::string &);
+ const std::string &, int importance);
void _add_vdb_repository();
template<typename I_>