aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-11-30 21:12:23 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-11-30 21:12:23 +0000
commit3f4b1e0567b6fbd2ae96014de2c66e247b56a155 (patch)
tree7e19d1c2135c7ce3c62c1d90a94053d656550704
parent8f04c1b9950ad5773b32af5647b1fa52da8b56d4 (diff)
downloadpaludis-3f4b1e0567b6fbd2ae96014de2c66e247b56a155.tar.gz
paludis-3f4b1e0567b6fbd2ae96014de2c66e247b56a155.tar.xz
Handle no IUSE file
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index 54c3ca1..0fdb39a 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -200,12 +200,19 @@ EInstalledRepositoryID::need_keys_added() const
}
if (! vars->iuse().name().empty())
+ {
if ((_imp->dir / vars->iuse().name()).exists())
- {
_imp->raw_iuse.reset(new EStringSetKey(shared_from_this(), vars->iuse().name(), vars->iuse().description(),
file_contents(_imp->dir / vars->iuse().name()), mkt_internal));
- add_metadata_key(_imp->raw_iuse);
+ else
+ {
+ /* hack: if IUSE doesn't exist, we still need an iuse_key to make the choices
+ * code behave sanely. */
+ _imp->raw_iuse.reset(new EStringSetKey(shared_from_this(), vars->iuse().name(), vars->iuse().description(),
+ "", mkt_internal));
}
+ add_metadata_key(_imp->raw_iuse);
+ }
if (! vars->myoptions().name().empty())
if ((_imp->dir / vars->myoptions().name()).exists())