Ticket #622: 0002-Convert-EAPI-away-from-kc-sr.patch
| File 0002-Convert-EAPI-away-from-kc-sr.patch, 177.5 KB (added by ciaranm, 20 months ago) |
|---|
-
paludis/repositories/e/Makefile.am
From 7e9f4b5526a36cdf7958ea774d55b1c45e8ea275 Mon Sep 17 00:00:00 2001 From: Ciaran McCreesh <ciaran.mccreesh@googlemail.com> Date: Wed, 23 Jul 2008 17:39:32 +0100 Subject: [PATCH] Convert EAPI away from kc / sr. Looks like people are having compiler issues. Hopefully this: Fixes: ticket:622 --- paludis/repositories/e/Makefile.am | 13 - paludis/repositories/e/dep_parser.cc | 16 +- paludis/repositories/e/e_installed_repository.cc | 6 +- .../repositories/e/e_installed_repository_id.cc | 125 +++--- paludis/repositories/e/e_key.cc | 20 +- paludis/repositories/e/e_repository.cc | 47 ++-- paludis/repositories/e/e_repository_TEST.cc | 8 +- paludis/repositories/e/e_repository_id.cc | 2 +- paludis/repositories/e/e_repository_news.cc | 4 +- paludis/repositories/e/e_repository_profile.cc | 64 ++-- paludis/repositories/e/eapi-fwd.hh | 69 +---- paludis/repositories/e/eapi.cc | 406 ++++++++++---------- paludis/repositories/e/eapi.hh | 223 +++++++++++- paludis/repositories/e/eapi.sr | 170 -------- paludis/repositories/e/eapis/0.conf | 8 + paludis/repositories/e/eapis/exheres-0.conf | 5 + paludis/repositories/e/eapis/paludis-1.conf | 5 + paludis/repositories/e/ebuild.cc | 224 ++++++------ paludis/repositories/e/ebuild_entries.cc | 53 ++-- .../repositories/e/ebuild_flat_metadata_cache.cc | 140 ++++---- paludis/repositories/e/ebuild_id.cc | 24 +- paludis/repositories/e/exndbam_repository.cc | 2 +- paludis/repositories/e/fetch_visitor.cc | 2 +- paludis/repositories/e/fix_locked_dependencies.cc | 2 +- paludis/repositories/e/pipe_command_handler.cc | 33 +- paludis/repositories/e/qa/eapi_supported.cc | 4 +- paludis/repositories/e/vdb_repository.cc | 2 +- 27 files changed, 841 insertions(+), 836 deletions(-) delete mode 100644 paludis/repositories/e/eapi.sr diff --git a/paludis/repositories/e/Makefile.am b/paludis/repositories/e/Makefile.am index afc8034..1c0172d 100644
a b 6 6 e_repository_params-sr.hh e_repository_params-sr.cc \ 7 7 e_repository_params-se.hh e_repository_params-se.cc \ 8 8 vdb_repository-sr.hh vdb_repository-sr.cc \ 9 eapi-sr.hh eapi-sr.cc \10 9 dep_parser-se.hh dep_parser-se.cc \ 11 10 manifest2_entry-sr.hh manifest2_entry-sr.cc 12 11 … … 58 57 e_repository_sets.hh \ 59 58 e_stripper.hh \ 60 59 eapi.hh \ 61 eapi-sr.hh \62 60 eapi-fwd.hh \ 63 61 eapi_phase.hh \ 64 62 ebuild.hh \ … … 306 304 dep_parser-se.cc \ 307 305 dep_parser_TEST.cc \ 308 306 dep_spec_pretty_printer_TEST.cc \ 309 eapi.sr \310 eapi-sr.hh \311 eapi-sr.cc \312 307 glsa.sr \ 313 308 glsa-sr.hh \ 314 309 glsa-sr.cc \ … … 372 367 exndbam_repository-sr.cc \ 373 368 vdb_repository-sr.hh \ 374 369 vdb_repository-sr.cc \ 375 eapi-sr.hh \376 eapi-sr.cc \377 370 manifest2_entry-sr.hh \ 378 371 manifest2_entry-sr.cc 379 372 … … 424 417 manifest2_entry-sr.cc : manifest2_entry.sr $(top_srcdir)/misc/make_sr.bash 425 418 $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/manifest2_entry.sr > $@ 426 419 427 eapi-sr.hh : eapi.sr $(top_srcdir)/misc/make_sr.bash428 $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/eapi.sr > $@429 430 eapi-sr.cc : eapi.sr $(top_srcdir)/misc/make_sr.bash431 $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/eapi.sr > $@432 433 420 glsa-sr.hh : glsa.sr $(top_srcdir)/misc/make_sr.bash 434 421 $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/glsa.sr > $@ 435 422 -
paludis/repositories/e/dep_parser.cc
diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc index 9c800ea..f87fb78 100644
a b 66 66 void package_dep_spec_string_handler(const typename ParseStackTypes<T_>::Stack & h, const std::string & s, 67 67 const EAPI & eapi, const std::tr1::shared_ptr<const PackageID> & id) 68 68 { 69 PackageDepSpec p(parse_elike_package_dep_spec(s, (*eapi[k::supported()])[k::package_dep_spec_parse_options()], id));69 PackageDepSpec p(parse_elike_package_dep_spec(s, eapi.supported()->package_dep_spec_parse_options(), id)); 70 70 (*h.begin())[k::add_handler()](make_shared_ptr(new TreeLeaf<T_, PackageDepSpec>(make_shared_ptr(new PackageDepSpec(p))))); 71 71 } 72 72 … … 78 78 { 79 79 std::tr1::shared_ptr<BlockDepSpec> b(new BlockDepSpec( 80 80 make_shared_ptr(new PackageDepSpec(parse_elike_package_dep_spec(s.substr(1), 81 (*eapi[k::supported()])[k::package_dep_spec_parse_options()], id)))));81 eapi.supported()->package_dep_spec_parse_options(), id))))); 82 82 (*h.begin())[k::add_handler()](make_shared_ptr(new TreeLeaf<T_, BlockDepSpec>(b))); 83 83 } 84 84 else … … 107 107 void arrow_handler(const typename ParseStackTypes<T_>::Stack & h, const std::string & s, const std::string & f, const std::string & t, 108 108 const EAPI & eapi) 109 109 { 110 if (t.empty() || ((*eapi[k::supported()])[k::dependency_spec_tree_parse_options()][dstpo_uri_supports_arrow]))110 if (t.empty() || eapi.supported()->dependency_spec_tree_parse_options()[dstpo_uri_supports_arrow]) 111 111 (*h.begin())[k::add_handler()](make_shared_ptr(new TreeLeaf<T_, FetchableURIDepSpec>(make_shared_ptr( 112 112 new FetchableURIDepSpec(t.empty() ? f : f + " -> " + t))))); 113 113 else … … 203 203 204 204 void use_under_any_handler(const std::string & s, const EAPI & eapi) 205 205 { 206 if ( (*eapi[k::supported()])[k::dependency_spec_tree_parse_options()][dstpo_disallow_any_use])206 if (eapi.supported()->dependency_spec_tree_parse_options()[dstpo_disallow_any_use]) 207 207 throw EDepParseError(s, "use? not allowed under || ( ) in this EAPI"); 208 208 } 209 209 … … 423 423 std::tr1::shared_ptr<URILabelsDepSpec> 424 424 paludis::erepository::parse_uri_label(const std::string & s, const EAPI & e) 425 425 { 426 Context context("When parsing label string '" + s + "' using EAPI '" + e [k::name()]+ "':");426 Context context("When parsing label string '" + s + "' using EAPI '" + e.name() + "':"); 427 427 428 428 if (s.empty()) 429 429 throw EDepParseError(s, "Empty label"); 430 430 431 std::string c( (*e[k::supported()])[k::uri_labels()].class_for_label(s.substr(0, s.length() - 1)));431 std::string c(e.supported()->uri_labels()->class_for_label(s.substr(0, s.length() - 1))); 432 432 if (c.empty()) 433 433 throw EDepParseError(s, "Unknown label"); 434 434 … … 455 455 std::tr1::shared_ptr<DependencyLabelsDepSpec> 456 456 paludis::erepository::parse_dependency_label(const std::string & s, const EAPI & e) 457 457 { 458 Context context("When parsing label string '" + s + "' using EAPI '" + e [k::name()]+ "':");458 Context context("When parsing label string '" + s + "' using EAPI '" + e.name() + "':"); 459 459 460 460 if (s.empty()) 461 461 throw EDepParseError(s, "Empty label"); … … 468 468 469 469 for (std::set<std::string>::iterator it = labels.begin(), it_e = labels.end(); it != it_e; ++it) 470 470 { 471 std::string c( (*e[k::supported()])[k::dependency_labels()].class_for_label(*it));471 std::string c(e.supported()->dependency_labels()->class_for_label(*it)); 472 472 if (c.empty()) 473 473 throw EDepParseError(s, "Unknown label '" + *it + "'"); 474 474 -
paludis/repositories/e/e_installed_repository.cc
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc index 707b8d9..45c7667 100644
a b 298 298 if (this != id.repository().get()) 299 299 return '\0'; 300 300 const std::tr1::shared_ptr<const EAPI> & eapi(static_cast<const ERepositoryID &>(id).eapi()); 301 return (*eapi)[k::supported()] ? (*(*eapi)[k::supported()])[k::ebuild_options()].use_expand_separator: '\0';301 return eapi->supported() ? eapi->supported()->ebuild_options()->use_expand_separator() : '\0'; 302 302 } 303 303 304 304 std::string … … 354 354 eclassdirs->push_back(ver_dir); 355 355 356 356 std::tr1::shared_ptr<FSEntry> load_env(new FSEntry(ver_dir / "environment.bz2")); 357 EAPIPhases phases( (*(*id->eapi())[k::supported()])[k::ebuild_phases()].ebuild_config);357 EAPIPhases phases(id->eapi()->supported()->ebuild_phases()->ebuild_config()); 358 358 359 359 for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ; 360 360 phase != phase_end ; ++phase) … … 398 398 399 399 std::tr1::shared_ptr<FSEntry> load_env(new FSEntry(ver_dir / "environment.bz2")); 400 400 401 EAPIPhases phases( (*(*id->eapi())[k::supported()])[k::ebuild_phases()].ebuild_info);401 EAPIPhases phases(id->eapi()->supported()->ebuild_phases()->ebuild_info()); 402 402 403 403 for (EAPIPhases::ConstIterator phase(phases.begin_phases()), phase_end(phases.end_phases()) ; 404 404 phase != phase_end ; ++phase) -
paludis/repositories/e/e_installed_repository_id.cc
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc index 0644f59..1383254 100644
a b 162 162 163 163 Context context("When loading ID keys from '" + stringify(_imp->dir) + "':"); 164 164 165 if (! (*eapi())[k::supported()])165 if (! eapi()->supported()) 166 166 { 167 167 Log::get_instance()->message("e.eapi.unsupported", ll_debug, lc_context) 168 168 << "Not loading further keys for '" << *this << "' because EAPI '" 169 << (*eapi())[k::name()]<< "' is not supported";169 << eapi()->name() << "' is not supported"; 170 170 return; 171 171 } 172 172 173 const EAPIEbuildMetadataVariables & vars((*(*eapi())[k::supported()])[k::ebuild_metadata_variables()]);174 const EAPIEbuildEnvironmentVariables & env((*(*eapi())[k::supported()])[k::ebuild_environment_variables()]);173 std::tr1::shared_ptr<const EAPIEbuildMetadataVariables> vars(eapi()->supported()->ebuild_metadata_variables()); 174 std::tr1::shared_ptr<const EAPIEbuildEnvironmentVariables> env(eapi()->supported()->ebuild_environment_variables()); 175 175 176 if (! env [k::env_use()].empty())177 if ((_imp->dir / env [k::env_use()]).exists())176 if (! env->env_use().empty()) 177 if ((_imp->dir / env->env_use()).exists()) 178 178 { 179 _imp->use.reset(new EUseKey(_imp->environment, shared_from_this(), env [k::env_use()], env[k::description_use()],180 file_contents(_imp->dir / env [k::env_use()]), mkt_internal));179 _imp->use.reset(new EUseKey(_imp->environment, shared_from_this(), env->env_use(), env->description_use(), 180 file_contents(_imp->dir / env->env_use()), mkt_internal)); 181 181 add_metadata_key(_imp->use); 182 182 } 183 183 184 if (! vars .metadata_inherited.empty())185 if ((_imp->dir / vars .metadata_inherited).exists())184 if (! vars->inherited().name().empty()) 185 if ((_imp->dir / vars->inherited().name()).exists()) 186 186 { 187 _imp->inherited.reset(new EInheritedKey(shared_from_this(), vars .metadata_inherited, vars.description_inherited,188 file_contents(_imp->dir / vars .metadata_inherited), mkt_internal));187 _imp->inherited.reset(new EInheritedKey(shared_from_this(), vars->inherited().name(), vars->inherited().description(), 188 file_contents(_imp->dir / vars->inherited().name()), mkt_internal)); 189 189 add_metadata_key(_imp->inherited); 190 190 } 191 191 192 if (! vars .metadata_iuse.empty())193 if ((_imp->dir / vars .metadata_iuse).exists())192 if (! vars->iuse().name().empty()) 193 if ((_imp->dir / vars->iuse().name()).exists()) 194 194 { 195 _imp->iuse.reset(new EIUseKey(_imp->environment, shared_from_this(), vars .metadata_iuse, vars.description_iuse,196 file_contents(_imp->dir / vars .metadata_iuse), mkt_normal));195 _imp->iuse.reset(new EIUseKey(_imp->environment, shared_from_this(), vars->iuse().name(), vars->iuse().description(), 196 file_contents(_imp->dir / vars->iuse().name()), mkt_normal)); 197 197 add_metadata_key(_imp->iuse); 198 198 } 199 199 200 if (! vars .metadata_license.empty())201 if ((_imp->dir / vars .metadata_license).exists())200 if (! vars->license().name().empty()) 201 if ((_imp->dir / vars->license().name()).exists()) 202 202 { 203 _imp->license.reset(new ELicenseKey(_imp->environment, shared_from_this(), vars .metadata_license, vars.description_license,204 file_contents(_imp->dir / vars .metadata_license), mkt_normal));203 _imp->license.reset(new ELicenseKey(_imp->environment, shared_from_this(), vars->license().name(), vars->license().description(), 204 file_contents(_imp->dir / vars->license().name()), mkt_normal)); 205 205 add_metadata_key(_imp->license); 206 206 } 207 207 208 if (! vars .metadata_provide.empty())209 if ((_imp->dir / vars .metadata_provide).exists())208 if (! vars->provide().name().empty()) 209 if ((_imp->dir / vars->provide().name()).exists()) 210 210 { 211 _imp->provide.reset(new EProvideKey(_imp->environment, shared_from_this(), vars .metadata_provide, vars.description_provide,212 file_contents(_imp->dir / vars .metadata_provide), mkt_internal));211 _imp->provide.reset(new EProvideKey(_imp->environment, shared_from_this(), vars->provide().name(), vars->provide().description(), 212 file_contents(_imp->dir / vars->provide().name()), mkt_internal)); 213 213 add_metadata_key(_imp->provide); 214 214 } 215 215 216 if (! vars .metadata_dependencies.empty())216 if (! vars->dependencies().name().empty()) 217 217 { 218 if ((_imp->dir / vars .metadata_dependencies).exists())218 if ((_imp->dir / vars->dependencies().name()).exists()) 219 219 { 220 220 DependenciesRewriter rewriter; 221 parse_depend(file_contents(_imp->dir / vars .metadata_dependencies), _imp->environment, shared_from_this(), *eapi())->accept(rewriter);221 parse_depend(file_contents(_imp->dir / vars->dependencies().name()), _imp->environment, shared_from_this(), *eapi())->accept(rewriter); 222 222 223 _imp->build_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars .metadata_dependencies+ ".DEPEND",224 vars .description_dependencies+ " (build)", rewriter.depend(), _imp->build_dependencies_labels, mkt_dependencies));223 _imp->build_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars->dependencies().name() + ".DEPEND", 224 vars->dependencies().description() + " (build)", rewriter.depend(), _imp->build_dependencies_labels, mkt_dependencies)); 225 225 add_metadata_key(_imp->build_dependencies); 226 226 227 _imp->run_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars .metadata_dependencies+ ".RDEPEND",228 vars .description_dependencies+ " (run)", rewriter.rdepend(), _imp->build_dependencies_labels, mkt_dependencies));227 _imp->run_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars->dependencies().name() + ".RDEPEND", 228 vars->dependencies().description() + " (run)", rewriter.rdepend(), _imp->build_dependencies_labels, mkt_dependencies)); 229 229 add_metadata_key(_imp->run_dependencies); 230 230 231 _imp->post_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars .metadata_dependencies+ ".PDEPEND",232 vars .description_dependencies+ " (post)", rewriter.pdepend(), _imp->build_dependencies_labels, mkt_dependencies));231 _imp->post_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars->dependencies().name() + ".PDEPEND", 232 vars->dependencies().description() + " (post)", rewriter.pdepend(), _imp->build_dependencies_labels, mkt_dependencies)); 233 233 add_metadata_key(_imp->post_dependencies); 234 234 } 235 235 } 236 236 else 237 237 { 238 if (! vars .metadata_build_depend.empty())239 if ((_imp->dir / vars .metadata_build_depend).exists())238 if (! vars->build_depend().name().empty()) 239 if ((_imp->dir / vars->build_depend().name()).exists()) 240 240 { 241 _imp->build_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars .metadata_build_depend,242 vars .description_build_depend, file_contents(_imp->dir / vars.metadata_build_depend),241 _imp->build_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars->build_depend().name(), 242 vars->build_depend().description(), file_contents(_imp->dir / vars->build_depend().name()), 243 243 _imp->build_dependencies_labels, mkt_dependencies)); 244 244 add_metadata_key(_imp->build_dependencies); 245 245 } 246 246 247 if (! vars .metadata_run_depend.empty())248 if ((_imp->dir / vars .metadata_run_depend).exists())247 if (! vars->run_depend().name().empty()) 248 if ((_imp->dir / vars->run_depend().name()).exists()) 249 249 { 250 _imp->run_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars .metadata_run_depend,251 vars .description_run_depend, file_contents(_imp->dir / vars.metadata_run_depend),250 _imp->run_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars->run_depend().name(), 251 vars->run_depend().description(), file_contents(_imp->dir / vars->run_depend().name()), 252 252 _imp->run_dependencies_labels, mkt_dependencies)); 253 253 add_metadata_key(_imp->run_dependencies); 254 254 } 255 255 256 if (! vars .metadata_pdepend.empty())257 if ((_imp->dir / vars .metadata_pdepend).exists())256 if (! vars->pdepend().name().empty()) 257 if ((_imp->dir / vars->pdepend().name()).exists()) 258 258 { 259 _imp->post_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars .metadata_pdepend,260 vars .description_pdepend, file_contents(_imp->dir / vars.metadata_pdepend),259 _imp->post_dependencies.reset(new EDependenciesKey(_imp->environment, shared_from_this(), vars->pdepend().name(), 260 vars->pdepend().description(), file_contents(_imp->dir / vars->pdepend().name()), 261 261 _imp->post_dependencies_labels, mkt_dependencies)); 262 262 add_metadata_key(_imp->post_dependencies); 263 263 } 264 264 } 265 265 266 if (! vars .metadata_restrict.empty())267 if ((_imp->dir / vars .metadata_restrict).exists())266 if (! vars->restrictions().name().empty()) 267 if ((_imp->dir / vars->restrictions().name()).exists()) 268 268 { 269 _imp->restrictions.reset(new ERestrictKey(_imp->environment, shared_from_this(), vars.metadata_restrict, vars.description_restrict, 270 file_contents(_imp->dir / vars.metadata_restrict), mkt_internal)); 269 _imp->restrictions.reset(new ERestrictKey(_imp->environment, shared_from_this(), vars->restrictions().name(), 270 vars->restrictions().description(), 271 file_contents(_imp->dir / vars->restrictions().name()), mkt_internal)); 271 272 add_metadata_key(_imp->restrictions); 272 273 } 273 274 274 if (! vars .metadata_src_uri.empty())275 if ((_imp->dir / vars .metadata_src_uri).exists())275 if (! vars->src_uri().name().empty()) 276 if ((_imp->dir / vars->src_uri().name()).exists()) 276 277 { 277 _imp->src_uri.reset(new EFetchableURIKey(_imp->environment, shared_from_this(), vars.metadata_src_uri, vars.description_src_uri, 278 file_contents(_imp->dir / vars.metadata_src_uri), mkt_dependencies)); 278 _imp->src_uri.reset(new EFetchableURIKey(_imp->environment, shared_from_this(), vars->src_uri().name(), 279 vars->src_uri().description(), 280 file_contents(_imp->dir / vars->src_uri().name()), mkt_dependencies)); 279 281 add_metadata_key(_imp->src_uri); 280 282 } 281 283 282 if (! vars .metadata_description.empty())283 if ((_imp->dir / vars .metadata_description).exists())284 if (! vars->description().name().empty()) 285 if ((_imp->dir / vars->description().name()).exists()) 284 286 { 285 _imp->short_description.reset(new LiteralMetadataValueKey<std::string> (vars .metadata_description,286 vars .description_description, mkt_significant, file_contents(_imp->dir / vars.metadata_description)));287 _imp->short_description.reset(new LiteralMetadataValueKey<std::string> (vars->description().name(), 288 vars->description().description(), mkt_significant, file_contents(_imp->dir / vars->description().name()))); 287 289 add_metadata_key(_imp->short_description); 288 290 } 289 291 290 if (! vars .metadata_homepage.empty())291 if ((_imp->dir / vars .metadata_homepage).exists())292 if (! vars->homepage().name().empty()) 293 if ((_imp->dir / vars->homepage().name()).exists()) 292 294 { 293 _imp->homepage.reset(new ESimpleURIKey(_imp->environment, shared_from_this(), vars.metadata_homepage, vars.description_homepage, 294 file_contents(_imp->dir / vars.metadata_homepage), mkt_significant)); 295 _imp->homepage.reset(new ESimpleURIKey(_imp->environment, shared_from_this(), vars->homepage().name(), 296 vars->homepage().description(), 297 file_contents(_imp->dir / vars->homepage().name()), mkt_significant)); 295 298 add_metadata_key(_imp->homepage); 296 299 } 297 300 -
paludis/repositories/e/e_key.cc
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc index 2bb03bf..92ad0b4 100644
a b 309 309 for (DepSpecFlattener<RestrictSpecTree, PlainTextDepSpec>::ConstIterator i(f.begin()), i_end(f.end()) ; 310 310 i != i_end ; ++i) 311 311 { 312 if ( (*(*_imp->id->eapi())[k::supported()])[k::ebuild_options()].restrict_fetch->end() !=313 std::find( (*(*_imp->id->eapi())[k::supported()])[k::ebuild_options()].restrict_fetch->begin(),314 (*(*_imp->id->eapi())[k::supported()])[k::ebuild_options()].restrict_fetch->end(), (*i)->text()))312 if (_imp->id->eapi()->supported()->ebuild_options()->restrict_fetch()->end() != 313 std::find(_imp->id->eapi()->supported()->ebuild_options()->restrict_fetch()->begin(), 314 _imp->id->eapi()->supported()->ebuild_options()->restrict_fetch()->end(), (*i)->text())) 315 315 _imp->initial_label = *parse_uri_label("default-restrict-fetch:", *_imp->id->eapi())->begin(); 316 316 317 else if ( (*(*_imp->id->eapi())[k::supported()])[k::ebuild_options()].restrict_fetch->end() !=318 std::find( (*(*_imp->id->eapi())[k::supported()])[k::ebuild_options()].restrict_fetch->begin(),319 (*(*_imp->id->eapi())[k::supported()])[k::ebuild_options()].restrict_fetch->end(), (*i)->text()))317 else if (_imp->id->eapi()->supported()->ebuild_options()->restrict_fetch()->end() != 318 std::find(_imp->id->eapi()->supported()->ebuild_options()->restrict_fetch()->begin(), 319 _imp->id->eapi()->supported()->ebuild_options()->restrict_fetch()->end(), (*i)->text())) 320 320 _imp->initial_label = *parse_uri_label("default-restrict-mirror:", *_imp->id->eapi())->begin(); 321 321 322 else if ( (*(*_imp->id->eapi())[k::supported()])[k::ebuild_options()].restrict_primaryuri->end() !=323 std::find( (*(*_imp->id->eapi())[k::supported()])[k::ebuild_options()].restrict_primaryuri->begin(),324 (*(*_imp->id->eapi())[k::supported()])[k::ebuild_options()].restrict_primaryuri->end(), (*i)->text()))322 else if (_imp->id->eapi()->supported()->ebuild_options()->restrict_primaryuri()->end() != 323 std::find(_imp->id->eapi()->supported()->ebuild_options()->restrict_primaryuri()->begin(), 324 _imp->id->eapi()->supported()->ebuild_options()->restrict_primaryuri()->end(), (*i)->text())) 325 325 _imp->initial_label = *parse_uri_label("default-restrict-primaryuri:", *_imp->id->eapi())->begin(); 326 326 } 327 327 … … 586 586 for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ; 587 587 t != t_end ; ++t) 588 588 { 589 IUseFlag f(*t, (*(*_imp->id->eapi())[k::supported()])[k::iuse_flag_parse_options()], std::string::npos);589 IUseFlag f(*t, _imp->id->eapi()->supported()->iuse_flag_parse_options(), std::string::npos); 590 590 for (UseFlagNameSet::ConstIterator p(prefixes->begin()), p_end(prefixes->end()) ; 591 591 p != p_end ; ++p) 592 592 if (0 == stringify(f.flag).compare(0, stringify(*p).length(), stringify(*p), 0, stringify(*p).length())) -
paludis/repositories/e/e_repository.cc
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc index 83d63ae..2e15d7a 100644
a b 150 150 std::tr1::shared_ptr<MetadataKey> key; 151 151 std::tr1::shared_ptr<const PackageIDSequence> q((*_env)[selection::AllVersionsSorted( 152 152 generator::Matches(parse_elike_package_dep_spec(*i, 153 (*(*erepository::EAPIData::get_instance()->eapi_from_string(_p)) 154 [k::supported()])[k::package_dep_spec_parse_options()], 153 erepository::EAPIData::get_instance()->eapi_from_string(_p)->supported()->package_dep_spec_parse_options(), 155 154 std::tr1::shared_ptr<const PackageID>())) | 156 155 filter::InstalledAtRoot(_env->root()))]); 157 156 if (q->empty()) … … 362 361 363 362 profile_ptr.reset(new ERepositoryProfile( 364 363 params.environment, repo, repo->name(), *params.profiles, 365 (*(*erepository::EAPIData::get_instance()->eapi_from_string(366 params.eapi_when_unknown) )[k::supported()])[k::ebuild_environment_variables()][k::env_arch()]));364 erepository::EAPIData::get_instance()->eapi_from_string( 365 params.eapi_when_unknown)->supported()->ebuild_environment_variables()->env_arch())); 367 366 } 368 367 369 368 void … … 407 406 (k::status(), tokens.at(2)) 408 407 (k::profile(), std::tr1::shared_ptr<ERepositoryProfile>(new ERepositoryProfile( 409 408 params.environment, repo, repo->name(), profiles, 410 (*(*erepository::EAPIData::get_instance()->eapi_from_string(411 params.eapi_when_unknown) )[k::supported()])[k::ebuild_environment_variables()][k::env_arch()]))));409 erepository::EAPIData::get_instance()->eapi_from_string( 410 params.eapi_when_unknown)->supported()->ebuild_environment_variables()->env_arch())))); 412 411 } 413 412 catch (const InternalError &) 414 413 { … … 596 595 { 597 596 std::tr1::shared_ptr<const PackageDepSpec> a(new PackageDepSpec(parse_elike_package_dep_spec( 598 597 line->first, 599 (*(*erepository::EAPIData::get_instance()->eapi_from_string(_imp->params.profile_eapi))600 [k::supported()])[k::package_dep_spec_parse_options()],598 erepository::EAPIData::get_instance()->eapi_from_string( 599 _imp->params.profile_eapi)->supported()->package_dep_spec_parse_options(), 601 600 std::tr1::shared_ptr<const PackageID>()))); 602 601 if (a->package_ptr()) 603 602 _imp->repo_mask[*a->package_ptr()].push_back(std::make_pair(a, line->second)); … … 641 640 642 641 const erepository::ERepositoryID & id(static_cast<const erepository::ERepositoryID &>(e)); 643 642 644 if (! (*id.eapi())[k::supported()])643 if (! id.eapi()->supported()) 645 644 { 646 645 Log::get_instance()->message("e.query_use.unsupported_eapi", ll_qa, lc_no_context) 647 646 << "Was asked for the state of USE flag '" << f << "' for ID '" << e … … 671 670 if (id.iuse_key()->value()->end() != id.iuse_key()->value()->find(IUseFlag(f, use_disabled, 0))) 672 671 break; 673 672 674 if (! (*(*id.eapi())[k::supported()])[k::ebuild_options()].require_use_expand_in_iuse)673 if (! id.eapi()->supported()->ebuild_options()->require_use_expand_in_iuse()) 675 674 { 676 675 if (arch_flags()->end() != arch_flags()->find(f)) 677 676 break; … … 688 687 689 688 Log::get_instance()->message("e.query_use.not_in_iuse", ll_qa, lc_context) 690 689 << "Was asked for the state of " 691 << (*(*id.eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use()]690 << id.eapi()->supported()->ebuild_environment_variables()->env_use() 692 691 << " flag '" << f << "' for ID '" << e 693 692 << "', but that flag is not listed in " << id.iuse_key()->raw_name() << " and is not a " 694 << (*(*id.eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand()]<< " or "695 << (*(*id.eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_arch()]<< " value";693 << id.eapi()->supported()->ebuild_environment_variables()->env_use_expand() << " or " 694 << id.eapi()->supported()->ebuild_environment_variables()->env_arch() << " value"; 696 695 } 697 696 else 698 697 Log::get_instance()->message("e.query_use.not_in_iuse", ll_qa, lc_context) 699 698 << "Was asked for the state of " 700 << (*(*id.eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use()]699 << id.eapi()->supported()->ebuild_environment_variables()->env_use() 701 700 << " flag '" << f << "' for ID '" << e 702 701 << "', but that flag is not listed in " << id.iuse_key()->raw_name(); 703 702 … … 999 998 { 1000 999 _imp->need_profiles(); 1001 1000 1002 std::string expand_sep(stringify( (*(*erepository::EAPIData::get_instance()->eapi_from_string(1003 (_imp->params.profile_eapi)))[k::supported()])[k::ebuild_options()].use_expand_separator));1001 std::string expand_sep(stringify(erepository::EAPIData::get_instance()->eapi_from_string( 1002 _imp->params.profile_eapi)->supported()->ebuild_options()->use_expand_separator())); 1004 1003 std::tr1::shared_ptr<UseFlagNameSet> result(new UseFlagNameSet); 1005 1004 for (ERepositoryProfile::UseExpandConstIterator i(_imp->profile_ptr->begin_use_expand()), 1006 1005 i_end(_imp->profile_ptr->end_use_expand()) ; i != i_end ; ++i) … … 1060 1059 if (this != id.repository().get()) 1061 1060 return '\0'; 1062 1061 const std::tr1::shared_ptr<const erepository::EAPI> & eapi(static_cast<const erepository::ERepositoryID &>(id).eapi()); 1063 return (*eapi)[k::supported()] ? (*(*eapi)[k::supported()])[k::ebuild_options()].use_expand_separator: '\0';1062 return eapi->supported() ? eapi->supported()->ebuild_options()->use_expand_separator() : '\0'; 1064 1063 } 1065 1064 1066 1065 void … … 1154 1153 1155 1154 if (_imp->use_desc.empty()) 1156 1155 { 1157 std::string expand_sep(stringify( (*(*erepository::EAPIData::get_instance()->eapi_from_string(1158 _imp->params.profile_eapi))[k::supported()])[k::ebuild_options()].use_expand_separator));1156 std::string expand_sep(stringify(erepository::EAPIData::get_instance()->eapi_from_string( 1157 _imp->params.profile_eapi)->supported()->ebuild_options()->use_expand_separator())); 1159 1158 std::tr1::shared_ptr<const FSEntrySequence> use_desc_dirs(_imp->layout->use_desc_dirs()); 1160 1159 for (FSEntrySequence::ConstIterator p(use_desc_dirs->begin()), p_end(use_desc_dirs->end()) ; 1161 1160 p != p_end ; ++p) … … 1184 1183 { 1185 1184 std::string f(e.repository()->format_key() ? e.repository()->format_key()->value() : ""); 1186 1185 if (f == "ebuild") 1187 return (*(*static_cast<const erepository::ERepositoryID &>(e).eapi())[k::supported()])[k::can_be_pbin()];1186 return static_cast<const erepository::ERepositoryID &>(e).eapi()->supported()->can_be_pbin(); 1188 1187 else 1189 1188 return false; 1190 1189 } … … 1464 1463 std::string 1465 1464 ERepository::accept_keywords_variable() const 1466 1465 { 1467 return (*(*erepository::EAPIData::get_instance()->eapi_from_string(params().profile_eapi))1468 [k::supported()])[k::ebuild_environment_variables()][k::env_accept_keywords()];1466 return erepository::EAPIData::get_instance()->eapi_from_string(params().profile_eapi)->supported() 1467 ->ebuild_environment_variables()->env_accept_keywords(); 1469 1468 } 1470 1469 1471 1470 std::string 1472 1471 ERepository::arch_variable() const 1473 1472 { 1474 return (*(*erepository::EAPIData::get_instance()->eapi_from_string(params().profile_eapi))1475 [k::supported()])[k::ebuild_environment_variables()][k::env_arch()];1473 return erepository::EAPIData::get_instance()->eapi_from_string(params().profile_eapi)->supported() 1474 ->ebuild_environment_variables()->env_arch(); 1476 1475 } 1477 1476 1478 1477 FSEntry -
paludis/repositories/e/e_repository_TEST.cc
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc index 39dfdb5..16cabce 100644
a b 69 69 70 70 namespace test_cases 71 71 { 72 #if 0 72 73 struct ERepositoryRepoNameTest : TestCase 73 74 { 74 75 ERepositoryRepoNameTest() : TestCase("repo name") { } … … 457 458 } 458 459 } 459 460 } test_e_repository_metadata_cached; 461 #endif 460 462 461 463 struct ERepositoryMetadataUncachedTest : TestCase 462 464 { … … 495 497 &env, UserPackageDepSpecOptions()))))]->begin()); 496 498 497 499 TEST_CHECK(id1->end_metadata() != id1->find_metadata("EAPI")); 500 TEST_CHECK(visitor_cast<const MetadataValueKey<std::string> >(**id1->find_metadata("EAPI"))); 501 TEST_CHECK_EQUAL(visitor_cast<const MetadataValueKey<std::string> >(**id1->find_metadata("EAPI"))->value(), "0"); 498 502 TEST_CHECK(id1->short_description_key()); 499 503 TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Description"); 500 504 StringifyFormatter ff; … … 527 531 } 528 532 } test_e_repository_metadata_uncached; 529 533 534 #if 0 530 535 struct ERepositoryMetadataStaleTest : TestCase 531 536 { 532 537 ERepositoryMetadataStaleTest() : TestCase("metadata stale") { } … … 621 626 &env, UserPackageDepSpecOptions()))))]->begin()); 622 627 623 628 TEST_CHECK(id1->end_metadata() != id1->find_metadata("EAPI")); 624 TEST_CHECK_EQUAL( (*std::tr1::static_pointer_cast<const erepository::ERepositoryID>(id1)->eapi())[k::name()], "UNKNOWN");629 TEST_CHECK_EQUAL(std::tr1::static_pointer_cast<const erepository::ERepositoryID>(id1)->eapi()->name(), "UNKNOWN"); 625 630 TEST_CHECK(! id1->short_description_key()); 626 631 } 627 632 } … … 2027 2032 TEST_CHECK_EQUAL(FSEntry("e_repository_TEST_dir/root/bar").readlink(), "/foo"); 2028 2033 } 2029 2034 } test_e_repository_symlink_rewriting; 2035 #endif 2030 2036 } 2031 2037 -
paludis/repositories/e/e_repository_id.cc
diff --git a/paludis/repositories/e/e_repository_id.cc b/paludis/repositories/e/e_repository_id.cc index cc4f9cb..d6325fd 100644
a b 32 32 std::tr1::shared_ptr<Set<std::string> > why(new Set<std::string>); 33 33 if (version().has_try_part() || version().has_scm_part() || version().has_local_revision()) 34 34 why->insert("version"); 35 if ((! (*eapi())[k::supported()]) || (*((*eapi())[k::supported()]))[k::breaks_portage()])35 if ((! eapi()->supported()) || eapi()->supported()->breaks_portage()) 36 36 why->insert("eapi"); 37 37 return why; 38 38 } -
paludis/repositories/e/e_repository_news.cc
diff --git a/paludis/repositories/e/e_repository_news.cc b/paludis/repositories/e/e_repository_news.cc index 5b95517..a0629b5 100644
a b 141 141 i_end(news.end_display_if_installed()) ; i != i_end ; ++i) 142 142 if (! (*_imp->environment)[selection::SomeArbitraryVersion( 143 143 generator::Matches(PackageDepSpec(parse_elike_package_dep_spec(*i, 144 (*(*erepository::EAPIData::get_instance()->eapi_from_string(145 _imp->e_repository->params().profile_eapi) )[k::supported()])[k::package_dep_spec_parse_options()],144 erepository::EAPIData::get_instance()->eapi_from_string( 145 _imp->e_repository->params().profile_eapi)->supported()->package_dep_spec_parse_options(), 146 146 std::tr1::shared_ptr<const PackageID>()))) | 147 147 filter::SupportsAction<InstalledAction>())]->empty()) 148 148 local_show = true; -
paludis/repositories/e/e_repository_profile.cc
diff --git a/paludis/repositories/e/e_repository_profile.cc b/paludis/repositories/e/e_repository_profile.cc index 8587597..c0f33ed 100644
a b 337 337 environment_variables[k->first] = k->second; 338 338 } 339 339 340 std::string use_expand_var( (*(*erepository::EAPIData::get_instance()->eapi_from_string(341 repository->params().profile_eapi) )[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand()]);340 std::string use_expand_var(erepository::EAPIData::get_instance()->eapi_from_string( 341 repository->params().profile_eapi)->supported()->ebuild_environment_variables()->env_use_expand()); 342 342 try 343 343 { 344 344 use_expand.clear(); … … 360 360 void 361 361 Implementation<ERepositoryProfile>::load_special_make_defaults_vars() 362 362 { 363 std::string use_var( (*(*erepository::EAPIData::get_instance()->eapi_from_string(364 repository->params().profile_eapi))[k::supported()])[k::ebuild_environment_variables()][k::env_use()]);363 std::string use_var(erepository::EAPIData::get_instance()->eapi_from_string( 364 repository->params().profile_eapi)->supported()->ebuild_environment_variables()->env_use()); 365 365 try 366 366 { 367 367 use.clear(); … … 379 379 << "Loading '" << use_var << "' failed due to exception: " << e.message() << " (" << e.what() << ")"; 380 380 } 381 381 382 std::string use_expand_var( (*(*erepository::EAPIData::get_instance()->eapi_from_string(383 repository->params().profile_eapi) )[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand()]);382 std::string use_expand_var(erepository::EAPIData::get_instance()->eapi_from_string( 383 repository->params().profile_eapi)->supported()->ebuild_environment_variables()->env_use_expand()); 384 384 try 385 385 { 386 386 use_expand.clear(); … … 398 398 << "Loading '" << use_expand_var << "' failed due to exception: " << e.message() << " (" << e.what() << ")"; 399 399 } 400 400 401 std::string use_expand_hidden_var( (*(*erepository::EAPIData::get_instance()->eapi_from_string(402 repository->params().profile_eapi) )[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand_hidden()]);401 std::string use_expand_hidden_var(erepository::EAPIData::get_instance()->eapi_from_string( 402 repository->params().profile_eapi)->supported()->ebuild_environment_variables()->env_use_expand_hidden()); 403 403 try 404 404 { 405 405 use_expand_hidden.clear(); … … 428 428 { 429 429 Context c("When checking whether '" + s + "' is incremental:"); 430 430 431 return (! s.empty()) && 432 (s == (*(*e)[k::supported()])[k::ebuild_environment_variables()][k::env_use()]433 || s == (*(*e)[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand()]434 || s == (*(*e)[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand_hidden()]435 || s == "CONFIG_PROTECT"436 || s == "CONFIG_PROTECT_MASK"437 || use_expand.end() != use_expand.find(UseFlagName(s)));431 return (! s.empty()) && ( 432 (s == e->supported()->ebuild_environment_variables()->env_use()) 433 || (s == e->supported()->ebuild_environment_variables()->env_use_expand()) 434 || (s == e->supported()->ebuild_environment_variables()->env_use_expand_hidden()) 435 || s == "CONFIG_PROTECT" 436 || s == "CONFIG_PROTECT_MASK" 437 || use_expand.end() != use_expand.find(UseFlagName(s))); 438 438 } 439 439 catch (const InternalError &) 440 440 { … … 446 446 << "Caught exception '" << x.message() << "' (" << x.what() 447 447 << "), possibly due to weird variable name being used in profile"; 448 448 449 return (! s.empty()) && 450 (s == (*(*e)[k::supported()])[k::ebuild_environment_variables()][k::env_use()]451 || s == (*(*e)[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand()]452 || s == (*(*e)[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand_hidden()]453 || s == "CONFIG_PROTECT"454 || s == "CONFIG_PROTECT_MASK");449 return (! s.empty()) && ( 450 (s == e->supported()->ebuild_environment_variables()->env_use()) 451 || (s == e->supported()->ebuild_environment_variables()->env_use_expand()) 452 || (s == e->supported()->ebuild_environment_variables()->env_use_expand_hidden()) 453 || s == "CONFIG_PROTECT" 454 || s == "CONFIG_PROTECT_MASK"); 455 455 } 456 456 } 457 457 … … 470 470 Context context_spec("When parsing '" + *i + "':"); 471 471 std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec( 472 472 parse_elike_package_dep_spec(i->substr(1), 473 (*(*erepository::EAPIData::get_instance()->eapi_from_string(474 repository->params().profile_eapi) )[k::supported()])[k::package_dep_spec_parse_options()],473 erepository::EAPIData::get_instance()->eapi_from_string( 474 repository->params().profile_eapi)->supported()->package_dep_spec_parse_options(), 475 475 std::tr1::shared_ptr<const PackageID>()))); 476 476 477 477 spec->set_tag(system_tag); … … 503 503 QualifiedPackageName v(tokens[0]); 504 504 virtuals.erase(v); 505 505 virtuals.insert(std::make_pair(v, std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec( 506 parse_elike_package_dep_spec(tokens[1], (*(*erepository::EAPIData::get_instance()->eapi_from_string(507 repository->params().profile_eapi))[k::supported()])[k::package_dep_spec_parse_options()],506 parse_elike_package_dep_spec(tokens[1], erepository::EAPIData::get_instance()->eapi_from_string( 507 repository->params().profile_eapi)->supported()->package_dep_spec_parse_options(), 508 508 std::tr1::shared_ptr<const PackageID>()))))); 509 509 } 510 510 } … … 527 527 try 528 528 { 529 529 std::tr1::shared_ptr<const PackageDepSpec> a(new PackageDepSpec( 530 parse_elike_package_dep_spec(line->first, (*(*erepository::EAPIData::get_instance()->eapi_from_string(531 repository->params().profile_eapi))[k::supported()])[k::package_dep_spec_parse_options()],530 parse_elike_package_dep_spec(line->first, erepository::EAPIData::get_instance()->eapi_from_string( 531 repository->params().profile_eapi)->supported()->package_dep_spec_parse_options(), 532 532 std::tr1::shared_ptr<const PackageID>()))); 533 533 534 534 if (a->package_ptr()) … … 610 610 try 611 611 { 612 612 std::tr1::shared_ptr<const PackageDepSpec> spec(new PackageDepSpec( 613 parse_elike_package_dep_spec(*tokens.begin(), (*(*erepository::EAPIData::get_instance()->eapi_from_string(614 repository->params().profile_eapi))[k::supported()])[k::package_dep_spec_parse_options()],615 std::tr1::shared_ptr<const PackageID>())));613 parse_elike_package_dep_spec(*tokens.begin(), erepository::EAPIData::get_instance()->eapi_from_string( 614 repository->params().profile_eapi)->supported()->package_dep_spec_parse_options(), 615 std::tr1::shared_ptr<const PackageID>()))); 616 616 PackageFlagStatusMapList::iterator n(m.insert(m.end(), std::make_pair(spec, FlagStatusMap()))); 617 617 618 618 for (std::list<std::string>::const_iterator t(next(tokens.begin())), t_end(tokens.end()) ; … … 653 653 654 654 stacked_values_list.push_back(StackedValues("use_expand special values")); 655 655 656 std::string expand_sep(stringify( (*(*erepository::EAPIData::get_instance()->eapi_from_string(657 repository->params().profile_eapi) )[k::supported()])[k::ebuild_options()].use_expand_separator));656 std::string expand_sep(stringify(erepository::EAPIData::get_instance()->eapi_from_string( 657 repository->params().profile_eapi)->supported()->ebuild_options()->use_expand_separator())); 658 658 659 659 for (UseFlagSet::const_iterator x(use_expand.begin()), x_end(use_expand.end()) ; 660 660 x != x_end ; ++x) -
paludis/repositories/e/eapi-fwd.hh
diff --git a/paludis/repositories/e/eapi-fwd.hh b/paludis/repositories/e/eapi-fwd.hh index f5b779b..2a15c50 100644
a b 39 39 class EAPIEbuildOptions; 40 40 class EAPILabels; 41 41 class EAPIToolsOptions; 42 43 typedef kc::KeyedClass< 44 kc::Field<k::rewrite_virtuals, bool>, 45 kc::Field<k::no_slot_or_repo, bool> 46 > EAPIPipeCommands; 47 48 /** 49 * Information about a supported EAPI's ebuild environment variables. 50 * 51 * \see EAPIData 52 * \see EAPI 53 * \ingroup grpeapi 54 * \nosubgrouping 55 */ 56 typedef kc::KeyedClass< 57 kc::Field<k::env_use, std::string>, 58 kc::Field<k::env_use_expand, std::string>, 59 kc::Field<k::env_use_expand_hidden, std::string>, 60 kc::Field<k::env_aa, std::string>, 61 kc::Field<k::env_arch, std::string>, 62 kc::Field<k::env_kv, std::string>, 63 kc::Field<k::env_accept_keywords, std::string>, 64 kc::Field<k::env_distdir, std::string>, 65 kc::Field<k::env_portdir, std::string>, 66 kc::Field<k::description_use, std::string> 67 > EAPIEbuildEnvironmentVariables; 68 69 /** 70 * Information about a supported EAPI. 71 * 72 * \see EAPIData 73 * \see EAPI 74 * \ingroup grpeapi 75 * \nosubgrouping 76 */ 77 typedef kc::KeyedClass< 78 kc::Field<k::package_dep_spec_parse_options, ELikePackageDepSpecOptions>, 79 kc::Field<k::dependency_spec_tree_parse_options, erepository::DependencySpecTreeParseOptions>, 80 kc::Field<k::iuse_flag_parse_options, IUseFlagParseOptions>, 81 kc::Field<k::merger_options, MergerOptions>, 82 kc::Field<k::breaks_portage, bool>, 83 kc::Field<k::can_be_pbin, bool>, 84 kc::Field<k::ebuild_options, const EAPIEbuildOptions>, 85 kc::Field<k::ebuild_phases, const EAPIEbuildPhases>, 86 kc::Field<k::ebuild_metadata_variables, const EAPIEbuildMetadataVariables>, 87 kc::Field<k::ebuild_environment_variables, const EAPIEbuildEnvironmentVariables>, 88 kc::Field<k::uri_labels, const EAPILabels>, 89 kc::Field<k::dependency_labels, const EAPILabels>, 90 kc::Field<k::pipe_commands, EAPIPipeCommands>, 91 kc::Field<k::tools_options, const EAPIToolsOptions> 92 > SupportedEAPI; 93 94 /** 95 * Information about an EAPI. 96 * 97 * \see EAPIData 98 * \ingroup grpeapi 99 * \nosubgrouping 100 */ 101 typedef kc::KeyedClass< 102 kc::Field<k::name, std::string>, 103 kc::Field<k::exported_name, std::string>, 104 kc::Field<k::supported, std::tr1::shared_ptr<const SupportedEAPI> > 105 > EAPI; 106 42 class EAPIPipeCommands; 43 class EAPIEbuildEnvironmentVariables; 44 class SupportedEAPI; 45 class EAPI; 107 46 } 108 47 } 109 48 -
paludis/repositories/e/eapi.cc
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc index aa8a4b4..d5b4461 100644
a b 36 36 #include <paludis/util/wrapped_output_iterator.hh> 37 37 #include <paludis/util/kc.hh> 38 38 #include <paludis/util/hashes.hh> 39 #include <paludis/util/make_named_values.hh> 39 40 #include <tr1/unordered_map> 40 41 #include <map> 41 42 #include <vector> … … 44 45 using namespace paludis; 45 46 using namespace paludis::erepository; 46 47 47 #include <paludis/repositories/e/eapi-sr.cc>48 49 48 template class InstantiationPolicy<EAPIData, instantiation_method::SingletonTag>; 50 49 51 50 namespace … … 57 56 else 58 57 return ""; 59 58 } 59 60 std::string check_get(const KeyValueConfigFile & k, const std::string & key) 61 { 62 return k.get(key); 63 } 64 65 template <typename T_> 66 T_ destringify_key(const KeyValueConfigFile & k, const std::string & key) 67 { 68 Context context("When getting key '" + key + ":"); 69 return destringify<T_>(check_get(k, key)); 70 } 71 72 std::tr1::shared_ptr<const EAPIEbuildEnvironmentVariables> make_ebuild_environment_variables(const KeyValueConfigFile & k) 73 { 74 return make_shared_ptr(new EAPIEbuildEnvironmentVariables(make_named_values<EAPIEbuildEnvironmentVariables>( 75 value_for<n::description_use>(check_get(k, "description_use")), 76 value_for<n::env_aa>(check_get(k, "env_aa")), 77 value_for<n::env_accept_keywords>(check_get(k, "env_accept_keywords")), 78 value_for<n::env_arch>(check_get(k, "env_arch")), 79 value_for<n::env_distdir>(check_get(k, "env_distdir")), 80 value_for<n::env_kv>(check_get(k, "env_kv")), 81 value_for<n::env_portdir>(check_get(k, "env_portdir")), 82 value_for<n::env_use>(check_get(k, "env_use")), 83 value_for<n::env_use_expand>(check_get(k, "env_use_expand")), 84 value_for<n::env_use_expand_hidden>(check_get(k, "env_use_expand_hidden")) 85 ))); 86 } 87 88 EAPIMetadataVariable make_metadata_variable(const KeyValueConfigFile & k, const std::string & s) 89 { 90 return make_named_values<EAPIMetadataVariable>( 91 value_for<n::description>(check_get(k, "description_" + s)), 92 value_for<n::flat_cache_index>(destringify_key<int>(k, "flat_cache_" + s)), 93 value_for<n::name>(check_get(k, "metadata_" + s)) 94 ); 95 } 96 97 std::tr1::shared_ptr<const EAPIEbuildMetadataVariables> make_ebuild_metadata_variables(const KeyValueConfigFile & k) 98 { 99 return make_shared_ptr(new EAPIEbuildMetadataVariables(make_named_values<EAPIEbuildMetadataVariables>( 100 value_for<n::build_depend>(make_metadata_variable(k, "build_depend")), 101 value_for<n::dependencies>(make_metadata_variable(k, "dependencies")), 102 value_for<n::description>(make_metadata_variable(k, "description")), 103 value_for<n::eapi>(make_metadata_variable(k, "eapi")), 104 value_for<n::homepage>(make_metadata_variable(k, "homepage")), 105 value_for<n::inherited>(make_metadata_variable(k, "inherited")), 106 value_for<n::iuse>(make_metadata_variable(k, "iuse")), 107 value_for<n::keywords>(make_metadata_variable(k, "keywords")), 108 value_for<n::license>(make_metadata_variable(k, "license")), 109 value_for<n::minimum_flat_cache_size>(destringify_key<int>(k, "flat_cache_minimum_size")), 110 value_for<n::pdepend>(make_metadata_variable(k, "pdepend")), 111 value_for<n::provide>(make_metadata_variable(k, "provide")), 112 value_for<n::restrictions>(make_metadata_variable(k, "restrict")), 113 value_for<n::run_depend>(make_metadata_variable(k, "run_depend")), 114 value_for<n::slot>(make_metadata_variable(k, "slot")), 115 value_for<n::src_uri>(make_metadata_variable(k, "src_uri")), 116 value_for<n::use>(make_metadata_variable(k, "use")) 117 ))); 118 } 119 120 std::tr1::shared_ptr<Set<std::string> > make_set(const std::string & s) 121 { 122 std::tr1::shared_ptr<Set<std::string> > result(new Set<std::string>); 123 tokenise_whitespace(s, result->inserter()); 124 return result; 125 } 126 127 std::tr1::shared_ptr<const EAPIEbuildOptions> make_ebuild_options(const KeyValueConfigFile & k) 128 { 129 return make_shared_ptr(new EAPIEbuildOptions(make_named_values<EAPIEbuildOptions>( 130 value_for<n::binary_from_env_variables>(check_get(k, "binary_from_env_variables")), 131 value_for<n::bracket_merged_variables>(check_get(k, "bracket_merged_variables")), 132 value_for<n::directory_if_exists_variables>(check_get(k, "directory_if_exists_variables")), 133 value_for<n::directory_variables>(check_get(k, "directory_variables")), 134 value_for<n::ebuild_module_suffixes>(check_get(k, "ebuild_module_suffixes")), 135 value_for<n::ebuild_must_not_set_variables>(check_get(k, "ebuild_must_not_set_variables")), 136 value_for<n::eclass_must_not_set_variables>(check_get(k, "eclass_must_not_set_variables")), 137 value_for<n::f_function_prefix>(check_get(k, "f_function_prefix")), 138 value_for<n::ignore_pivot_env_functions>(check_get(k, "ignore_pivot_env_functions")), 139 value_for<n::ignore_pivot_env_variables>(check_get(k, "ignore_pivot_env_variables")), 140 value_for<n::must_not_change_variables>(check_get(k, "must_not_change_variables")), 141 value_for<n::non_empty_variables>(check_get(k, "non_empty_variables")), 142 value_for<n::rdepend_defaults_to_depend>(destringify_key<bool>(k, "rdepend_defaults_to_depend")), 143 value_for<n::require_use_expand_in_iuse>(destringify_key<bool>(k, "require_use_expand_in_iuse")), 144 value_for<n::restrict_fetch>(make_set(check_get(k, "restrict_fetch"))), 145 value_for<n::restrict_mirror>(make_set(check_get(k, "restrict_mirror"))), 146 value_for<n::restrict_primaryuri>(make_set(check_get(k, "restrict_primaryuri"))), 147 value_for<n::save_base_variables>(check_get(k, "save_base_variables")), 148 value_for<n::save_unmodifiable_variables>(check_get(k, "save_unmodifiable_variables")), 149 value_for<n::save_variables>(check_get(k, "save_variables")), 150 value_for<n::source_merged_variables>(check_get(k, "source_merged_variables")), 151 value_for<n::support_eclasses>(destringify_key<bool>(k, "support_eclasses")), 152 value_for<n::support_exlibs>(destringify_key<bool>(k, "support_exlibs")), 153 value_for<n::use_expand_separator>(destringify_key<char>(k, "use_expand_separator")), 154 value_for<n::utility_path_suffixes>(check_get(k, "utility_path_suffixes")), 155 value_for<n::vdb_from_env_unless_empty_variables>(check_get(k, "vdb_from_env_unless_empty_variables")), 156 value_for<n::vdb_from_env_variables>(check_get(k, "vdb_from_env_variables")), 157 value_for<n::want_portage_emulation_vars>(destringify_key<bool>(k, "want_portage_emulation_vars")) 158 ))); 159 } 160 161 std::tr1::shared_ptr<const EAPIEbuildPhases> make_ebuild_phases(const KeyValueConfigFile & k) 162 { 163 return make_shared_ptr(new EAPIEbuildPhases(make_named_values<EAPIEbuildPhases>( 164 value_for<n::ebuild_config>(check_get(k, "ebuild_config")), 165 value_for<n::ebuild_info>(check_get(k, "ebuild_info")), 166 value_for<n::ebuild_install>(check_get(k, "ebuild_install")), 167 value_for<n::ebuild_metadata>(check_get(k, "ebuild_metadata")), 168 value_for<n::ebuild_nofetch>(check_get(k, "ebuild_nofetch")), 169 value_for<n::ebuild_pretend>(check_get(k, "ebuild_pretend")), 170 value_for<n::ebuild_uninstall>(check_get(k, "ebuild_uninstall")), 171 value_for<n::ebuild_variable>(check_get(k, "ebuild_variable")) 172 ))); 173 } 174 175 std::tr1::shared_ptr<const EAPIPipeCommands> make_pipe_commands(const KeyValueConfigFile & k) 176 { 177 return make_shared_ptr(new EAPIPipeCommands(make_named_values<EAPIPipeCommands>( 178 value_for<n::no_slot_or_repo>(destringify_key<bool>(k, "pipe_commands_no_slot_or_repo")), 179 value_for<n::rewrite_virtuals>(destringify_key<bool>(k, "pipe_commands_rewrite_virtuals")) 180 ))); 181 } 182 183 std::tr1::shared_ptr<const EAPIToolsOptions> make_tool_options(const KeyValueConfigFile & k) 184 { 185 return make_shared_ptr(new EAPIToolsOptions(make_named_values<EAPIToolsOptions>( 186 value_for<n::dosym_mkdir>(destringify_key<bool>(k, "dosym_mkdir")), 187 value_for<n::failure_is_fatal>(destringify_key<bool>(k, "failure_is_fatal")), 188 value_for<n::unpack_fix_permissions>(destringify_key<bool>(k, "unpack_fix_permissions")), 189 value_for<n::unpack_unrecognised_is_fatal>(destringify_key<bool>(k, "unpack_unrecognised_is_fatal")) 190 ))); 191 } 192 193 std::tr1::shared_ptr<const SupportedEAPI> make_supported_eapi(const KeyValueConfigFile & k) 194 { 195 ELikePackageDepSpecOptions package_dep_spec_parse_options; 196 { 197 std::list<std::string> package_dep_spec_parse_options_tokens; 198 tokenise_whitespace(check_get(k, "package_dep_spec_parse_options"), std::back_inserter(package_dep_spec_parse_options_tokens)); 199 for (std::list<std::string>::const_iterator t(package_dep_spec_parse_options_tokens.begin()), 200 t_end(package_dep_spec_parse_options_tokens.end()) ; 201 t != t_end ; ++t) 202 package_dep_spec_parse_options += destringify<ELikePackageDepSpecOption>(*t); 203 } 204 205 DependencySpecTreeParseOptions dependency_spec_tree_parse_options; 206 { 207 std::list<std::string> dependency_spec_tree_parse_options_tokens; 208 tokenise_whitespace(check_get(k, "dependency_spec_tree_parse_options"), std::back_inserter(dependency_spec_tree_parse_options_tokens)); 209 for (std::list<std::string>::const_iterator t(dependency_spec_tree_parse_options_tokens.begin()), 210 t_end(dependency_spec_tree_parse_options_tokens.end()) ; 211 t != t_end ; ++t) 212 dependency_spec_tree_parse_options += destringify<DependencySpecTreeParseOption>(*t); 213 } 214 215 IUseFlagParseOptions iuse_flag_parse_options; 216 { 217 std::list<std::string> iuse_flag_parse_options_tokens; 218 tokenise_whitespace(check_get(k, "iuse_flag_parse_options"), std::back_inserter(iuse_flag_parse_options_tokens)); 219 for (std::list<std::string>::const_iterator t(iuse_flag_parse_options_tokens.begin()), 220 t_end(iuse_flag_parse_options_tokens.end()) ; 221 t != t_end ; ++t) 222 iuse_flag_parse_options += destringify<IUseFlagParseOption>(*t); 223 } 224 225 MergerOptions merger_options; 226 { 227 std::list<std::string> merger_options_tokens; 228 tokenise_whitespace(check_get(k, "merger_options"), std::back_inserter(merger_options_tokens)); 229 for (std::list<std::string>::const_iterator t(merger_options_tokens.begin()), 230 t_end(merger_options_tokens.end()) ; 231 t != t_end ; ++t) 232 merger_options += destringify<MergerOption>(*t); 233 } 234 235 return make_shared_ptr(new SupportedEAPI(make_named_values<SupportedEAPI>( 236 value_for<n::breaks_portage>(destringify_key<bool>(k, "breaks_portage")), 237 value_for<n::can_be_pbin>(destringify_key<bool>(k, "can_be_pbin")), 238 value_for<n::dependency_labels>(make_shared_ptr(new const EAPILabels(check_get(k, "dependency_labels")))), 239 value_for<n::dependency_spec_tree_parse_options>(dependency_spec_tree_parse_options), 240 value_for<n::ebuild_environment_variables>(make_ebuild_environment_variables(k)), 241 value_for<n::ebuild_metadata_variables>(make_ebuild_metadata_variables(k)), 242 value_for<n::ebuild_options>(make_ebuild_options(k)), 243 value_for<n::ebuild_phases>(make_ebuild_phases(k)), 244 value_for<n::iuse_flag_parse_options>(iuse_flag_parse_options), 245 value_for<n::merger_options>(merger_options), 246 value_for<n::package_dep_spec_parse_options>(package_dep_spec_parse_options), 247 value_for<n::pipe_commands>(make_pipe_commands(k)), 248 value_for<n::tools_options>(make_tool_options(k)), 249 value_for<n::uri_labels>(make_shared_ptr(new const EAPILabels(check_get(k, "uri_labels")))) 250 ))); 251 } 60 252 } 61 253 62 254 namespace paludis … … 81 273 std::tr1::bind(&predefined, stringify(d->dirname()), std::tr1::placeholders::_1, std::tr1::placeholders::_2), 82 274 &KeyValueConfigFile::no_transformation); 83 275 84 ELikePackageDepSpecOptions package_dep_spec_parse_options; 85 { 86 std::list<std::string> package_dep_spec_parse_options_tokens; 87 tokenise_whitespace(k.get("package_dep_spec_parse_options"), std::back_inserter(package_dep_spec_parse_options_tokens)); 88 for (std::list<std::string>::const_iterator t(package_dep_spec_parse_options_tokens.begin()), 89 t_end(package_dep_spec_parse_options_tokens.end()) ; 90 t != t_end ; ++t) 91 package_dep_spec_parse_options += destringify<ELikePackageDepSpecOption>(*t); 92 } 93 94 DependencySpecTreeParseOptions dependency_spec_tree_parse_options; 95 { 96 std::list<std::string> dependency_spec_tree_parse_options_tokens; 97 tokenise_whitespace(k.get("dependency_spec_tree_parse_options"), std::back_inserter(dependency_spec_tree_parse_options_tokens)); 98 for (std::list<std::string>::const_iterator t(dependency_spec_tree_parse_options_tokens.begin()), 99 t_end(dependency_spec_tree_parse_options_tokens.end()) ; 100 t != t_end ; ++t) 101 dependency_spec_tree_parse_options += destringify<DependencySpecTreeParseOption>(*t); 102 } 103 104 IUseFlagParseOptions iuse_flag_parse_options; 105 { 106 std::list<std::string> iuse_flag_parse_options_tokens; 107 tokenise_whitespace(k.get("iuse_flag_parse_options"), std::back_inserter(iuse_flag_parse_options_tokens)); 108 for (std::list<std::string>::const_iterator t(iuse_flag_parse_options_tokens.begin()), 109 t_end(iuse_flag_parse_options_tokens.end()) ; 110 t != t_end ; ++t) 111 iuse_flag_parse_options += destringify<IUseFlagParseOption>(*t); 112 } 113 114 MergerOptions merger_options; 115 { 116 std::list<std::string> merger_options_tokens; 117 tokenise_whitespace(k.get("merger_options"), std::back_inserter(merger_options_tokens)); 118 for (std::list<std::string>::const_iterator t(merger_options_tokens.begin()), 119 t_end(merger_options_tokens.end()) ; 120 t != t_end ; ++t) 121 merger_options += destringify<MergerOption>(*t); 122 } 123 124 std::tr1::shared_ptr<EAPI> eapi(new EAPI( 125 strip_trailing_string(d->basename(), ".conf"), 126 k.get("exported_name"), 127 make_shared_ptr(new SupportedEAPI( 128 SupportedEAPI::named_create() 129 (k::package_dep_spec_parse_options(), package_dep_spec_parse_options) 130 (k::dependency_spec_tree_parse_options(), dependency_spec_tree_parse_options) 131 (k::iuse_flag_parse_options(), iuse_flag_parse_options) 132 (k::merger_options(), merger_options) 133 (k::breaks_portage(), destringify<bool>(k.get("breaks_portage"))) 134 (k::can_be_pbin(), destringify<bool>(k.get("can_be_pbin"))) 135 136 (k::ebuild_options(), 137 EAPIEbuildOptions(EAPIEbuildOptions::create() 138 .want_portage_emulation_vars(destringify<bool>(k.get("want_portage_emulation_vars"))) 139 .require_use_expand_in_iuse(destringify<bool>(k.get("require_use_expand_in_iuse"))) 140 .rdepend_defaults_to_depend(destringify<bool>(k.get("rdepend_defaults_to_depend"))) 141 .non_empty_variables(k.get("non_empty_variables")) 142 .directory_variables(k.get("directory_variables")) 143 .directory_if_exists_variables(k.get("directory_if_exists_variables")) 144 .ebuild_must_not_set_variables(k.get("ebuild_must_not_set_variables")) 145 .eclass_must_not_set_variables(k.get("eclass_must_not_set_variables")) 146 .vdb_from_env_variables(k.get("vdb_from_env_variables")) 147 .vdb_from_env_unless_empty_variables(k.get("vdb_from_env_unless_empty_variables")) 148 .binary_from_env_variables(k.get("binary_from_env_variables")) 149 .source_merged_variables(k.get("source_merged_variables")) 150 .bracket_merged_variables(k.get("bracket_merged_variables")) 151 .must_not_change_variables(k.get("must_not_change_variables")) 152 .save_variables(k.get("save_variables")) 153 .save_base_variables(k.get("save_base_variables")) 154 .save_unmodifiable_variables(k.get("save_unmodifiable_variables")) 155 .support_eclasses(destringify<bool>(k.get("support_eclasses"))) 156 .support_exlibs(destringify<bool>(k.get("support_exlibs"))) 157 .utility_path_suffixes(k.get("utility_path_suffixes")) 158 .ebuild_module_suffixes(k.get("ebuild_module_suffixes")) 159 .use_expand_separator(destringify<char>(k.get("use_expand_separator"))) 160 .restrict_fetch(make_shared_ptr(new Set<std::string>)) 161 .restrict_mirror(make_shared_ptr(new Set<std::string>)) 162 .restrict_primaryuri(make_shared_ptr(new Set<std::string>)) 163 .f_function_prefix(k.get("f_function_prefix")) 164 .ignore_pivot_env_variables(k.get("ignore_pivot_env_variables")) 165 .ignore_pivot_env_functions(k.get("ignore_pivot_env_functions")) 166 )) 167 168 (k::pipe_commands(), 169 EAPIPipeCommands(EAPIPipeCommands::named_create() 170 (k::rewrite_virtuals(), destringify<bool>(k.get("pipe_commands_rewrite_virtuals"))) 171 (k::no_slot_or_repo(), destringify<bool>(k.get("pipe_commands_no_slot_or_repo"))) 172 )) 173 174 (k::ebuild_phases(), 175 EAPIEbuildPhases(EAPIEbuildPhases::create() 176 .ebuild_install(k.get("ebuild_install")) 177 .ebuild_uninstall(k.get("ebuild_uninstall")) 178 .ebuild_pretend(k.get("ebuild_pretend")) 179 .ebuild_metadata(k.get("ebuild_metadata")) 180 .ebuild_nofetch(k.get("ebuild_nofetch")) 181 .ebuild_variable(k.get("ebuild_variable")) 182 .ebuild_info(k.get("ebuild_info")) 183 .ebuild_config(k.get("ebuild_config")) 184 )) 185 186 (k::ebuild_metadata_variables(), 187 EAPIEbuildMetadataVariables(EAPIEbuildMetadataVariables::create() 188 .metadata_build_depend(k.get("metadata_build_depend")) 189 .metadata_run_depend(k.get("metadata_run_depend")) 190 .metadata_slot(k.get("metadata_slot")) 191 .metadata_src_uri(k.get("metadata_src_uri")) 192 .metadata_restrict(k.get("metadata_restrict")) 193 .metadata_homepage(k.get("metadata_homepage")) 194 .metadata_license(k.get("metadata_license")) 195 .metadata_description(k.get("metadata_description")) 196 .metadata_keywords(k.get("metadata_keywords")) 197 .metadata_inherited(k.get("metadata_inherited")) 198 .metadata_iuse(k.get("metadata_iuse")) 199 .metadata_pdepend(k.get("metadata_pdepend")) 200 .metadata_provide(k.get("metadata_provide")) 201 .metadata_eapi(k.get("metadata_eapi")) 202 .metadata_dependencies(k.get("metadata_dependencies")) 203 .metadata_use(k.get("metadata_use")) 204 .description_build_depend(k.get("description_build_depend")) 205 .description_run_depend(k.get("description_run_depend")) 206 .description_slot(k.get("description_slot")) 207 .description_src_uri(k.get("description_src_uri")) 208 .description_restrict(k.get("description_restrict")) 209 .description_homepage(k.get("description_homepage")) 210 .description_license(k.get("description_license")) 211 .description_description(k.get("description_description")) 212 .description_keywords(k.get("description_keywords")) 213 .description_inherited(k.get("description_inherited")) 214 .description_iuse(k.get("description_iuse")) 215 .description_pdepend(k.get("description_pdepend")) 216 .description_provide(k.get("description_provide")) 217 .description_eapi(k.get("description_eapi")) 218 .description_dependencies(k.get("description_dependencies")) 219 .description_use(k.get("description_use")) 220 .flat_cache_build_depend(destringify<int>(k.get("flat_cache_build_depend"))) 221 .flat_cache_run_depend(destringify<int>(k.get("flat_cache_run_depend"))) 222 .flat_cache_slot(destringify<int>(k.get("flat_cache_slot"))) 223 .flat_cache_src_uri(destringify<int>(k.get("flat_cache_src_uri"))) 224 .flat_cache_restrict(destringify<int>(k.get("flat_cache_restrict"))) 225 .flat_cache_homepage(destringify<int>(k.get("flat_cache_homepage"))) 226 .flat_cache_license(destringify<int>(k.get("flat_cache_license"))) 227 .flat_cache_description(destringify<int>(k.get("flat_cache_description"))) 228 .flat_cache_keywords(destringify<int>(k.get("flat_cache_keywords"))) 229 .flat_cache_inherited(destringify<int>(k.get("flat_cache_inherited"))) 230 .flat_cache_iuse(destringify<int>(k.get("flat_cache_iuse"))) 231 .flat_cache_pdepend(destringify<int>(k.get("flat_cache_pdepend"))) 232 .flat_cache_provide(destringify<int>(k.get("flat_cache_provide"))) 233 .flat_cache_eapi(destringify<int>(k.get("flat_cache_eapi"))) 234 .flat_cache_dependencies(destringify<int>(k.get("flat_cache_dependencies"))) 235 .flat_cache_use(destringify<int>(k.get("flat_cache_use"))) 236 .flat_cache_minimum_size(destringify<int>(k.get("flat_cache_minimum_size"))) 237 )) 238 239 (k::ebuild_environment_variables(), 240 EAPIEbuildEnvironmentVariables(EAPIEbuildEnvironmentVariables::named_create() 241 (k::env_use(), k.get("env_use")) 242 (k::env_use_expand(), k.get("env_use_expand")) 243 (k::env_use_expand_hidden(), k.get("env_use_expand_hidden")) 244 (k::env_aa(), k.get("env_aa")) 245 (k::env_arch(), k.get("env_arch")) 246 (k::env_kv(), k.get("env_kv")) 247 (k::env_portdir(), k.get("env_portdir")) 248 (k::env_distdir(), k.get("env_distdir")) 249 (k::env_accept_keywords(), k.get("env_accept_keywords")) 250 (k::description_use(), k.get("description_use")) 251 )) 252 253 (k::uri_labels(), EAPILabels(k.get("uri_labels"))) 254 255 (k::dependency_labels(), EAPILabels(k.get("dependency_labels"))) 256 257 (k::tools_options(), 258 EAPIToolsOptions(EAPIToolsOptions::create() 259 .unpack_unrecognised_is_fatal(destringify<bool>( 260 k.get("unpack_unrecognised_is_fatal"))) 261 .unpack_fix_permissions(destringify<bool>( 262 k.get("unpack_fix_permissions"))) 263 .dosym_mkdir(destringify<bool>( 264 k.get("dosym_mkdir"))) 265 .failure_is_fatal(destringify<bool>( 266 k.get("failure_is_fatal"))) 267 )) 268 269 )))); 270 271 tokenise_whitespace(k.get("restrict_fetch"), 272 (*(*eapi)[k::supported()])[k::ebuild_options()].restrict_fetch->inserter()); 273 tokenise_whitespace(k.get("restrict_mirror"), 274 (*(*eapi)[k::supported()])[k::ebuild_options()].restrict_mirror->inserter()); 275 tokenise_whitespace(k.get("restrict_primaryuri"), 276 (*(*eapi)[k::supported()])[k::ebuild_options()].restrict_primaryuri->inserter()); 276 std::tr1::shared_ptr<EAPI> eapi(new EAPI(make_named_values<EAPI>( 277 value_for<n::exported_name>(check_get(k, "exported_name")), 278 value_for<n::name>(strip_trailing_string(d->basename(), ".conf")), 279 value_for<n::supported>(make_supported_eapi(k)) 280 ))); 277 281 278 282 values.insert(std::make_pair(strip_trailing_string(d->basename(), ".conf"), eapi)); 279 283 } … … 308 312 if (i != _imp->values.end()) 309 313 return i->second; 310 314 311 return make_shared_ptr(new EAPI(s, s, std::tr1::shared_ptr<SupportedEAPI>())); 315 return make_shared_ptr(new EAPI(make_named_values<EAPI>( 316 value_for<n::exported_name>(s), 317 value_for<n::name>(s), 318 value_for<n::supported>(std::tr1::shared_ptr<const SupportedEAPI>())) 319 )); 312 320 } 313 321 314 322 std::tr1::shared_ptr<const EAPI> 315 323 EAPIData::unknown_eapi() const 316 324 { 317 return make_shared_ptr(new EAPI("UNKNOWN", "UNKNOWN", std::tr1::shared_ptr<SupportedEAPI>())); 325 return make_shared_ptr(new EAPI(make_named_values<EAPI>( 326 value_for<n::exported_name>("UNKNOWN"), 327 value_for<n::name>("UNKNOWN"), 328 value_for<n::supported>(std::tr1::shared_ptr<const SupportedEAPI>())) 329 )); 318 330 } 319 331 320 332 namespace paludis -
paludis/repositories/e/eapi.hh
diff --git a/paludis/repositories/e/eapi.hh b/paludis/repositories/e/eapi.hh index 3685205..0c91085 100644
a b 27 27 #include <paludis/util/instantiation_policy.hh> 28 28 #include <paludis/util/private_implementation_pattern.hh> 29 29 #include <paludis/util/options.hh> 30 #include <paludis/util/named_value.hh> 30 31 #include <paludis/name.hh> 31 32 #include <paludis/dep_spec-fwd.hh> 32 33 #include <paludis/merger-fwd.hh> … … 34 35 35 36 namespace paludis 36 37 { 37 namespace erepository38 namespace n 38 39 { 39 #include <paludis/repositories/e/eapi-sr.hh> 40 struct binary_from_env_variables; 41 struct bracket_merged_variables; 42 struct breaks_portage; 43 struct build_depend; 44 struct can_be_pbin; 45 struct dependencies; 46 struct dependency_labels; 47 struct dependency_spec_tree_parse_options; 48 struct description; 49 struct description_use; 50 struct directory_if_exists_variables; 51 struct directory_variables; 52 struct dosym_mkdir; 53 struct eapi; 54 struct ebuild_config; 55 struct ebuild_environment_variables; 56 struct ebuild_info; 57 struct ebuild_install; 58 struct ebuild_metadata; 59 struct ebuild_metadata_variables; 60 struct ebuild_module_suffixes; 61 struct ebuild_must_not_set_variables; 62 struct ebuild_nofetch; 63 struct ebuild_options; 64 struct ebuild_phases; 65 struct ebuild_pretend; 66 struct ebuild_uninstall; 67 struct ebuild_variable; 68 struct eclass_must_not_set_variables; 69 struct env_aa; 70 struct env_accept_keywords; 71 struct env_arch; 72 struct env_distdir; 73 struct env_kv; 74 struct env_portdir; 75 struct env_use; 76 struct env_use_expand; 77 struct env_use_expand_hidden; 78 struct exported_name; 79 struct f_function_prefix; 80 struct failure_is_fatal; 81 struct flat_cache_index; 82 struct homepage; 83 struct ignore_pivot_env_functions; 84 struct ignore_pivot_env_variables; 85 struct inherited; 86 struct iuse; 87 struct iuse_flag_parse_options; 88 struct keywords; 89 struct license; 90 struct merger_options; 91 struct metadata_key; 92 struct minimum_flat_cache_size; 93 struct must_not_change_variables; 94 struct name; 95 struct no_slot_or_repo; 96 struct non_empty_variables; 97 struct package_dep_spec_parse_options; 98 struct pdepend; 99 struct pipe_commands; 100 struct provide; 101 struct rdepend_defaults_to_depend; 102 struct require_use_expand_in_iuse; 103 struct restrict_fetch; 104 struct restrict_mirror; 105 struct restrict_primaryuri; 106 struct restrictions; 107 struct rewrite_virtuals; 108 struct run_depend; 109 struct save_base_variables; 110 struct save_unmodifiable_variables; 111 struct save_variables; 112 struct slot; 113 struct source_merged_variables; 114 struct src_uri; 115 struct support_eclasses; 116 struct support_exlibs; 117 struct supported; 118 struct tools_options; 119 struct unpack_fix_permissions; 120 struct unpack_unrecognised_is_fatal; 121 struct uri_labels; 122 struct use; 123 struct use_expand_separator; 124 struct utility_path_suffixes; 125 struct vdb_from_env_unless_empty_variables; 126 struct vdb_from_env_variables; 127 struct want_portage_emulation_vars; 128 } 40 129 130 namespace erepository 131 { 41 132 class PALUDIS_VISIBLE EAPILabels : 42 133 private PrivateImplementationPattern<EAPILabels> 43 134 { … … 92 183 */ 93 184 std::tr1::shared_ptr<const EAPI> unknown_eapi() const; 94 185 }; 95 }96 }97 186 187 struct EAPI 188 { 189 NamedValue<n::exported_name, std::string> exported_name; 190 NamedValue<n::name, std::string> name; 191 NamedValue<n::supported, std::tr1::shared_ptr<const SupportedEAPI> > supported; 192 }; 193 194 struct SupportedEAPI 195 { 196 NamedValue<n::breaks_portage, bool> breaks_portage; 197 NamedValue<n::can_be_pbin, bool> can_be_pbin; 198 NamedValue<n::dependency_labels, std::tr1::shared_ptr<const EAPILabels> > dependency_labels; 199 NamedValue<n::dependency_spec_tree_parse_options, erepository::DependencySpecTreeParseOptions> dependency_spec_tree_parse_options; 200 NamedValue<n::ebuild_environment_variables, std::tr1::shared_ptr<const EAPIEbuildEnvironmentVariables> > ebuild_environment_variables; 201 NamedValue<n::ebuild_metadata_variables, std::tr1::shared_ptr<const EAPIEbuildMetadataVariables> > ebuild_metadata_variables; 202 NamedValue<n::ebuild_options, std::tr1::shared_ptr<const EAPIEbuildOptions> > ebuild_options; 203 NamedValue<n::ebuild_phases, std::tr1::shared_ptr<const EAPIEbuildPhases> > ebuild_phases; 204 NamedValue<n::iuse_flag_parse_options, IUseFlagParseOptions> iuse_flag_parse_options; 205 NamedValue<n::merger_options, MergerOptions> merger_options; 206 NamedValue<n::package_dep_spec_parse_options, ELikePackageDepSpecOptions> package_dep_spec_parse_options; 207 NamedValue<n::pipe_commands, std::tr1::shared_ptr<const EAPIPipeCommands> > pipe_commands; 208 NamedValue<n::tools_options, std::tr1::shared_ptr<const EAPIToolsOptions> > tools_options; 209 NamedValue<n::uri_labels, std::tr1::shared_ptr<const EAPILabels> > uri_labels; 210 }; 211 212 struct EAPIEbuildEnvironmentVariables 213 { 214 NamedValue<n::description_use, std::string> description_use; 215 NamedValue<n::env_aa, std::string> env_aa; 216 NamedValue<n::env_accept_keywords, std::string> env_accept_keywords; 217 NamedValue<n::env_arch, std::string> env_arch; 218 NamedValue<n::env_distdir, std::string> env_distdir; 219 NamedValue<n::env_kv, std::string> env_kv; 220 NamedValue<n::env_portdir, std::string> env_portdir; 221 NamedValue<n::env_use, std::string> env_use; 222 NamedValue<n::env_use_expand, std::string> env_use_expand; 223 NamedValue<n::env_use_expand_hidden, std::string> env_use_expand_hidden; 224 }; 225 226 struct EAPIMetadataVariable 227 { 228 NamedValue<n::description, std::string> description; 229 NamedValue<n::flat_cache_index, int> flat_cache_index; 230 NamedValue<n::name, std::string> name; 231 }; 232 233 struct EAPIEbuildMetadataVariables 234 { 235 NamedValue<n::build_depend, EAPIMetadataVariable> build_depend; 236 NamedValue<n::dependencies, EAPIMetadataVariable> dependencies; 237 NamedValue<n::description, EAPIMetadataVariable> description; 238 NamedValue<n::eapi, EAPIMetadataVariable> eapi; 239 NamedValue<n::homepage, EAPIMetadataVariable> homepage; 240 NamedValue<n::inherited, EAPIMetadataVariable> inherited; 241 NamedValue<n::iuse, EAPIMetadataVariable> iuse; 242 NamedValue<n::keywords, EAPIMetadataVariable> keywords; 243 NamedValue<n::license, EAPIMetadataVariable> license; 244 NamedValue<n::minimum_flat_cache_size, int> minimum_flat_cache_size; 245 NamedValue<n::pdepend, EAPIMetadataVariable> pdepend; 246 NamedValue<n::provide, EAPIMetadataVariable> provide; 247 NamedValue<n::restrictions, EAPIMetadataVariable> restrictions; 248 NamedValue<n::run_depend, EAPIMetadataVariable> run_depend; 249 NamedValue<n::slot, EAPIMetadataVariable> slot; 250 NamedValue<n::src_uri, EAPIMetadataVariable> src_uri; 251 NamedValue<n::use, EAPIMetadataVariable> use; 252 }; 253 254 struct EAPIEbuildOptions 255 { 256 NamedValue<n::binary_from_env_variables, std::string> binary_from_env_variables; 257 NamedValue<n::bracket_merged_variables, std::string> bracket_merged_variables; 258 NamedValue<n::directory_if_exists_variables, std::string> directory_if_exists_variables; 259 NamedValue<n::directory_variables, std::string> directory_variables; 260 NamedValue<n::ebuild_module_suffixes, std::string> ebuild_module_suffixes; 261 NamedValue<n::ebuild_must_not_set_variables, std::string> ebuild_must_not_set_variables; 262 NamedValue<n::eclass_must_not_set_variables, std::string> eclass_must_not_set_variables; 263 NamedValue<n::f_function_prefix, std::string> f_function_prefix; 264 NamedValue<n::ignore_pivot_env_functions, std::string> ignore_pivot_env_functions; 265 NamedValue<n::ignore_pivot_env_variables, std::string> ignore_pivot_env_variables; 266 NamedValue<n::must_not_change_variables, std::string> must_not_change_variables; 267 NamedValue<n::non_empty_variables, std::string> non_empty_variables; 268 NamedValue<n::rdepend_defaults_to_depend, bool> rdepend_defaults_to_depend; 269 NamedValue<n::require_use_expand_in_iuse, bool> require_use_expand_in_iuse; 270 NamedValue<n::restrict_fetch, std::tr1::shared_ptr<Set<std::string> > > restrict_fetch; 271 NamedValue<n::restrict_mirror, std::tr1::shared_ptr<Set<std::string> > > restrict_mirror; 272 NamedValue<n::restrict_primaryuri, std::tr1::shared_ptr<Set<std::string> > > restrict_primaryuri; 273 NamedValue<n::save_base_variables, std::string> save_base_variables; 274 NamedValue<n::save_unmodifiable_variables, std::string> save_unmodifiable_variables; 275 NamedValue<n::save_variables, std::string> save_variables; 276 NamedValue<n::source_merged_variables, std::string> source_merged_variables; 277 NamedValue<n::support_eclasses, bool> support_eclasses; 278 NamedValue<n::support_exlibs, bool> support_exlibs; 279 NamedValue<n::use_expand_separator, char> use_expand_separator; 280 NamedValue<n::utility_path_suffixes, std::string> utility_path_suffixes; 281 NamedValue<n::vdb_from_env_unless_empty_variables, std::string> vdb_from_env_unless_empty_variables; 282 NamedValue<n::vdb_from_env_variables, std::string> vdb_from_env_variables; 283 NamedValue<n::want_portage_emulation_vars, bool> want_portage_emulation_vars; 284 }; 285 286 struct EAPIEbuildPhases 287 { 288 NamedValue<n::ebuild_config, std::string> ebuild_config; 289 NamedValue<n::ebuild_info, std::string> ebuild_info; 290 NamedValue<n::ebuild_install, std::string> ebuild_install; 291 NamedValue<n::ebuild_metadata, std::string> ebuild_metadata; 292 NamedValue<n::ebuild_nofetch, std::string> ebuild_nofetch; 293 NamedValue<n::ebuild_pretend, std::string> ebuild_pretend; 294 NamedValue<n::ebuild_uninstall, std::string> ebuild_uninstall; 295 NamedValue<n::ebuild_variable, std::string> ebuild_variable; 296 }; 297 298 struct EAPIToolsOptions 299 { 300 NamedValue<n::dosym_mkdir, bool> dosym_mkdir; 301 NamedValue<n::failure_is_fatal, bool> failure_is_fatal; 302 NamedValue<n::unpack_fix_permissions, bool> unpack_fix_permissions; 303 NamedValue<n::unpack_unrecognised_is_fatal, bool> unpack_unrecognised_is_fatal; 304 }; 305 306 struct EAPIPipeCommands 307 { 308 NamedValue<n::no_slot_or_repo, bool> no_slot_or_repo; 309 NamedValue<n::rewrite_virtuals, bool> rewrite_virtuals; 310 }; 311 } 98 312 #endif 313 } -
(a) a/paludis/repositories/e/eapi.sr vs. (b) /dev/null
diff --git a/paludis/repositories/e/eapi.sr b/paludis/repositories/e/eapi.sr deleted file mode 100644 index e43eb33..0000000
a b 1 #!/bin/bash2 # vim: set sw=4 sts=4 et ft=sh :3 4 make_class_EAPIEbuildPhases()5 {6 visible7 allow_named_args cc8 9 key ebuild_install std::string10 key ebuild_uninstall std::string11 key ebuild_pretend std::string12 key ebuild_info std::string13 key ebuild_metadata std::string14 key ebuild_nofetch std::string15 key ebuild_variable std::string16 key ebuild_config std::string17 18 doxygen_comment << "END"19 /**20 * Information about a supported EAPI's ebuild phases.21 *22 * \see EAPI23 * \ingroup grpeapi24 * \nosubgrouping25 */26 END27 }28 29 make_class_EAPIEbuildMetadataVariables()30 {31 visible32 allow_named_args cc33 34 key metadata_build_depend std::string35 key metadata_run_depend std::string36 key metadata_slot std::string37 key metadata_src_uri std::string38 key metadata_restrict std::string39 key metadata_homepage std::string40 key metadata_license std::string41 key metadata_description std::string42 key metadata_keywords std::string43 key metadata_inherited std::string44 key metadata_iuse std::string45 key metadata_pdepend std::string46 key metadata_provide std::string47 key metadata_eapi std::string48 key metadata_dependencies std::string49 key metadata_use std::string50 51 key description_build_depend std::string52 key description_run_depend std::string53 key description_slot std::string54 key description_src_uri std::string55 key description_restrict std::string56 key description_homepage std::string57 key description_license std::string58 key description_description std::string59 key description_keywords std::string60 key description_inherited std::string61 key description_iuse std::string62 key description_pdepend std::string63 key description_provide std::string64 key description_eapi std::string65 key description_dependencies std::string66 key description_use std::string67 68 key flat_cache_minimum_size int69 key flat_cache_build_depend int70 key flat_cache_run_depend int71 key flat_cache_slot int72 key flat_cache_src_uri int73 key flat_cache_restrict int74 key flat_cache_homepage int75 key flat_cache_license int76 key flat_cache_description int77 key flat_cache_keywords int78 key flat_cache_inherited int79 key flat_cache_iuse int80 key flat_cache_pdepend int81 key flat_cache_provide int82 key flat_cache_eapi int83 key flat_cache_dependencies int84 key flat_cache_use int85 86 doxygen_comment << "END"87 /**88 * Information about a supported EAPI's ebuild metadata variables.89 *90 * \see EAPIData91 * \see EAPI92 * \ingroup grpeapi93 * \nosubgrouping94 */95 END96 }97 98 make_class_EAPIToolsOptions()99 {100 visible101 allow_named_args cc102 103 key unpack_unrecognised_is_fatal bool104 key unpack_fix_permissions bool105 key dosym_mkdir bool106 key failure_is_fatal bool107 108 doxygen_comment << "END"109 /**110 * Information about a supported EAPI's tool options.111 *112 * \see EAPIData113 * \see EAPI114 * \ingroup grpeapi115 * \nosubgrouping116 */117 END118 }119 120 make_class_EAPIEbuildOptions()121 {122 visible123 allow_named_args cc124 125 key want_portage_emulation_vars bool126 key require_use_expand_in_iuse bool127 key rdepend_defaults_to_depend bool128 key use_expand_separator char129 130 key support_eclasses bool131 key support_exlibs bool132 133 key utility_path_suffixes std::string134 key ebuild_module_suffixes std::string135 136 key non_empty_variables std::string137 key directory_variables std::string138 key directory_if_exists_variables std::string139 key ebuild_must_not_set_variables std::string140 key eclass_must_not_set_variables std::string141 key source_merged_variables std::string142 key bracket_merged_variables std::string143 key must_not_change_variables std::string144 key save_variables std::string145 key save_base_variables std::string146 key save_unmodifiable_variables std::string147 key vdb_from_env_variables std::string148 key vdb_from_env_unless_empty_variables std::string149 key binary_from_env_variables std::string150 key f_function_prefix std::string151 152 key ignore_pivot_env_variables std::string153 key ignore_pivot_env_functions std::string154 155 key restrict_fetch "std::tr1::shared_ptr<Set<std::string> >"156 key restrict_mirror "std::tr1::shared_ptr<Set<std::string> >"157 key restrict_primaryuri "std::tr1::shared_ptr<Set<std::string> >"158 159 doxygen_comment << "END"160 /**161 * Information about a supported EAPI's ebuild options.162 *163 * \see EAPIData164 * \see EAPI165 * \ingroup grpeapi166 * \nosubgrouping167 */168 END169 }170 -
paludis/repositories/e/eapis/0.conf
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf index 710f114..5911155 100644
a b 18 18 utility_path_suffixes = 19 19 ebuild_module_suffixes = 0 20 20 f_function_prefix = ebuild_f 21 ignore_pivot_env_functions = 22 ignore_pivot_env_variables = 21 23 22 24 vdb_from_env_variables = \ 23 25 CATEGORY CHOST COUNTER DEPEND DESCRIPTION EAPI FEATURES \ … … 137 139 description_run_depend = Run dependencies 138 140 description_slot = Slot 139 141 description_src_uri = Source URI 142 description_use = 143 description_dependencies = 140 144 141 145 metadata_build_depend = DEPEND 142 146 metadata_description = DESCRIPTION … … 152 156 metadata_run_depend = RDEPEND 153 157 metadata_slot = SLOT 154 158 metadata_src_uri = SRC_URI 159 metadata_use = 160 metadata_dependencies = 155 161 156 162 flat_cache_minimum_size = 15 157 163 flat_cache_build_depend = 0 … … 181 187 env_portdir = PORTDIR 182 188 env_distdir = DISTDIR 183 189 190 dependency_labels = 191 184 192 uri_labels = \ 185 193 default = URIMirrorsThenListedLabel ; \ 186 194 default-restrict-fetch = URIManualOnlyLabel ; \ -
paludis/repositories/e/eapis/exheres-0.conf
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf index 45c4ad8..3b72c37 100644
a b 21 21 ebuild_module_suffixes = exheres-0 22 22 use_expand_separator = : 23 23 f_function_prefix = exheres_internal 24 ignore_pivot_env_functions = 25 ignore_pivot_env_variables = 24 26 25 27 vdb_from_env_variables = \ 26 28 CATEGORY CHOST DEPENDENCIES DESCRIPTION EAPI \ … … 56 58 57 59 eclass_must_not_set_variables = PLATFORMS 58 60 61 must_not_change_variables = 62 59 63 source_merged_variables = \ 60 64 MYOPTIONS 61 65 … … 141 145 metadata_provide = 142 146 metadata_eapi = EAPI 143 147 metadata_dependencies = DEPENDENCIES 148 metadata_use = 144 149 145 150 description_build_depend = 146 151 description_description = Description -
paludis/repositories/e/eapis/paludis-1.conf
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf index 83199c6..fae2865 100644
a b 21 21 ebuild_module_suffixes = paludis-1 1 0 22 22 use_expand_separator = _ 23 23 f_function_prefix = ebuild_f 24 ignore_pivot_env_variables = 25 ignore_pivot_env_functions = 24 26 25 27 vdb_from_env_variables = \ 26 28 CATEGORY CHOST COUNTER DEPEND DESCRIPTION EAPI FEATURES \ … … 142 144 metadata_pdepend = PDEPEND 143 145 metadata_provide = PROVIDE 144 146 metadata_eapi = EAPI 147 metadata_dependencies = 148 metadata_use = 145 149 146 150 description_build_depend = Build dependencies 147 151 description_description = Description … … 158 162 description_slot = Slot 159 163 description_src_uri = Source URI 160 164 description_use = Selected USE flags 165 description_dependencies = 161 166 162 167 flat_cache_minimum_size = 15 163 168 flat_cache_build_depend = 0 -
paludis/repositories/e/ebuild.cc
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc index 646cb3c..cffe8ae 100644
a b 122 122 .with_setenv("CATEGORY", stringify(params[k::package_id()]->name().category)) 123 123 .with_setenv("REPOSITORY", stringify(params[k::package_id()]->repository()->name())) 124 124 .with_setenv("FILESDIR", stringify(params[k::files_dir()])) 125 .with_setenv("EAPI", stringify( (*params[k::package_id()]->eapi())[k::exported_name()]))125 .with_setenv("EAPI", stringify(params[k::package_id()]->eapi()->exported_name())) 126 126 .with_setenv("PKGMANAGER", PALUDIS_PACKAGE "-" + stringify(PALUDIS_VERSION_MAJOR) + "." + 127 127 stringify(PALUDIS_VERSION_MINOR) + "." + 128 128 stringify(PALUDIS_VERSION_MICRO) + stringify(PALUDIS_VERSION_SUFFIX) + … … 140 140 .with_setenv("PALUDIS_EBUILD_LOG_LEVEL", stringify(Log::get_instance()->log_level())) 141 141 .with_setenv("PALUDIS_EBUILD_DIR", getenv_with_default("PALUDIS_EBUILD_DIR", LIBEXECDIR "/paludis")) 142 142 .with_setenv("PALUDIS_UTILITY_PATH_SUFFIXES", 143 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].utility_path_suffixes)143 params[k::package_id()]->eapi()->supported()->ebuild_options()->utility_path_suffixes()) 144 144 .with_setenv("PALUDIS_EBUILD_MODULE_SUFFIXES", 145 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].ebuild_module_suffixes)145 params[k::package_id()]->eapi()->supported()->ebuild_options()->ebuild_module_suffixes()) 146 146 .with_setenv("PALUDIS_NON_EMPTY_VARIABLES", 147 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].non_empty_variables)147 params[k::package_id()]->eapi()->supported()->ebuild_options()->non_empty_variables()) 148 148 .with_setenv("PALUDIS_DIRECTORY_VARIABLES", 149 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].directory_variables)149 params[k::package_id()]->eapi()->supported()->ebuild_options()->directory_variables()) 150 150 .with_setenv("PALUDIS_EBUILD_MUST_NOT_SET_VARIABLES", 151 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].ebuild_must_not_set_variables)151 params[k::package_id()]->eapi()->supported()->ebuild_options()->ebuild_must_not_set_variables()) 152 152 .with_setenv("PALUDIS_ECLASS_MUST_NOT_SET_VARIABLES", 153 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].eclass_must_not_set_variables)153 params[k::package_id()]->eapi()->supported()->ebuild_options()->eclass_must_not_set_variables()) 154 154 .with_setenv("PALUDIS_SAVE_VARIABLES", 155 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].save_variables)155 params[k::package_id()]->eapi()->supported()->ebuild_options()->save_variables()) 156 156 .with_setenv("PALUDIS_SAVE_BASE_VARIABLES", 157 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].save_base_variables)157 params[k::package_id()]->eapi()->supported()->ebuild_options()->save_base_variables()) 158 158 .with_setenv("PALUDIS_SAVE_UNMODIFIABLE_VARIABLES", 159 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].save_unmodifiable_variables)159 params[k::package_id()]->eapi()->supported()->ebuild_options()->save_unmodifiable_variables()) 160 160 .with_setenv("PALUDIS_DIRECTORY_IF_EXISTS_VARIABLES", 161 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].directory_if_exists_variables)161 params[k::package_id()]->eapi()->supported()->ebuild_options()->directory_if_exists_variables()) 162 162 .with_setenv("PALUDIS_SOURCE_MERGED_VARIABLES", 163 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].source_merged_variables)163 params[k::package_id()]->eapi()->supported()->ebuild_options()->source_merged_variables()) 164 164 .with_setenv("PALUDIS_BRACKET_MERGED_VARIABLES", 165 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].bracket_merged_variables)165 params[k::package_id()]->eapi()->supported()->ebuild_options()->bracket_merged_variables()) 166 166 .with_setenv("PALUDIS_MUST_NOT_CHANGE_VARIABLES", 167 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].must_not_change_variables)167 params[k::package_id()]->eapi()->supported()->ebuild_options()->must_not_change_variables()) 168 168 .with_setenv("PALUDIS_RDEPEND_DEFAULTS_TO_DEPEND", 169 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].rdepend_defaults_to_depend? "yes" : "")169 params[k::package_id()]->eapi()->supported()->ebuild_options()->rdepend_defaults_to_depend() ? "yes" : "") 170 170 .with_setenv("PALUDIS_F_FUNCTION_PREFIX", 171 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].f_function_prefix)171 params[k::package_id()]->eapi()->supported()->ebuild_options()->f_function_prefix()) 172 172 .with_setenv("PALUDIS_IGNORE_PIVOT_ENV_FUNCTIONS", 173 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].ignore_pivot_env_functions)173 params[k::package_id()]->eapi()->supported()->ebuild_options()->ignore_pivot_env_functions()) 174 174 .with_setenv("PALUDIS_IGNORE_PIVOT_ENV_VARIABLES", 175 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].ignore_pivot_env_variables)175 params[k::package_id()]->eapi()->supported()->ebuild_options()->ignore_pivot_env_variables()) 176 176 .with_setenv("PALUDIS_BINARY_DISTDIR_VARIABLE", 177 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_distdir()])177 params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_distdir()) 178 178 .with_setenv("PALUDIS_UNPACK_UNRECOGNISED_IS_FATAL", 179 (*(*params[k::package_id()]->eapi())[k::supported()])[k::tools_options()].unpack_unrecognised_is_fatal? "yes" : "")179 params[k::package_id()]->eapi()->supported()->tools_options()->unpack_unrecognised_is_fatal() ? "yes" : "") 180 180 .with_setenv("PALUDIS_UNPACK_FIX_PERMISSIONS", 181 (*(*params[k::package_id()]->eapi())[k::supported()])[k::tools_options()].unpack_fix_permissions? "yes" : "")181 params[k::package_id()]->eapi()->supported()->tools_options()->unpack_fix_permissions() ? "yes" : "") 182 182 .with_setenv("PALUDIS_DOSYM_NO_MKDIR", 183 (*(*params[k::package_id()]->eapi())[k::supported()])[k::tools_options()].dosym_mkdir? "" : "yes")183 params[k::package_id()]->eapi()->supported()->tools_options()->dosym_mkdir() ? "" : "yes") 184 184 .with_setenv("PALUDIS_FAILURE_IS_FATAL", 185 (*(*params[k::package_id()]->eapi())[k::supported()])[k::tools_options()].failure_is_fatal? "yes" : "")185 params[k::package_id()]->eapi()->supported()->tools_options()->failure_is_fatal() ? "yes" : "") 186 186 .with_setenv("PALUDIS_UNPACK_FROM_VAR", 187 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_distdir()])187 params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_distdir()) 188 188 .with_setenv("PALUDIS_PIPE_COMMANDS_SUPPORTED", "yes") 189 189 ) 190 190 .with_setenv("SLOT", "") 191 191 .with_setenv("PALUDIS_PROFILE_DIR", "") 192 192 .with_setenv("PALUDIS_PROFILE_DIRS", ""); 193 193 194 if (! (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_kv()].empty())195 cmd.with_setenv( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_kv()], kernel_version());196 if (! (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_portdir()].empty())197 cmd.with_setenv( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_portdir()],194 if (! params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_kv().empty()) 195 cmd.with_setenv(params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_kv(), kernel_version()); 196 if (! params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_portdir().empty()) 197 cmd.with_setenv(params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_portdir(), 198 198 stringify(params[k::portdir()])); 199 if (! (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_distdir()].empty())200 cmd.with_setenv( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_distdir()],199 if (! params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_distdir().empty()) 200 cmd.with_setenv(params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_distdir(), 201 201 stringify(params[k::distdir()])); 202 202 203 if ( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].support_eclasses)203 if (params[k::package_id()]->eapi()->supported()->ebuild_options()->support_eclasses()) 204 204 cmd 205 205 .with_setenv("ECLASSDIR", stringify(*params[k::eclassdirs()]->begin())) 206 206 .with_setenv("ECLASSDIRS", join(params[k::eclassdirs()]->begin(), 207 207 params[k::eclassdirs()]->end(), " ")); 208 208 209 if ( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].support_exlibs)209 if (params[k::package_id()]->eapi()->supported()->ebuild_options()->support_exlibs()) 210 210 cmd 211 211 .with_setenv("EXLIBSDIRS", join(params[k::exlibsdirs()]->begin(), 212 212 params[k::exlibsdirs()]->end(), " ")); 213 213 214 if ( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].want_portage_emulation_vars)214 if (params[k::package_id()]->eapi()->supported()->ebuild_options()->want_portage_emulation_vars()) 215 215 cmd = add_portage_vars(cmd); 216 216 217 217 if (do_run_command(cmd)) … … 336 336 Log::get_instance()->message("e.ebuild.cache_failure", ll_warning, lc_context) << "Could not generate cache for '" 337 337 << *params[k::package_id()] << "'"; 338 338 keys.reset(new Map<std::string, std::string>); 339 keys->insert("EAPI", (*EAPIData::get_instance()->unknown_eapi())[k::name()]);339 keys->insert("EAPI", EAPIData::get_instance()->unknown_eapi()->name()); 340 340 341 341 return false; 342 342 } … … 361 361 if (! keys) 362 362 throw InternalError(PALUDIS_HERE, "keys is 0"); 363 363 364 if (! (*id->eapi())[k::supported()])364 if (! id->eapi()->supported()) 365 365 { 366 366 Log::get_instance()->message("e.ebuild.preload_eapi.unsupported", ll_debug, lc_context) 367 << "ID pre-load EAPI '" << (*id->eapi())[k::name()]<< "' not supported";367 << "ID pre-load EAPI '" << id->eapi()->name() << "' not supported"; 368 368 id->set_slot(SlotName("UNKNOWN")); 369 369 return; 370 370 } 371 371 else 372 372 Log::get_instance()->message("e.ebuild.preload_eapi.supported", ll_debug, lc_context) 373 << "ID pre-load EAPI '" << (*id->eapi())[k::name()]<< "' is supported";373 << "ID pre-load EAPI '" << id->eapi()->name() << "' is supported"; 374 374 375 375 std::string s; 376 if (! ((s = get(keys, (*(*id->eapi())[k::supported()])[k::ebuild_metadata_variables()].metadata_eapi))).empty())376 if (! ((s = get(keys, id->eapi()->supported()->ebuild_metadata_variables()->eapi().name()))).empty()) 377 377 id->set_eapi(s); 378 378 else 379 379 id->set_eapi(id->e_repository()->params().eapi_when_unspecified); 380 380 381 if (! (*id->eapi())[k::supported()])381 if (! id->eapi()->supported()) 382 382 { 383 383 Log::get_instance()->message("e.ebuild.postload_eapi.unsupported", ll_debug, lc_context) 384 << "ID post-load EAPI '" << (*id->eapi())[k::name()]<< "' not supported";384 << "ID post-load EAPI '" << id->eapi()->name() << "' not supported"; 385 385 id->set_slot(SlotName("UNKNOWN")); 386 386 return; 387 387 } 388 388 else 389 389 Log::get_instance()->message("e.ebuild.postload_eapi.supported", ll_debug, lc_context) 390 << "ID post-load EAPI '" << (*id->eapi())[k::name()]<< "' is supported";390 << "ID post-load EAPI '" << id->eapi()->name() << "' is supported"; 391 391 392 const EAPIEbuildMetadataVariables & m( (*(*id->eapi())[k::supported()])[k::ebuild_metadata_variables()]);392 const EAPIEbuildMetadataVariables & m(*id->eapi()->supported()->ebuild_metadata_variables()); 393 393 394 if (! m. metadata_description.empty())395 id->load_short_description(m. metadata_description, m.description_description, get(keys, m.metadata_description));394 if (! m.description().name().empty()) 395 id->load_short_description(m.description().name(), m.description().description(), get(keys, m.description().name())); 396 396 397 397 398 if (! m. metadata_dependencies.empty())398 if (! m.dependencies().name().empty()) 399 399 { 400 400 DependenciesRewriter rewriter; 401 parse_depend(get(keys, m. metadata_dependencies), params[k::environment()], id, *id->eapi())->accept(rewriter);402 id->load_build_depend(m. metadata_dependencies + ".DEPEND", m.description_dependencies+ " (build)", rewriter.depend());403 id->load_run_depend(m. metadata_dependencies + ".RDEPEND", m.description_dependencies+ " (run)", rewriter.rdepend());404 id->load_post_depend(m. metadata_dependencies + ".PDEPEND", m.description_dependencies+ " (post)", rewriter.pdepend());401 parse_depend(get(keys, m.dependencies().name()), params[k::environment()], id, *id->eapi())->accept(rewriter); 402 id->load_build_depend(m.dependencies().name() + ".DEPEND", m.dependencies().description() + " (build)", rewriter.depend()); 403 id->load_run_depend(m.dependencies().name() + ".RDEPEND", m.dependencies().description() + " (run)", rewriter.rdepend()); 404 id->load_post_depend(m.dependencies().name() + ".PDEPEND", m.dependencies().description() + " (post)", rewriter.pdepend()); 405 405 } 406 406 else 407 407 { 408 if (! m. metadata_build_depend.empty())409 id->load_build_depend(m. metadata_build_depend, m.description_build_depend, get(keys, m.metadata_build_depend));408 if (! m.build_depend().name().empty()) 409 id->load_build_depend(m.build_depend().name(), m.build_depend().description(), get(keys, m.build_depend().name())); 410 410 411 if (! m. metadata_run_depend.empty())412 id->load_run_depend(m. metadata_run_depend, m.description_run_depend, get(keys, m.metadata_run_depend));411 if (! m.run_depend().name().empty()) 412 id->load_run_depend(m.run_depend().name(), m.run_depend().description(), get(keys, m.run_depend().name())); 413 413 414 if (! m. metadata_pdepend.empty())415 id->load_post_depend(m. metadata_pdepend, m.description_pdepend, get(keys, m.metadata_pdepend));414 if (! m.pdepend().name().empty()) 415 id->load_post_depend(m.pdepend().name(), m.pdepend().description(), get(keys, m.pdepend().name())); 416 416 } 417 417 418 if (! m. metadata_slot.empty())418 if (! m.slot().name().empty()) 419 419 { 420 420 try 421 421 { 422 422 Context c("When setting SLOT:"); 423 std::string slot(get(keys, m. metadata_slot));423 std::string slot(get(keys, m.slot().name())); 424 424 if (slot.empty()) 425 425 { 426 426 Log::get_instance()->message("e.ebuild.no_slot", ll_qa, lc_context) … … 442 442 } 443 443 } 444 444 445 if (! m. metadata_src_uri.empty())446 id->load_src_uri(m. metadata_src_uri, m.description_src_uri, get(keys, m.metadata_src_uri));445 if (! m.src_uri().name().empty()) 446 id->load_src_uri(m.src_uri().name(), m.src_uri().description(), get(keys, m.src_uri().name())); 447 447 448 if (! m. metadata_homepage.empty())449 id->load_homepage(m. metadata_homepage, m.description_homepage, get(keys, m.metadata_homepage));448 if (! m.homepage().name().empty()) 449 id->load_homepage(m.homepage().name(), m.homepage().description(), get(keys, m.homepage().name())); 450 450 451 if (! m. metadata_license.empty())452 id->load_license(m. metadata_license, m.description_license, get(keys, m.metadata_license));451 if (! m.license().name().empty()) 452 id->load_license(m.license().name(), m.license().description(), get(keys, m.license().name())); 453 453 454 if (! m. metadata_provide.empty())455 id->load_provide(m. metadata_provide, m.description_provide, get(keys, m.metadata_provide));454 if (! m.provide().name().empty()) 455 id->load_provide(m.provide().name(), m.provide().description(), get(keys, m.provide().name())); 456 456 457 if (! m. metadata_iuse.empty())458 id->load_iuse(m. metadata_iuse, m.description_iuse, get(keys, m.metadata_iuse));457 if (! m.iuse().name().empty()) 458 id->load_iuse(m.iuse().name(), m.iuse().description(), get(keys, m.iuse().name())); 459 459 460 if (! m. metadata_inherited.empty())461 id->load_inherited(m. metadata_inherited, m.description_inherited, get(keys, m.metadata_inherited));460 if (! m.inherited().name().empty()) 461 id->load_inherited(m.inherited().name(), m.inherited().description(), get(keys, m.inherited().name())); 462 462 463 if (! m. metadata_keywords.empty())464 id->load_keywords(m. metadata_keywords, m.description_keywords, get(keys, m.metadata_keywords));463 if (! m.keywords().name().empty()) 464 id->load_keywords(m.keywords().name(), m.keywords().description(), get(keys, m.keywords().name())); 465 465 466 if (! m. metadata_restrict.empty())467 id->load_restrict(m. metadata_restrict, m.description_restrict, get(keys, m.metadata_restrict));466 if (! m.restrictions().name().empty()) 467 id->load_restrict(m.restrictions().name(), m.restrictions().description(), get(keys, m.restrictions().name())); 468 468 469 if (! m. metadata_use.empty())470 id->load_use(m. metadata_use, m.description_use, get(keys, m.metadata_use));469 if (! m.use().name().empty()) 470 id->load_use(m.use().name(), m.use().description(), get(keys, m.use().name())); 471 471 } 472 472 473 473 EbuildVariableCommand::EbuildVariableCommand(const EbuildCommandParams & p, … … 532 532 .with_setenv("PALUDIS_PROFILE_DIRS", join(fetch_params[k::profiles()]->begin(), 533 533 fetch_params[k::profiles()]->end(), " "))); 534 534 535 if (! (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_aa()].empty())536 result.with_setenv( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_aa()],535 if (! params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_aa().empty()) 536 result.with_setenv(params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_aa(), 537 537 fetch_params[k::aa()]); 538 if (! (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use()].empty())539 result.with_setenv( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use()],538 if (! params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use().empty()) 539 result.with_setenv(params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use(), 540 540 fetch_params[k::use()]); 541 if (! (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand()].empty())542 result.with_setenv( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand()],541 if (! params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use_expand().empty()) 542 result.with_setenv(params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use_expand(), 543 543 fetch_params[k::use_expand()]); 544 544 545 545 for (Map<std::string, std::string>::ConstIterator … … 585 585 install_params[k::profiles()]->end(), " ")) 586 586 .with_setenv("SLOT", stringify(install_params[k::slot()]))); 587 587 588 if (! (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_aa()].empty())589 result.with_setenv( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_aa()],588 if (! params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_aa().empty()) 589 result.with_setenv(params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_aa(), 590 590 install_params[k::aa()]); 591 if (! (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use()].empty())592 result.with_setenv( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use()],591 if (! params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use().empty()) 592 result.with_setenv(params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use(), 593 593 install_params[k::use()]); 594 if (! (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand()].empty())595 result.with_setenv( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand()],594 if (! params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use_expand().empty()) 595 result.with_setenv(params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use_expand(), 596 596 install_params[k::use_expand()]); 597 597 598 598 for (Map<std::string, std::string>::ConstIterator … … 717 717 stringify(PALUDIS_VERSION_MICRO) + 718 718 (std::string(PALUDIS_GIT_HEAD).empty() ? 719 719 std::string("") : "-git-" + std::string(PALUDIS_GIT_HEAD))) 720 .with_setenv("EAPI", stringify( (*params[k::package_id()]->eapi())[k::exported_name()]))720 .with_setenv("EAPI", stringify(params[k::package_id()]->eapi()->exported_name())) 721 721 .with_setenv("PALUDIS_CONFIG_DIR", SYSCONFDIR "/paludis/") 722 722 .with_setenv("PALUDIS_BASHRC_FILES", join(bashrc_files->begin(), bashrc_files->end(), " ")) 723 723 .with_setenv("PALUDIS_HOOK_DIRS", join(hook_dirs->begin(), hook_dirs->end(), " ")) … … 727 727 .with_setenv("PALUDIS_EBUILD_LOG_LEVEL", stringify(Log::get_instance()->log_level())) 728 728 .with_setenv("PALUDIS_EBUILD_DIR", getenv_with_default("PALUDIS_EBUILD_DIR", LIBEXECDIR "/paludis")) 729 729 .with_setenv("PALUDIS_VDB_FROM_ENV_VARIABLES", 730 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].vdb_from_env_variables)730 params[k::package_id()]->eapi()->supported()->ebuild_options()->vdb_from_env_variables()) 731 731 .with_setenv("PALUDIS_VDB_FROM_ENV_UNLESS_EMPTY_VARIABLES", 732 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].vdb_from_env_unless_empty_variables)732 params[k::package_id()]->eapi()->supported()->ebuild_options()->vdb_from_env_unless_empty_variables()) 733 733 .with_setenv("PALUDIS_F_FUNCTION_PREFIX", 734 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].f_function_prefix)734 params[k::package_id()]->eapi()->supported()->ebuild_options()->f_function_prefix()) 735 735 .with_setenv("PALUDIS_IGNORE_PIVOT_ENV_FUNCTIONS", 736 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].ignore_pivot_env_functions)736 params[k::package_id()]->eapi()->supported()->ebuild_options()->ignore_pivot_env_functions()) 737 737 .with_setenv("PALUDIS_IGNORE_PIVOT_ENV_VARIABLES", 738 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].ignore_pivot_env_variables)738 params[k::package_id()]->eapi()->supported()->ebuild_options()->ignore_pivot_env_variables()) 739 739 .with_pipe_command_handler(std::tr1::bind(&pipe_command_handler, params[k::environment()], params[k::package_id()], _1)) 740 740 ); 741 741 … … 788 788 .with_setenv("PALUDIS_PROFILE_DIRS", join(pretend_params[k::profiles()]->begin(), 789 789 pretend_params[k::profiles()]->end(), " "))); 790 790 791 if (! (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use()].empty())792 result.with_setenv( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use()],791 if (! params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use().empty()) 792 result.with_setenv(params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use(), 793 793 pretend_params[k::use()]); 794 if (! (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand()].empty())795 result.with_setenv( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand()],794 if (! params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use_expand().empty()) 795 result.with_setenv(params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use_expand(), 796 796 pretend_params[k::use_expand()]); 797 797 798 798 for (Map<std::string, std::string>::ConstIterator … … 855 855 .with_setenv("PALUDIS_PROFILE_DIRS", join(info_params[k::profiles()]->begin(), 856 856 info_params[k::profiles()]->end(), " "))); 857 857 858 if (! (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use()].empty())859 result.with_setenv( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use()],858 if (! params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use().empty()) 859 result.with_setenv(params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use(), 860 860 info_params[k::use()]); 861 if (! (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand()].empty())862 result.with_setenv( (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_use_expand()],861 if (! params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use_expand().empty()) 862 result.with_setenv(params[k::package_id()]->eapi()->supported()->ebuild_environment_variables()->env_use_expand(), 863 863 info_params[k::use_expand()]); 864 864 865 865 for (Map<std::string, std::string>::ConstIterator … … 894 894 { 895 895 using namespace std::tr1::placeholders; 896 896 897 if (! (*EAPIData::get_instance()->eapi_from_string("pbin-1+" + (*params[k::package_id()]->eapi())[k::exported_name()]))[k::supported()])897 if (! EAPIData::get_instance()->eapi_from_string("pbin-1+" + params[k::package_id()]->eapi()->exported_name())->supported()) 898 898 throw InstallActionError("Don't know how to write binary ebuilds using EAPI 'pbin-1+" + 899 (*params[k::package_id()]->eapi())[k::exported_name()]);899 params[k::package_id()]->eapi()->exported_name()); 900 900 901 901 std::string bindistfile(stringify(params[k::destination_repository()]->name()) + "--" + stringify(params[k::package_id()]->name().category) 902 902 + "--" + stringify(params[k::package_id()]->name().package) + "-" + stringify(params[k::package_id()]->version()) … … 920 920 stringify(PALUDIS_VERSION_MICRO) + 921 921 (std::string(PALUDIS_GIT_HEAD).empty() ? 922 922 std::string("") : "-git-" + std::string(PALUDIS_GIT_HEAD))) 923 .with_setenv("EAPI", stringify( (*params[k::package_id()]->eapi())[k::exported_name()]))923 .with_setenv("EAPI", stringify(params[k::package_id()]->eapi()->exported_name())) 924 924 .with_setenv("PALUDIS_CONFIG_DIR", SYSCONFDIR "/paludis/") 925 925 .with_setenv("PALUDIS_TMPDIR", stringify(params[k::builddir()])) 926 926 .with_setenv("PALUDIS_BASHRC_FILES", join(bashrc_files->begin(), bashrc_files->end(), " ")) … … 931 931 .with_setenv("PALUDIS_EBUILD_LOG_LEVEL", stringify(Log::get_instance()->log_level())) 932 932 .with_setenv("PALUDIS_EBUILD_DIR", getenv_with_default("PALUDIS_EBUILD_DIR", LIBEXECDIR "/paludis")) 933 933 .with_setenv("PALUDIS_BINARY_FROM_ENV_VARIABLES", 934 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].binary_from_env_variables)934 params[k::package_id()]->eapi()->supported()->ebuild_options()->binary_from_env_variables()) 935 935 .with_setenv("PALUDIS_F_FUNCTION_PREFIX", 936 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].f_function_prefix)936 params[k::package_id()]->eapi()->supported()->ebuild_options()->f_function_prefix()) 937 937 .with_setenv("PALUDIS_IGNORE_PIVOT_ENV_FUNCTIONS", 938 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].ignore_pivot_env_functions)938 params[k::package_id()]->eapi()->supported()->ebuild_options()->ignore_pivot_env_functions()) 939 939 .with_setenv("PALUDIS_IGNORE_PIVOT_ENV_VARIABLES", 940 (*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_options()].ignore_pivot_env_variables)940 params[k::package_id()]->eapi()->supported()->ebuild_options()->ignore_pivot_env_variables()) 941 941 .with_setenv("PALUDIS_BINARY_URI_PREFIX", params[k::destination_repository()]->params().binary_uri_prefix) 942 942 .with_setenv("PALUDIS_BINARY_KEYWORDS", params[k::destination_repository()]->params().binary_keywords) 943 .with_setenv("PALUDIS_BINARY_KEYWORDS_VARIABLE", (*(*EAPIData::get_instance()->eapi_from_string("pbin-1+"944 + (*params[k::package_id()]->eapi())[k::exported_name()]))[k::supported()])[k::ebuild_metadata_variables()].metadata_keywords)945 .with_setenv("PALUDIS_BINARY_DISTDIR_VARIABLE", (*(*EAPIData::get_instance()->eapi_from_string("pbin-1+"946 + (*params[k::package_id()]->eapi())[k::exported_name()]))[k::supported()])[k::ebuild_environment_variables()][k::env_distdir()])943 .with_setenv("PALUDIS_BINARY_KEYWORDS_VARIABLE", EAPIData::get_instance()->eapi_from_string("pbin-1+" 944 + params[k::package_id()]->eapi()->exported_name())->supported()->ebuild_metadata_variables()->keywords().name()) 945 .with_setenv("PALUDIS_BINARY_DISTDIR_VARIABLE", EAPIData::get_instance()->eapi_from_string("pbin-1+" 946 + params[k::package_id()]->eapi()->exported_name())->supported()->ebuild_environment_variables()->env_distdir()) 947 947 .with_pipe_command_handler(std::tr1::bind(&pipe_command_handler, params[k::environment()], params[k::package_id()], _1)) 948 948 ); 949 949 -
paludis/repositories/e/ebuild_entries.cc
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc index a01006b..13d43b7 100644
a b 227 227 const ERepositoryID & id, 228 228 std::tr1::shared_ptr<const ERepositoryProfile> profile) 229 229 { 230 if (! (*id.eapi())[k::supported()])230 if (! id.eapi()->supported()) 231 231 { 232 232 Log::get_instance()->message("e.ebuild.unknown_eapi", ll_warning, lc_context) 233 233 << "Can't make the USE string for '" << id << "' because its EAPI is unsupported"; … … 242 242 if (env->query_use(i->flag, id)) 243 243 use += stringify(i->flag) + " "; 244 244 245 if (! (*(*id.eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_arch()].empty())246 use += profile->environment_variable( (*(*id.eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_arch()]) + " ";245 if (! id.eapi()->supported()->ebuild_environment_variables()->env_arch().empty()) 246 use += profile->environment_variable(id.eapi()->supported()->ebuild_environment_variables()->env_arch()) + " "; 247 247 248 248 return use; 249 249 } … … 258 258 std::tr1::shared_ptr<Map<std::string, std::string> > expand_vars( 259 259 new Map<std::string, std::string>); 260 260 261 if (! (*e.eapi())[k::supported()])261 if (! e.eapi()->supported()) 262 262 { 263 263 Log::get_instance()->message("e.ebuild.unknown_eapi", ll_warning, lc_context) 264 264 << "Can't make the USE_EXPAND strings for '" << e << "' because its EAPI is unsupported"; … … 288 288 for (std::set<UseFlagName>::const_iterator u(possible_values.begin()), u_end(possible_values.end()) ; 289 289 u != u_end ; ++u) 290 290 { 291 if ( (*(*e.eapi())[k::supported()])[k::ebuild_options()].require_use_expand_in_iuse)291 if (e.eapi()->supported()->ebuild_options()->require_use_expand_in_iuse()) 292 292 if (e.iuse_key() && e.iuse_key()->value()->end() == e.iuse_key()->value()->find( 293 293 IUseFlag(*u, use_unspecified, std::string::npos))) 294 294 continue; … … 296 296 if (! env->query_use(UseFlagName(lower_x + expand_sep + stringify(*u)), e)) 297 297 continue; 298 298 299 if (! (*(*e.eapi())[k::supported()])[k::ebuild_options()].require_use_expand_in_iuse)299 if (! e.eapi()->supported()->ebuild_options()->require_use_expand_in_iuse()) 300 300 use.append(lower_x + expand_sep + stringify(*u) + " "); 301 301 302 302 std::string value; … … 362 362 for (DepSpecFlattener<RestrictSpecTree, PlainTextDepSpec>::ConstIterator i(restricts.begin()), i_end(restricts.end()) ; 363 363 i != i_end ; ++i) 364 364 { 365 if ( (*(*id->eapi())[k::supported()])[k::ebuild_options()].restrict_fetch->end() !=366 std::find( (*(*id->eapi())[k::supported()])[k::ebuild_options()].restrict_fetch->begin(),367
