aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2009-12-27 00:30:30 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2009-12-27 00:30:30 +0000
commit62802b315c831612f3326ffec43358bef1b02c3e (patch)
treeaac210aac11c9f7919eec2fb050bc205fc1476b6
parente51e426e68607eb823b492fbcd5789684f5ab80f (diff)
downloadpaludis-62802b315c831612f3326ffec43358bef1b02c3e.tar.gz
paludis-62802b315c831612f3326ffec43358bef1b02c3e.tar.xz
PF depends on EAPI
-rw-r--r--paludis/repositories/e/vdb_repository.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 42c317b..260615e 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -1457,8 +1457,19 @@ VDBRepository::perform_updates()
from_dir.rename(to_dir);
- SafeOFStream pf(to_dir / "PF");
- pf << newpf << std::endl;
+ std::tr1::shared_ptr<const EAPI> eapi(std::tr1::static_pointer_cast<const VDBID>(m->first)->eapi());
+ if (eapi->supported())
+ {
+ SafeOFStream pf(to_dir / eapi->supported()->ebuild_environment_variables()->env_pf());
+ pf << newpf << std::endl;
+ }
+ else
+ {
+ Log::get_instance()->message("e.vdb.updates.eapi", ll_warning, lc_context)
+ << "Unsupported EAPI '" << eapi->name() << "' for '" << *m->first
+ << ", cannot update PF-equivalent VDB key for move";
+ }
+
SafeOFStream category(to_dir / "CATEGORY");
category << m->second.category() << std::endl;