aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-07-23 16:36:12 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2008-07-23 16:36:12 +0100
commitfadfd3ea6e287003b21c973337e64e215aca4c4a (patch)
tree93da18e7588ffa5135a52ab9086f9e5e414d675c
parent7a6672386eac9b3256ebeb447ae44ae6956c4bdd (diff)
parent94e9ecd9fec55432a79e43b6964fc63ff80d2e89 (diff)
downloadpaludis-fadfd3ea6e287003b21c973337e64e215aca4c4a.tar.gz
paludis-fadfd3ea6e287003b21c973337e64e215aca4c4a.tar.xz
Merge branch 'master' of ssh://git@git.pioto.org/paludis
-rw-r--r--NEWS21
-rw-r--r--configure.ac33
-rw-r--r--doc/api/cplusplus/examples/example_dep_spec.cc7
-rw-r--r--doc/configuration/hooks.html.part2
-rw-r--r--doc/configuration/specs.html.part6
-rwxr-xr-xdoc/htmltidy.bash2
-rw-r--r--hooks/demos/elog.bash.in2
-rw-r--r--hooks/demos/new_packages.bash.in2
-rwxr-xr-xhooks/demos/pretend_resume.hook.in2
-rwxr-xr-xhooks/demos/report.bash.in2
-rwxr-xr-xhooks/eselect_env_update.bash2
-rwxr-xr-xhooks/eselect_env_update_TEST2
-rwxr-xr-xhooks/eselect_env_update_TEST_cleanup.sh2
-rwxr-xr-xhooks/eselect_env_update_TEST_setup.sh2
-rwxr-xr-xhooks/find_config_updates.hook2
-rwxr-xr-xhooks/gnu_info_index.bash2
-rwxr-xr-xhooks/installable_cache_regen.bash2
-rwxr-xr-xhooks/installed_cache_regen.bash2
-rwxr-xr-xhooks/log.bash2
-rwxr-xr-xhooks/news.hook2
-rwxr-xr-xhooks/news_TEST2
-rwxr-xr-xhooks/news_TEST_cleanup.sh2
-rwxr-xr-xhooks/news_TEST_setup.sh2
-rwxr-xr-xhooks/run_test.bash2
-rwxr-xr-xhooks/update_config_protect_list.bash2
-rwxr-xr-xhooks/write_cache_clean.bash2
-rw-r--r--paludis/Makefile.am.m42
-rw-r--r--paludis/action-fwd.hh12
-rw-r--r--paludis/action.cc19
-rw-r--r--paludis/action.hh6
-rw-r--r--paludis/action.se2
-rw-r--r--paludis/args/install_args_group.cc5
-rw-r--r--paludis/args/install_args_group.hh3
-rw-r--r--paludis/dep_list.cc9
-rw-r--r--paludis/dep_list.sr2
-rw-r--r--paludis/dep_list_TEST.cc6
-rw-r--r--paludis/dep_list_TEST.hh28
-rw-r--r--paludis/dep_list_TEST_blockers.cc6
-rw-r--r--paludis/dep_list_options.se2
-rw-r--r--paludis/dep_spec.cc95
-rw-r--r--paludis/dep_spec.hh33
-rw-r--r--paludis/dep_spec_flattener.cc11
-rw-r--r--paludis/elike_package_dep_spec-fwd.hh56
-rw-r--r--paludis/elike_package_dep_spec.cc540
-rw-r--r--paludis/elike_package_dep_spec.se2
-rw-r--r--paludis/elike_use_requirement.se2
-rw-r--r--paludis/environments/no_config/no_config_environment.cc6
-rw-r--r--paludis/environments/no_config/no_config_environment.se2
-rw-r--r--paludis/environments/no_config/no_config_environment.sr2
-rwxr-xr-xpaludis/environments/no_config/no_config_environment_TEST_cleanup.sh2
-rwxr-xr-xpaludis/environments/no_config/no_config_environment_TEST_setup.sh2
-rw-r--r--paludis/environments/paludis/paludis_config.cc4
-rwxr-xr-xpaludis/environments/paludis/paludis_environment_TEST_cleanup.sh2
-rwxr-xr-xpaludis/environments/paludis/paludis_environment_TEST_setup.sh2
-rw-r--r--paludis/environments/paludis/use_config_entry.sr2
-rw-r--r--paludis/environments/portage/bashrc2
-rw-r--r--paludis/environments/portage/portage_environment.cc31
-rw-r--r--paludis/environments/portage/portage_environment_TEST.cc2
-rwxr-xr-xpaludis/environments/portage/portage_environment_TEST_cleanup.sh2
-rwxr-xr-xpaludis/environments/portage/portage_environment_TEST_setup.sh6
-rw-r--r--paludis/environments/test/test_environment.cc46
-rw-r--r--paludis/environments/test/test_environment.hh2
-rwxr-xr-xpaludis/fetchers/dofile2
-rwxr-xr-xpaludis/fetchers/dowget.in2
-rw-r--r--paludis/filter-fwd.hh1
-rw-r--r--paludis/filter.cc35
-rw-r--r--paludis/filter.hh7
-rw-r--r--paludis/find_unused_packages_task.cc2
-rw-r--r--paludis/fuzzy_finder.cc7
-rw-r--r--paludis/generator-fwd.hh3
-rw-r--r--paludis/generator.cc62
-rw-r--r--paludis/generator.hh11
-rw-r--r--paludis/generator_TEST.cc4
-rw-r--r--paludis/hook.se2
-rw-r--r--paludis/hook.sr2
-rwxr-xr-xpaludis/hooker.bash2
-rwxr-xr-xpaludis/hooker_TEST_cleanup.sh2
-rwxr-xr-xpaludis/hooker_TEST_setup.sh2
-rw-r--r--paludis/host_tuple_name.sr2
-rw-r--r--paludis/install_task.cc53
-rw-r--r--paludis/install_task.hh1
-rw-r--r--paludis/install_task.se2
-rw-r--r--paludis/match_package.cc16
-rw-r--r--paludis/merger.se2
-rwxr-xr-xpaludis/merger_TEST_cleanup.sh2
-rwxr-xr-xpaludis/merger_TEST_setup.sh2
-rw-r--r--paludis/merger_entry_type.se2
-rw-r--r--paludis/metadata_key.se2
-rw-r--r--paludis/name.se2
-rw-r--r--paludis/name.sr2
-rw-r--r--paludis/package_id.hh13
-rw-r--r--paludis/package_id.se2
-rw-r--r--paludis/qa.se2
-rw-r--r--paludis/qa.sr2
-rw-r--r--paludis/range_rewriter.cc11
-rw-r--r--paludis/report_task.cc50
-rw-r--r--paludis/report_task.hh5
-rw-r--r--paludis/repositories/cran/cran/cran.bash2
-rw-r--r--paludis/repositories/cran/cran_installed_repository.sr2
-rw-r--r--paludis/repositories/cran/cran_package_id.cc12
-rw-r--r--paludis/repositories/cran/cran_package_id.hh3
-rw-r--r--paludis/repositories/cran/cran_repository.sr2
-rw-r--r--paludis/repositories/cran/package_dep_spec.cc7
-rw-r--r--paludis/repositories/e/Makefile.am2
-rw-r--r--paludis/repositories/e/dep_parser.se2
-rw-r--r--paludis/repositories/e/e_installed_repository.cc57
-rw-r--r--paludis/repositories/e/e_installed_repository.hh2
-rw-r--r--paludis/repositories/e/e_installed_repository.sr2
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc46
-rw-r--r--paludis/repositories/e/e_installed_repository_id.hh3
-rw-r--r--paludis/repositories/e/e_key.cc13
-rw-r--r--paludis/repositories/e/e_repository.cc134
-rw-r--r--paludis/repositories/e/e_repository.hh3
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc24
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_setup.sh50
-rw-r--r--paludis/repositories/e/e_repository_params.se2
-rw-r--r--paludis/repositories/e/e_repository_params.sr2
-rw-r--r--paludis/repositories/e/e_repository_sets.cc4
-rwxr-xr-xpaludis/repositories/e/e_repository_sets_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/e/e_repository_sets_TEST_setup.sh2
-rw-r--r--paludis/repositories/e/eapi.sr2
-rw-r--r--paludis/repositories/e/ebuild.cc12
-rw-r--r--paludis/repositories/e/ebuild.hh4
-rw-r--r--paludis/repositories/e/ebuild/0/build_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_infovars.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_init.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_initmisc.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_initrm.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_killold.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_killoldmisc.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_killoldrm.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_loadenv.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_metadata.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_saveenv.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_tidyup.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_tidyupmisc.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_tidyuprm.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_variable.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/conditional_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/conditional_functions_TEST.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/eclass_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/ever_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/exlib_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/list_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/list_functions_TEST.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/output_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/pkg_config.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/pkg_info.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/pkg_nofetch.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/pkg_postinst.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/pkg_postrm.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/pkg_preinst.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/pkg_prerm.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/pkg_pretend.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/pkg_setup.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/portage_stubs.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/src_compile.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/src_install.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/src_test.bash2
-rw-r--r--paludis/repositories/e/ebuild/0/src_unpack.bash2
-rw-r--r--paludis/repositories/e/ebuild/1/output_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/1/src_compile.bash2
-rw-r--r--paludis/repositories/e/ebuild/binary_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/die_functions.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/build_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_infovars.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_init.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_initrm.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_killold.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_killoldmisc.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_killoldrm.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_loadenv.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_metadata.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_saveenv.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_tidyupmisc.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_tidyuprm.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_variable.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/exheres-0/conditional_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/conditional_functions_TEST.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/ever_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/list_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/list_functions_TEST.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/output_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/pkg_config.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/pkg_info.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/pkg_nofetch.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/pkg_postinst.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/pkg_postrm.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/pkg_preinst.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/pkg_prerm.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/pkg_pretend.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/pkg_setup.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/exheres-0/portage_stubs.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/src_compile.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/src_configure.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/src_install.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/src_prepare.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/src_test.bash2
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/src_unpack.bash2
-rw-r--r--paludis/repositories/e/ebuild/install_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/kdebuild-1/output_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/kernel_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/kernel_functions_TEST.bash2
-rw-r--r--paludis/repositories/e/ebuild/multilib_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/output_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/paludis-1/output_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/pbin-1/builtin_installbin.bash2
-rw-r--r--paludis/repositories/e/ebuild/pbin-1/builtin_pivotbin.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/pipe_functions.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/run_test.bash2
-rw-r--r--paludis/repositories/e/ebuild/sandbox.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/source_functions.bash2
-rw-r--r--paludis/repositories/e/ebuild/usage_error.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/awk2
-rw-r--r--paludis/repositories/e/ebuild/utils/awk_TEST.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/canonicalise2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dobin2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doconfd2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dodir2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dodoc2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doenvd2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doexe2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dohard2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dohtml4
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doinfo2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doinitd2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doins2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dolib2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dolib.a2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dolib.so2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doman2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/domo2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/donewins2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dosbin2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dosed2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dosym2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/ecompress2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/ecompressdir2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/emake2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/exheres-0/banned_in_eapi_exheres-02
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/exheres-0/nonfatal2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/fowners2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/fperms2
-rw-r--r--paludis/repositories/e/ebuild/utils/kdebuild-1/banned_in_eapi_kdebuild-12
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/make2
-rw-r--r--paludis/repositories/e/ebuild/utils/make_TEST.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newbin2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newconfd2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newdoc2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newenvd2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newexe2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newinitd2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newins2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newlib.a2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newlib.so2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newman2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newsbin2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/patch2
-rw-r--r--paludis/repositories/e/ebuild/utils/patch_TEST.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/prep.in2
-rw-r--r--paludis/repositories/e/ebuild/utils/run_test.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/sed2
-rw-r--r--paludis/repositories/e/ebuild/utils/sed_TEST.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/unpack2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/wrapped_getfsize2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/wrapped_getfsize_TEST.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/wrapped_getmtime2
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/wrapped_ldconfig2
-rw-r--r--paludis/repositories/e/ebuild/write_binary_ebuild.bash2
-rwxr-xr-xpaludis/repositories/e/ebuild/write_vdb_entry.bash2
-rw-r--r--paludis/repositories/e/ebuild_entries.cc13
-rw-r--r--paludis/repositories/e/ebuild_id.cc12
-rw-r--r--paludis/repositories/e/ebuild_id.hh3
-rw-r--r--paludis/repositories/e/exheres_layout.cc63
-rw-r--r--paludis/repositories/e/exheres_layout.hh6
-rw-r--r--paludis/repositories/e/exndbam_repository.cc7
-rw-r--r--paludis/repositories/e/exndbam_repository.hh2
-rw-r--r--paludis/repositories/e/exndbam_repository.sr2
-rwxr-xr-xpaludis/repositories/e/exndbam_repository_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/e/exndbam_repository_TEST_setup.sh2
-rwxr-xr-xpaludis/repositories/e/fetch_visitor_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/e/fetch_visitor_TEST_setup.sh2
-rw-r--r--paludis/repositories/e/info_metadata_key.cc201
-rw-r--r--paludis/repositories/e/info_metadata_key.hh55
-rw-r--r--paludis/repositories/e/layout.hh7
-rw-r--r--paludis/repositories/e/manifest2_entry.sr2
-rwxr-xr-xpaludis/repositories/e/qa/manifest_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/e/qa/manifest_TEST_setup.sh2
-rwxr-xr-xpaludis/repositories/e/qa/misc_files_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/e/qa/misc_files_TEST_setup.sh2
-rw-r--r--paludis/repositories/e/qa/visibility.cc4
-rwxr-xr-xpaludis/repositories/e/qa/visibility_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/e/qa/visibility_TEST_setup.sh2
-rw-r--r--paludis/repositories/e/traditional_layout.cc57
-rw-r--r--paludis/repositories/e/traditional_layout.hh6
-rw-r--r--paludis/repositories/e/use_desc.cc17
-rw-r--r--paludis/repositories/e/use_desc.hh9
-rwxr-xr-xpaludis/repositories/e/vdb_merger_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/e/vdb_merger_TEST_setup.sh2
-rw-r--r--paludis/repositories/e/vdb_repository.cc9
-rw-r--r--paludis/repositories/e/vdb_repository.hh2
-rw-r--r--paludis/repositories/e/vdb_repository.sr2
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc21
-rwxr-xr-xpaludis/repositories/e/vdb_repository_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/e/vdb_repository_TEST_setup.sh2
-rwxr-xr-xpaludis/repositories/e/vdb_unmerger_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/e/vdb_unmerger_TEST_setup.sh2
-rwxr-xr-xpaludis/repositories/e/xml_things_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/e/xml_things_TEST_setup.sh2
-rw-r--r--paludis/repositories/fake/fake_package_id.cc50
-rw-r--r--paludis/repositories/fake/fake_package_id.hh17
-rw-r--r--paludis/repositories/gems/gem_specification.cc12
-rw-r--r--paludis/repositories/gems/gem_specification.hh3
-rwxr-xr-xpaludis/repositories/gems/gems.bash2
-rwxr-xr-xpaludis/repositories/gems/gems_repository_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/gems/gems_repository_TEST_setup.sh2
-rwxr-xr-xpaludis/repositories/gems/installed_gems_repository_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/gems/installed_gems_repository_TEST_setup.sh2
-rw-r--r--paludis/repositories/gems/params.sr2
-rw-r--r--paludis/repositories/unavailable/unavailable_id.cc12
-rw-r--r--paludis/repositories/unavailable/unavailable_id.hh3
-rwxr-xr-xpaludis/repositories/unavailable/unavailable_repository_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/unavailable/unavailable_repository_TEST_setup.sh2
-rw-r--r--paludis/repositories/unpackaged/installed_id.cc89
-rw-r--r--paludis/repositories/unpackaged/installed_id.hh5
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc4
-rw-r--r--paludis/repositories/unpackaged/installed_repository.sr2
-rw-r--r--paludis/repositories/unpackaged/installed_repository_TEST.cc43
-rwxr-xr-xpaludis/repositories/unpackaged/installed_repository_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/unpackaged/installed_repository_TEST_setup.sh2
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.cc12
-rw-r--r--paludis/repositories/unpackaged/unpackaged_id.hh3
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository_TEST.cc2
-rwxr-xr-xpaludis/repositories/unpackaged/unpackaged_repository_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repositories/unpackaged/unpackaged_repository_TEST_setup.sh2
-rw-r--r--paludis/repositories/virtuals/package_id.cc14
-rw-r--r--paludis/repositories/virtuals/package_id.hh3
-rw-r--r--paludis/repository.hh11
-rwxr-xr-xpaludis/repository_name_cache_TEST_cleanup.sh2
-rwxr-xr-xpaludis/repository_name_cache_TEST_setup.sh2
-rw-r--r--paludis/set_file.se2
-rwxr-xr-xpaludis/set_file_TEST_cleanup.sh2
-rwxr-xr-xpaludis/set_file_TEST_setup.sh2
-rw-r--r--paludis/stage_options.sr2
-rwxr-xr-xpaludis/stripper_TEST_cleanup.sh2
-rwxr-xr-xpaludis/stripper_TEST_setup.sh2
-rw-r--r--paludis/syncers/dobzr.in2
-rw-r--r--paludis/syncers/docvs.in2
-rw-r--r--paludis/syncers/dodarcs.in2
-rw-r--r--paludis/syncers/dodummy2
-rw-r--r--paludis/syncers/dogit.in2
-rw-r--r--paludis/syncers/dorsync.in2
-rw-r--r--paludis/syncers/dosvn.in2
-rw-r--r--paludis/syncers/dotar.in2
-rw-r--r--paludis/uninstall_list.se2
-rw-r--r--paludis/uninstall_list.sr2
-rw-r--r--paludis/uninstall_list_TEST.cc24
-rw-r--r--paludis/uninstall_task.cc44
-rw-r--r--paludis/uninstall_task.hh1
-rw-r--r--paludis/user_dep_spec.cc185
-rw-r--r--paludis/user_dep_spec.se2
-rw-r--r--paludis/user_dep_spec_TEST.cc61
-rw-r--r--paludis/util/config_file.cc15
-rw-r--r--paludis/util/config_file.se3
-rw-r--r--paludis/util/config_file_TEST.cc27
-rwxr-xr-xpaludis/util/config_file_TEST_cleanup.sh2
-rwxr-xr-xpaludis/util/config_file_TEST_setup.sh2
-rw-r--r--paludis/util/dir_iterator.se2
-rwxr-xr-xpaludis/util/dir_iterator_TEST_cleanup.sh2
-rwxr-xr-xpaludis/util/dir_iterator_TEST_setup.sh2
-rw-r--r--paludis/util/echo_functions.bash.in2
-rwxr-xr-xpaludis/util/fs_entry_TEST_cleanup.sh2
-rwxr-xr-xpaludis/util/fs_entry_TEST_setup.sh2
-rw-r--r--paludis/util/is_file_with_extension.se2
-rwxr-xr-xpaludis/util/is_file_with_extension_TEST_cleanup.sh2
-rwxr-xr-xpaludis/util/is_file_with_extension_TEST_setup.sh2
-rw-r--r--paludis/util/keys.hh11
-rw-r--r--paludis/util/log.se2
-rwxr-xr-xpaludis/util/output_wrapper_TEST_cleanup.sh2
-rwxr-xr-xpaludis/util/output_wrapper_TEST_setup.sh2
-rwxr-xr-xpaludis/util/system_TEST_cleanup.sh2
-rwxr-xr-xpaludis/util/system_TEST_setup.sh6
-rw-r--r--paludis/version_operator.se2
-rw-r--r--paludis/version_requirements.sr2
-rw-r--r--python/Makefile.am7
-rw-r--r--python/action.cc28
-rwxr-xr-xpython/action_TEST.py21
-rwxr-xr-xpython/dep_list_TEST_cleanup.sh2
-rwxr-xr-xpython/dep_list_TEST_setup.sh2
-rw-r--r--python/dep_spec.cc42
-rw-r--r--python/dep_spec.hh3
-rwxr-xr-xpython/dep_spec_TEST.py5
-rwxr-xr-xpython/environment_TEST_cleanup.sh2
-rwxr-xr-xpython/environment_TEST_setup.sh2
-rw-r--r--python/generator.cc8
-rwxr-xr-xpython/mask_TEST.py25
-rwxr-xr-xpython/mask_TEST_cleanup.sh2
-rwxr-xr-xpython/mask_TEST_setup.sh2
-rwxr-xr-xpython/metadata_key_TEST.py4
-rwxr-xr-xpython/metadata_key_TEST_cleanup.sh2
-rwxr-xr-xpython/metadata_key_TEST_setup.sh2
-rw-r--r--python/nice_names.nn2
-rwxr-xr-xpython/package_database_TEST.py11
-rwxr-xr-xpython/package_database_TEST_cleanup.sh2
-rwxr-xr-xpython/package_database_TEST_setup.sh2
-rw-r--r--python/package_id.cc11
-rwxr-xr-xpython/package_id_TEST.py20
-rwxr-xr-xpython/package_id_TEST_cleanup.sh2
-rwxr-xr-xpython/package_id_TEST_setup.sh2
-rwxr-xr-xpython/repository_TEST_cleanup.sh2
-rwxr-xr-xpython/repository_TEST_setup.sh2
-rw-r--r--ruby/Makefile.am7
-rw-r--r--ruby/action.cc137
-rw-r--r--ruby/action_TEST.rb37
-rwxr-xr-xruby/action_TEST_cleanup.sh2
-rwxr-xr-xruby/action_TEST_setup.sh2
-rwxr-xr-xruby/dep_list_TEST_cleanup.sh2
-rwxr-xr-xruby/dep_list_TEST_setup.sh2
-rw-r--r--ruby/dep_spec.cc29
-rw-r--r--ruby/dep_spec_TEST.rb11
-rwxr-xr-xruby/dep_spec_TEST_cleanup.sh2
-rwxr-xr-xruby/dep_spec_TEST_setup.sh2
-rwxr-xr-xruby/dep_tag_TEST_cleanup.sh2
-rwxr-xr-xruby/dep_tag_TEST_setup.sh2
-rwxr-xr-xruby/environment_TEST_cleanup.sh2
-rwxr-xr-xruby/environment_TEST_setup.sh2
-rwxr-xr-xruby/find_unused_packages_task_TEST_cleanup.sh2
-rwxr-xr-xruby/find_unused_packages_task_TEST_setup.sh2
-rw-r--r--ruby/generator.cc40
-rw-r--r--ruby/generator_TEST.rb12
-rwxr-xr-xruby/generator_TEST_cleanup.sh2
-rwxr-xr-xruby/generator_TEST_setup.sh2
-rw-r--r--ruby/nice_names.nn2
-rw-r--r--ruby/package_database_TEST.rb21
-rwxr-xr-xruby/package_database_TEST_cleanup.sh2
-rwxr-xr-xruby/package_database_TEST_setup.sh2
-rw-r--r--ruby/package_id.cc18
-rw-r--r--ruby/package_id_TEST.rb21
-rwxr-xr-xruby/package_id_TEST_cleanup.sh2
-rwxr-xr-xruby/package_id_TEST_setup.sh2
-rwxr-xr-xruby/paludis_ruby_TEST_cleanup.sh2
-rwxr-xr-xruby/paludis_ruby_TEST_setup.sh2
-rwxr-xr-xruby/repository_TEST_cleanup.sh2
-rwxr-xr-xruby/repository_TEST_setup.sh2
-rw-r--r--src/clients/accerso/accerso.cc2
-rwxr-xr-xsrc/clients/accerso/help_TEST2
-rwxr-xr-xsrc/clients/accerso/version_TEST2
-rwxr-xr-xsrc/clients/adjutrix/args_from_environment_TEST2
-rw-r--r--src/clients/adjutrix/downgrade_check.sr2
-rw-r--r--src/clients/adjutrix/find_dropped_keywords.sr2
-rw-r--r--src/clients/adjutrix/find_stable_candidates.sr2
-rwxr-xr-xsrc/clients/adjutrix/find_stable_candidates_TEST2
-rwxr-xr-xsrc/clients/adjutrix/find_stable_candidates_TEST_cleanup.sh2
-rwxr-xr-xsrc/clients/adjutrix/find_stable_candidates_TEST_setup.sh2
-rwxr-xr-xsrc/clients/adjutrix/help_TEST2
-rw-r--r--src/clients/adjutrix/keywords_graph.cc2
-rwxr-xr-xsrc/clients/adjutrix/version_TEST2
-rw-r--r--src/clients/contrarius/contrarius_stage_options.sr2
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc30
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc2
-rw-r--r--src/clients/gtkpaludis/vtemm/defs/Makefile.am2
-rwxr-xr-xsrc/clients/inquisitio/help_TEST2
-rwxr-xr-xsrc/clients/inquisitio/version_TEST2
-rwxr-xr-xsrc/clients/instruo/help_TEST2
-rw-r--r--src/clients/instruo/instruo.cc2
-rwxr-xr-xsrc/clients/instruo/version_TEST2
-rwxr-xr-xsrc/clients/paludis/args_from_environment_TEST2
-rwxr-xr-xsrc/clients/paludis/continue_on_failure_TEST2
-rwxr-xr-xsrc/clients/paludis/continue_on_failure_TEST_cleanup.sh2
-rwxr-xr-xsrc/clients/paludis/continue_on_failure_TEST_setup.sh2
-rwxr-xr-xsrc/clients/paludis/exception_TEST2
-rwxr-xr-xsrc/clients/paludis/help_TEST2
-rw-r--r--src/clients/paludis/info.cc18
-rwxr-xr-xsrc/clients/paludis/install_TEST2
-rwxr-xr-xsrc/clients/paludis/install_TEST_cleanup.sh2
-rwxr-xr-xsrc/clients/paludis/install_TEST_setup.sh4
-rwxr-xr-xsrc/clients/paludis/list_dep_tag_categories_TEST2
-rwxr-xr-xsrc/clients/paludis/list_repository_formats_TEST2
-rwxr-xr-xsrc/clients/paludis/pretend_TEST2
-rwxr-xr-xsrc/clients/paludis/pretend_TEST_cleanup.sh2
-rwxr-xr-xsrc/clients/paludis/pretend_TEST_setup.sh2
-rw-r--r--src/clients/paludis/query.cc29
-rw-r--r--src/clients/paludis/report.cc44
-rw-r--r--src/clients/paludis/uninstall.cc24
-rwxr-xr-xsrc/clients/paludis/upgrade_TEST2
-rwxr-xr-xsrc/clients/paludis/upgrade_TEST_cleanup.sh2
-rwxr-xr-xsrc/clients/paludis/upgrade_TEST_setup.sh10
-rwxr-xr-xsrc/clients/paludis/version_TEST2
-rwxr-xr-xsrc/clients/reconcilio/broken_linkage_finder/configuration_TEST_cleanup.sh2
-rwxr-xr-xsrc/clients/reconcilio/broken_linkage_finder/configuration_TEST_setup.sh2
-rwxr-xr-xsrc/clients/reconcilio/util/realpath_TEST_cleanup.sh2
-rwxr-xr-xsrc/clients/reconcilio/util/realpath_TEST_setup.sh2
-rwxr-xr-xsrc/clients/reconcilio/util/wildcard_expander_TEST_cleanup.sh2
-rwxr-xr-xsrc/clients/reconcilio/util/wildcard_expander_TEST_setup.sh2
-rw-r--r--src/output/console_install_task.cc37
-rw-r--r--src/output/console_install_task.sr2
-rw-r--r--src/output/console_query_task.cc27
-rw-r--r--src/output/console_query_task.hh2
-rwxr-xr-xtest/run_test.sh2
505 files changed, 2568 insertions, 1725 deletions
diff --git a/NEWS b/NEWS
index a3c3dda..c36eca4 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,7 @@ News for Paludis
This file lists the major changes between versions. For a more detailed list
of every change, see the ChangeLog.
-trunk/:
+0.28.0:
* Compilers without tr1 memory, type traits and functional support are no
longer supported. This means you, gcc-3.
@@ -12,18 +12,25 @@ trunk/:
* Better detection of SCM versions.
- * bug fixes: importare now really adds packages to world by default, as
- promised in 0.26.0_pre3. pkg_pretend is now properly fatal (ticket:579).
- There are no longer bogus 'use flags defined recursively' messages
- (ticket:568). Symlink rewriting now works when builddir contains symlinks
- (ticket:571). The dreaded Ruby bindings segfaults are fixed (ticket:558).
- pkg_pretend now behaves correctly with resumes (ticket:604).
+ * bug fixes: pkg_pretend now behaves correctly with resumes (ticket:604).
+ Better support for Portage config files (ticket:597). Package dep spec
+ parsing no longer has trailing hyphen issues (ticket:590).
* New Selection + Filter + Generator interface using Environment, replacing
the old PackageDatabase Query (ticket:559).
* importare can now change file ownership to root (ticket:599).
+0.26.2:
+
+ * Bug fixes: importare now really adds packages to world by default, as
+ promised in 0.26.0_pre3. pkg_pretend is now properly fatal (ticket:579).
+ There are no longer bogus 'use flags defined recursively' messages
+ (ticket:568). Symlink rewriting now works when builddir contains symlinks
+ (ticket:571). The dreaded Ruby bindings segfaults are fixed (ticket:558).
+
+ * The Ruby bindings have been extended somewhat.
+
0.26.1:
* Bug fix: if we install a directory using rename(), call utime() on all
file children.
diff --git a/configure.ac b/configure.ac
index 2f89a1b..ca48ba5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ AC_INIT([paludis/paludis.hh])
AC_CONFIG_AUX_DIR(config)
VERSION_MAJOR=0
-VERSION_MINOR=27
+VERSION_MINOR=29
VERSION_MICRO=0
VERSION_SUFFIX=
VERSION_FULL="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_MICRO$VERSION_SUFFIX"
@@ -269,7 +269,7 @@ int main(int, char **)
],
[AC_MSG_RESULT([std::tr1::unordered_map])],
[AC_MSG_RESULT([no])
- AC_MSG_ERROR([Your compiler doesn't support tr1])])
+ AC_MSG_ERROR([Your compiler doesn't support tr1 unordered containers])])
dnl }}}
dnl {{{ tr1 shared pointers
@@ -284,7 +284,7 @@ int main(int, char **)
],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
- AC_MSG_ERROR([Your compiler doesn't support tr1])])
+ AC_MSG_ERROR([Your compiler doesn't support tr1 shared pointers])])
dnl }}}
dnl {{{ tr1 type traits
@@ -299,7 +299,7 @@ int main(int, char **)
],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
- AC_MSG_ERROR([Your compiler doesn't support tr1])])
+ AC_MSG_ERROR([Your compiler doesn't support tr1 type traits])])
dnl }}}
dnl {{{ tr1 binders
@@ -326,7 +326,7 @@ int main(int, char **)
],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
- AC_MSG_ERROR([Your compiler doesn't support tr1])])
+ AC_MSG_ERROR([Your compiler doesn't support tr1 functional])])
dnl }}}
need_xml_check=
@@ -1060,11 +1060,11 @@ AC_ARG_WITH([repositories],
all All available repositories
default Equivalent to e,fake,virtuals
- cran The Comprehensive R Archive Network (experimental)
+ cran The Comprehensive R Archive Network (unusable)
e Ebuild, Ebin, Exheres, VDB etc
fake A fake repository for test cases and adjutrix
- gems Ruby gems (experimental)
- unavailable Unavailable (experimental)
+ gems Ruby gems (unusable)
+ unavailable Unavailable
unpackaged Unpackaged (for importare)
virtuals Old style Gentoo virtuals],
[repositories="`echo $with_repositories | tr ',' ' '`"],
@@ -1078,6 +1078,19 @@ BUILD_REPOSITORIES="$repositories"
AC_SUBST([ALL_REPOSITORIES])
AC_SUBST([BUILD_REPOSITORIES])
+for r in e fake ; do
+ if ! echo $repositories | tr ' ' '\n' | grep "^$r\$" >/dev/null ; then
+ AC_MSG_ERROR([Building without $r repository is unsupported])
+ fi
+done
+
+enable_virtuals_repository=
+if echo $repositories | tr ' ' '\n' | grep '^virtuals$' >/dev/null ; then
+ AC_DEFINE_UNQUOTED([ENABLE_VIRTUALS_REPOSITORY], [1], [Enable virtuals repository])
+ enable_virtuals_repository=yes
+fi
+AM_CONDITIONAL([ENABLE_VIRTUALS_REPOSITORY], test "x$enable_virtuals_repository" = "xyes")
+
if echo $repositories | tr ' ' '\n' | grep '^gems$' >/dev/null ; then
need_syck_check=yes
need_gem_check=yes
@@ -1097,7 +1110,7 @@ AC_ARG_WITH([environments],
adapted An environment adapter, for contrarius etc
no_config Configurationless environment, for adjutrix etc
paludis Standard Paludis environments
- portage Portage configuration (experimental)
+ portage Portage configuration (dodgy)
test For test cases],
[environments="`echo $with_environments | tr ',' ' '`"],
[environments="$DEFAULT_ENVIRONMENTS"])
@@ -1147,7 +1160,7 @@ AC_ARG_WITH([clients],
accerso A fetch / mirror client
adjutrix A tool for tree querying
contrarius The cross toolchain creator
- gtkpaludis GUI client (experimental)
+ gtkpaludis GUI client (unusable)
importare On-the-fly unpackaged installer
inquisitio A search client
instruo A metadata generation client
diff --git a/doc/api/cplusplus/examples/example_dep_spec.cc b/doc/api/cplusplus/examples/example_dep_spec.cc
index b0adb8d..1819b7e 100644
--- a/doc/api/cplusplus/examples/example_dep_spec.cc
+++ b/doc/api/cplusplus/examples/example_dep_spec.cc
@@ -103,8 +103,11 @@ int main(int argc, char * argv[])
if (spec.slot_requirement_ptr())
cout << " " << left << setw(24) << "Slot:" << " " << *spec.slot_requirement_ptr() << endl;
- if (spec.repository_ptr())
- cout << " " << left << setw(24) << "Repository:" << " " << *spec.repository_ptr() << endl;
+ if (spec.in_repository_ptr())
+ cout << " " << left << setw(24) << "In repository:" << " " << *spec.in_repository_ptr() << endl;
+
+ if (spec.from_repository_ptr())
+ cout << " " << left << setw(24) << "From repository:" << " " << *spec.from_repository_ptr() << endl;
if (spec.additional_requirements_ptr() && ! spec.additional_requirements_ptr()->empty())
{
diff --git a/doc/configuration/hooks.html.part b/doc/configuration/hooks.html.part
index 23c3467..4a669de 100644
--- a/doc/configuration/hooks.html.part
+++ b/doc/configuration/hooks.html.part
@@ -345,7 +345,7 @@ rather than hard dependency (the named hooks not existing is not an error).
For example:</p>
<pre>
-#!/bin/bash
+#!/usr/bin/env bash
hook_run_install_all_post()
{
diff --git a/doc/configuration/specs.html.part b/doc/configuration/specs.html.part
index bad1adc..fa87c63 100644
--- a/doc/configuration/specs.html.part
+++ b/doc/configuration/specs.html.part
@@ -25,7 +25,11 @@ the following order:</p>
<ul>
<li><code>:slot</code>: Match only in that slot.</li>
- <li><code>::repository</code>: Match only in the named repository.</li>
+ <li><code>::fromrepository-&gt;inrepository</code>: Match only from (originally, so <code>::foo-&gt;</code> will
+ match things that were installed from the <code>foo</code> repository) and in (now, so <code>::-&gt;installed</code>
+ matches things that are now in the <code>installed</code> repository). At most one of the two names can be
+ blank.</li>
+ <li><code>::repository</code>: like <code>::-&gt;repository</code>.</li>
<li><code>[use]</code> and <code>[-use]</code>: Match only if the named USE flag is enabled / disabled for this
package. May be specified multiple times with different USE flag names.</li>
<li><code>[=1.23]</code>: Match a particular version. Any operator described below
diff --git a/doc/htmltidy.bash b/doc/htmltidy.bash
index fc8c493..9d9d4e1 100755
--- a/doc/htmltidy.bash
+++ b/doc/htmltidy.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if [[ "${1/.html}" == "${1}" ]] ; then
echo "Not .html, no checking performed"
diff --git a/hooks/demos/elog.bash.in b/hooks/demos/elog.bash.in
index 3e23071..ab8f117 100644
--- a/hooks/demos/elog.bash.in
+++ b/hooks/demos/elog.bash.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
# This hook makes Paludis store messages generated by an ebuild in a file.
diff --git a/hooks/demos/new_packages.bash.in b/hooks/demos/new_packages.bash.in
index 9783e7a..45d64f9 100644
--- a/hooks/demos/new_packages.bash.in
+++ b/hooks/demos/new_packages.bash.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
# This hook makes Paludis display a summary of new packages available after
diff --git a/hooks/demos/pretend_resume.hook.in b/hooks/demos/pretend_resume.hook.in
index b966469..5016959 100755
--- a/hooks/demos/pretend_resume.hook.in
+++ b/hooks/demos/pretend_resume.hook.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
# This hook makes Paludis display the resume command at the end of the
diff --git a/hooks/demos/report.bash.in b/hooks/demos/report.bash.in
index 674317c..23a6398 100755
--- a/hooks/demos/report.bash.in
+++ b/hooks/demos/report.bash.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
# This hook makes Paludis display a report about vulnerable, masked and unused
diff --git a/hooks/eselect_env_update.bash b/hooks/eselect_env_update.bash
index ef55f10..3371e44 100755
--- a/hooks/eselect_env_update.bash
+++ b/hooks/eselect_env_update.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/hooks/eselect_env_update_TEST b/hooks/eselect_env_update_TEST
index 3c1de0c..f28516b 100755
--- a/hooks/eselect_env_update_TEST
+++ b/hooks/eselect_env_update_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/hooks/eselect_env_update_TEST_cleanup.sh b/hooks/eselect_env_update_TEST_cleanup.sh
index 7b558f8..fd022e9 100755
--- a/hooks/eselect_env_update_TEST_cleanup.sh
+++ b/hooks/eselect_env_update_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d eselect_env_update_TEST_dir ] ; then
diff --git a/hooks/eselect_env_update_TEST_setup.sh b/hooks/eselect_env_update_TEST_setup.sh
index b47f142..fa2b710 100755
--- a/hooks/eselect_env_update_TEST_setup.sh
+++ b/hooks/eselect_env_update_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir -p eselect_env_update_TEST_dir || exit 1
diff --git a/hooks/find_config_updates.hook b/hooks/find_config_updates.hook
index 8122a0f..7a1c011 100755
--- a/hooks/find_config_updates.hook
+++ b/hooks/find_config_updates.hook
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/hooks/gnu_info_index.bash b/hooks/gnu_info_index.bash
index f0b132a..eb3dffd 100755
--- a/hooks/gnu_info_index.bash
+++ b/hooks/gnu_info_index.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/hooks/installable_cache_regen.bash b/hooks/installable_cache_regen.bash
index 83df6a7..bf5fefc 100755
--- a/hooks/installable_cache_regen.bash
+++ b/hooks/installable_cache_regen.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
# Copyright (c) 2006, 2008 Ciaran McCreesh
diff --git a/hooks/installed_cache_regen.bash b/hooks/installed_cache_regen.bash
index dc8f03a..1bdb57e 100755
--- a/hooks/installed_cache_regen.bash
+++ b/hooks/installed_cache_regen.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
# Copyright (c) 2006, 2008 Ciaran McCreesh
diff --git a/hooks/log.bash b/hooks/log.bash
index e1761be..a245b7a 100755
--- a/hooks/log.bash
+++ b/hooks/log.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
# Copyright (c) 2006 Ciaran McCreesh
diff --git a/hooks/news.hook b/hooks/news.hook
index db4975e..0f7039f 100755
--- a/hooks/news.hook
+++ b/hooks/news.hook
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/hooks/news_TEST b/hooks/news_TEST
index c9a8586..9abaf6e 100755
--- a/hooks/news_TEST
+++ b/hooks/news_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/hooks/news_TEST_cleanup.sh b/hooks/news_TEST_cleanup.sh
index 78aa2cc..49c003a 100755
--- a/hooks/news_TEST_cleanup.sh
+++ b/hooks/news_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d news_TEST_dir ] ; then
diff --git a/hooks/news_TEST_setup.sh b/hooks/news_TEST_setup.sh
index c895b1c..48f06bc 100755
--- a/hooks/news_TEST_setup.sh
+++ b/hooks/news_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir -p news_TEST_dir || exit 1
diff --git a/hooks/run_test.bash b/hooks/run_test.bash
index 9a0d453..b890fbd 100755
--- a/hooks/run_test.bash
+++ b/hooks/run_test.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
shopt -s expand_aliases
diff --git a/hooks/update_config_protect_list.bash b/hooks/update_config_protect_list.bash
index 77f1630..2c7474d 100755
--- a/hooks/update_config_protect_list.bash
+++ b/hooks/update_config_protect_list.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
# Copyright (c) 2006 Mike Kelly
diff --git a/hooks/write_cache_clean.bash b/hooks/write_cache_clean.bash
index 85f83b4..ab02e86 100755
--- a/hooks/write_cache_clean.bash
+++ b/hooks/write_cache_clean.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set et sw=4 sts=4 :
# Copyright (c) 2007, 2008 Ciaran McCreesh
diff --git a/paludis/Makefile.am.m4 b/paludis/Makefile.am.m4
index 4dff060..2c0168b 100644
--- a/paludis/Makefile.am.m4
+++ b/paludis/Makefile.am.m4
@@ -22,7 +22,6 @@ $1_TEST_LDADD = \
$(top_builddir)/paludis/environments/test/libpaludistestenvironment.la \
$(top_builddir)/paludis/repositories/e/libpaludiserepository.la \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
- $(top_builddir)/paludis/repositories/virtuals/libpaludisvirtualsrepository.la \
libpaludis.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
$(DYNAMIC_LD_LIBS)
@@ -125,7 +124,6 @@ dep_list_TEST_blockers_LDADD = \
$(top_builddir)/test/libtest.a \
$(top_builddir)/paludis/environments/test/libpaludistestenvironment.la \
$(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
- $(top_builddir)/paludis/repositories/virtuals/libpaludisvirtualsrepository.la \
libpaludis.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
$(DYNAMIC_LD_LIBS)
diff --git a/paludis/action-fwd.hh b/paludis/action-fwd.hh
index b036427..ef58a1c 100644
--- a/paludis/action-fwd.hh
+++ b/paludis/action-fwd.hh
@@ -81,24 +81,12 @@ namespace paludis
* \since 0.26
*/
typedef kc::KeyedClass<
- kc::Field<k::no_config_protect, bool>,
kc::Field<k::debug_build, InstallActionDebugOption>,
kc::Field<k::checks, InstallActionChecksOption>,
kc::Field<k::destination, std::tr1::shared_ptr<Repository> >
> InstallActionOptions;
/**
- * Options for an UninstallAction.
- *
- * \see UninstallAction
- * \ingroup g_actions
- * \since 0.26
- */
- typedef kc::KeyedClass<
- kc::Field<k::no_config_protect, bool>
- > UninstallActionOptions;
-
- /**
* A failed fetch action part.
*
* \see FetchActionError
diff --git a/paludis/action.cc b/paludis/action.cc
index 031aecc..df63616 100644
--- a/paludis/action.cc
+++ b/paludis/action.cc
@@ -81,23 +81,7 @@ FetchAction::~FetchAction()
{
}
-namespace paludis
-{
- template <>
- struct Implementation<UninstallAction>
- {
- const UninstallActionOptions options;
-
- Implementation(const UninstallActionOptions & o) :
- options(o)
- {
- }
- };
-}
-
-UninstallAction::UninstallAction(const UninstallActionOptions & o) :
- PrivateImplementationPattern<UninstallAction>(new Implementation<UninstallAction>(o)),
- options(_imp->options)
+UninstallAction::UninstallAction()
{
}
@@ -329,7 +313,6 @@ template class PrivateImplementationPattern<FetchAction>;
template class PrivateImplementationPattern<InstallAction>;
template class PrivateImplementationPattern<PretendAction>;
template class PrivateImplementationPattern<PretendFetchAction>;
-template class PrivateImplementationPattern<UninstallAction>;
template class Sequence<FetchActionFailure>;
diff --git a/paludis/action.hh b/paludis/action.hh
index 5cb506f..3aa4c91 100644
--- a/paludis/action.hh
+++ b/paludis/action.hh
@@ -168,20 +168,16 @@ namespace paludis
*/
class PALUDIS_VISIBLE UninstallAction :
public Action,
- private PrivateImplementationPattern<UninstallAction>,
public AcceptInterfaceVisitsThis<ActionVisitorTypes, UninstallAction>
{
public:
///\name Basic operations
///\{
- UninstallAction(const UninstallActionOptions &);
+ UninstallAction();
~UninstallAction();
///\}
-
- /// Options for the action.
- const UninstallActionOptions & options;
};
/**
diff --git a/paludis/action.se b/paludis/action.se
index 35be7b1..d549eb4 100644
--- a/paludis/action.se
+++ b/paludis/action.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_InstallActionDebugOption()
diff --git a/paludis/args/install_args_group.cc b/paludis/args/install_args_group.cc
index 05b88f8..7730747 100644
--- a/paludis/args/install_args_group.cc
+++ b/paludis/args/install_args_group.cc
@@ -36,7 +36,6 @@ InstallArgsGroup::InstallArgsGroup(ArgsHandler * h, const std::string & our_name
a_preserve_world(this, "preserve-world", '1', "Don't modify the world file", true),
a_add_to_world_spec(this, "add-to-world-spec", '\0',
"Use this spec, rather than all targets, for updating world (for resume commands)"),
- a_no_config_protection(this, "no-config-protection", '\0', "Disable config file protection (dangerous)", false),
a_debug_build(this, "debug-build", '\0'),
a_checks(this, "checks", '\0'),
a_fetch(this, "fetch", 'f', "Only fetch sources; don't install anything", false),
@@ -111,7 +110,6 @@ InstallArgsGroup::destinations(Environment * env) const
void
InstallArgsGroup::populate_install_task(const Environment *, InstallTask & task) const
{
- task.set_no_config_protect(a_no_config_protection.specified());
task.set_fetch_only(a_fetch.specified());
task.set_pretend(a_pretend.specified());
task.set_preserve_world(a_preserve_world.specified());
@@ -201,9 +199,6 @@ InstallArgsGroup::paludis_command_fragment() const
{
std::string paludis_command;
- if (a_no_config_protection.specified())
- paludis_command.append(" --" + a_no_config_protection.long_name());
-
if (a_preserve_world.specified())
paludis_command.append(" --" + a_preserve_world.long_name());
diff --git a/paludis/args/install_args_group.hh b/paludis/args/install_args_group.hh
index 4689735..e16acee 100644
--- a/paludis/args/install_args_group.hh
+++ b/paludis/args/install_args_group.hh
@@ -74,9 +74,6 @@ namespace paludis
/// --add-to-world-spec
paludis::args::StringArg a_add_to_world_spec;
- /// --no-config-protection
- paludis::args::SwitchArg a_no_config_protection;
-
/// --debug-build
paludis::args::DebugBuildArg a_debug_build;
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index 7e78be2..a9a8b42 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -888,7 +888,8 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
/* ignore if it's a virtual/blah (not <virtual/blah-1) block and it's blocking
* ourself */
if (! (a.blocked_spec()->version_requirements_ptr() || a.blocked_spec()->slot_requirement_ptr()
- || a.blocked_spec()->additional_requirements_ptr() || a.blocked_spec()->repository_ptr())
+ || a.blocked_spec()->additional_requirements_ptr() || a.blocked_spec()->in_repository_ptr()
+ || a.blocked_spec()->from_repository_ptr())
&& d->_imp->current_package_id())
{
if ((*aa)->name() == d->_imp->current_package_id()->name())
@@ -929,7 +930,8 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
/* ignore if it's a virtual/blah (not <virtual/blah-1) block and it's blocking
* ourself */
if (! (a.blocked_spec()->version_requirements_ptr() || a.blocked_spec()->slot_requirement_ptr()
- || a.blocked_spec()->additional_requirements_ptr() || a.blocked_spec()->repository_ptr())
+ || a.blocked_spec()->additional_requirements_ptr() || a.blocked_spec()->in_repository_ptr()
+ || a.blocked_spec()->from_repository_ptr())
&& d->_imp->current_package_id())
{
if ((*r)->package_id->name() == d->_imp->current_package_id()->name())
@@ -954,7 +956,8 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
/* ignore if it's a virtual/blah (not <virtual/blah-1) block and it's blocking
* ourself */
if (! (a.blocked_spec()->version_requirements_ptr() || a.blocked_spec()->slot_requirement_ptr()
- || a.blocked_spec()->additional_requirements_ptr() || a.blocked_spec()->repository_ptr())
+ || a.blocked_spec()->additional_requirements_ptr() || a.blocked_spec()->in_repository_ptr()
+ || a.blocked_spec()->from_repository_ptr())
&& d->_imp->current_package_id())
{
if (r->package_id->name() == d->_imp->current_package_id()->name())
diff --git a/paludis/dep_list.sr b/paludis/dep_list.sr
index f30d3e9..814e6b4 100644
--- a/paludis/dep_list.sr
+++ b/paludis/dep_list.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_DepListOptions()
diff --git a/paludis/dep_list_TEST.cc b/paludis/dep_list_TEST.cc
index fb92e6c..5e6057f 100644
--- a/paludis/dep_list_TEST.cc
+++ b/paludis/dep_list_TEST.cc
@@ -1167,6 +1167,7 @@ namespace test_cases
}
} test_dep_list_55;
+#ifdef ENABLE_VIRTUALS_REPOSITORY
/**
* \test Test DepList resolution behaviour.
*
@@ -1188,6 +1189,7 @@ namespace test_cases
expected.push_back("cat/one-1:0::repo");
}
} test_dep_list_56;
+#endif
/**
* \test Test DepList resolution behaviour.
@@ -1211,6 +1213,7 @@ namespace test_cases
}
} test_dep_list_57;
+#ifdef ENABLE_VIRTUALS_REPOSITORY
/**
* \test Test DepList resolution behaviour.
*
@@ -1229,6 +1232,7 @@ namespace test_cases
expected.push_back("virtual/two-1::virtuals (virtual for cat/one-1:0::repo)");
}
} test_dep_list_58;
+#endif
/**
* \test Test DepList resolution behaviour.
@@ -1274,6 +1278,7 @@ namespace test_cases
}
} test_dep_list_60;
+#ifdef ENABLE_VIRTUALS_REPOSITORY
struct DepListTestCase61 : DepListTestCase<61>
{
void populate_repo()
@@ -1293,6 +1298,7 @@ namespace test_cases
expected.push_back("virtual/foo-2::virtuals (virtual for cat/two-2:0::repo)");
}
} test_dep_list_61;
+#endif
/**
* \test Test DepList resolution behaviour.
diff --git a/paludis/dep_list_TEST.hh b/paludis/dep_list_TEST.hh
index a8a04a2..e27a236 100644
--- a/paludis/dep_list_TEST.hh
+++ b/paludis/dep_list_TEST.hh
@@ -24,18 +24,19 @@
#include <paludis/dep_list_exceptions.hh>
#include <paludis/repositories/fake/fake_repository.hh>
#include <paludis/repositories/fake/fake_installed_repository.hh>
-#include <paludis/repositories/virtuals/virtuals_repository.hh>
-#include <paludis/repositories/virtuals/installed_virtuals_repository.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/environments/test/test_environment.hh>
+#include <paludis/repository_maker.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
#include <string>
#include <list>
#include <ostream>
+#include "config.h"
+
using namespace paludis;
using namespace test;
@@ -73,6 +74,15 @@ namespace paludis
return s;
}
+
+#ifdef ENABLE_VIRTUALS_REPOSITORY
+ std::string virtuals_repo_keys(const std::string & k)
+ {
+ if (k == "root")
+ return "/";
+ return "";
+ }
+#endif
}
namespace test_cases
@@ -88,8 +98,10 @@ namespace test_cases
TestEnvironment env;
std::tr1::shared_ptr<FakeRepository> repo;
std::tr1::shared_ptr<FakeInstalledRepository> installed_repo;
- std::tr1::shared_ptr<VirtualsRepository> virtuals_repo;
- std::tr1::shared_ptr<InstalledVirtualsRepository> installed_virtuals_repo;
+#ifdef ENABLE_VIRTUALS_REPOSITORY
+ std::tr1::shared_ptr<Repository> virtuals_repo;
+ std::tr1::shared_ptr<Repository> installed_virtuals_repo;
+#endif
std::list<std::string> expected;
std::string merge_target;
bool done_populate;
@@ -102,14 +114,18 @@ namespace test_cases
env(),
repo(new FakeRepository(&env, RepositoryName("repo"))),
installed_repo(new FakeInstalledRepository(&env, RepositoryName("installed"))),
- virtuals_repo(new VirtualsRepository(&env)),
- installed_virtuals_repo(new InstalledVirtualsRepository(&env, FSEntry("/"))),
+#ifdef ENABLE_VIRTUALS_REPOSITORY
+ virtuals_repo((*(*RepositoryMaker::get_instance())["virtuals"])(&env, virtuals_repo_keys)),
+ installed_virtuals_repo((*(*RepositoryMaker::get_instance())["installed_virtuals"])(&env, virtuals_repo_keys)),
+#endif
done_populate(false)
{
env.package_database()->add_repository(4, repo);
env.package_database()->add_repository(3, installed_repo);
+#ifdef ENABLE_VIRTUALS_REPOSITORY
env.package_database()->add_repository(2, virtuals_repo);
env.package_database()->add_repository(1, installed_virtuals_repo);
+#endif
}
/**
diff --git a/paludis/dep_list_TEST_blockers.cc b/paludis/dep_list_TEST_blockers.cc
index 68b6fb0..ae94f88 100644
--- a/paludis/dep_list_TEST_blockers.cc
+++ b/paludis/dep_list_TEST_blockers.cc
@@ -79,6 +79,7 @@ namespace test_cases
}
} test_dep_list_list_block;
+#ifdef ENABLE_VIRTUALS_REPOSITORY
struct DepListTestCaseSelfBlock : DepListTestCaseBase
{
DepListTestCaseSelfBlock() : DepListTestCaseBase("self block via provide on list") { }
@@ -140,6 +141,7 @@ namespace test_cases
TEST_CHECK_STRINGIFY_EQUAL(*next(next(next(d.begin())))->package_id, "cat/one-1:0::repo");
}
} test_dep_list_provided_block;
+#endif
struct DepListTestCaseBlockOnList : DepListTestCaseBase
{
@@ -208,6 +210,7 @@ namespace test_cases
}
} test_dep_list_no_block_on_no_upgrade;
+#ifdef ENABLE_VIRTUALS_REPOSITORY
struct DepListTestCaseNoBlockOnNoUpgradeViaProvided : DepListTestCaseBase
{
DepListTestCaseNoBlockOnNoUpgradeViaProvided() : DepListTestCaseBase("no block on no upgrade via provided") { }
@@ -280,6 +283,7 @@ namespace test_cases
expected.push_back("cat/one-1:0::repo");
}
} test_dep_list_no_block_on_replaced_provide;
+#endif
struct DepListTestCaseRestrictedOlderSelf : DepListTestCaseBase
{
@@ -308,6 +312,7 @@ namespace test_cases
}
} test_dep_list_restricted_older_self;
+#ifdef ENABLE_VIRTUALS_REPOSITORY
struct DepListTestCaseRestrictedOlderSelfProvide : DepListTestCaseBase
{
DepListTestCaseRestrictedOlderSelfProvide() : DepListTestCaseBase("restricted older self provide") { }
@@ -365,6 +370,7 @@ namespace test_cases
TEST_CHECK(d.begin() == d.end());
}
} test_dep_list_restricted_older_other_provide;
+#endif
}
diff --git a/paludis/dep_list_options.se b/paludis/dep_list_options.se
index c26d60e..be54857 100644
--- a/paludis/dep_list_options.se
+++ b/paludis/dep_list_options.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_DepListTargetType()
diff --git a/paludis/dep_spec.cc b/paludis/dep_spec.cc
index 93a5a69..8b074a5 100644
--- a/paludis/dep_spec.cc
+++ b/paludis/dep_spec.cc
@@ -531,9 +531,15 @@ PackageDepSpec::slot_requirement_ptr() const
}
std::tr1::shared_ptr<const RepositoryName>
-PackageDepSpec::repository_ptr() const
+PackageDepSpec::from_repository_ptr() const
{
- return _imp->data->repository_ptr();
+ return _imp->data->from_repository_ptr();
+}
+
+std::tr1::shared_ptr<const RepositoryName>
+PackageDepSpec::in_repository_ptr() const
+{
+ return _imp->data->in_repository_ptr();
}
std::tr1::shared_ptr<const AdditionalPackageDepSpecRequirements>
@@ -567,8 +573,11 @@ PackageDepSpec::without_additional_requirements() const
if (slot_requirement_ptr())
result.slot_requirement(slot_requirement_ptr());
- if (repository_ptr())
- result.repository(*repository_ptr());
+ if (from_repository_ptr())
+ result.from_repository(*from_repository_ptr());
+
+ if (in_repository_ptr())
+ result.in_repository(*in_repository_ptr());
return make_shared_ptr(new PackageDepSpec(result));
}
@@ -591,6 +600,12 @@ PackageDepSpec::_as_string() const
return _imp->data->as_string();
}
+std::tr1::shared_ptr<const PackageDepSpecData>
+PackageDepSpec::data() const
+{
+ return _imp->data;
+}
+
AdditionalPackageDepSpecRequirement::~AdditionalPackageDepSpecRequirement()
{
}
@@ -606,13 +621,14 @@ namespace
struct PartiallyMadePackageDepSpecData :
PackageDepSpecData
{
- std::tr1::shared_ptr<QualifiedPackageName> package;
- std::tr1::shared_ptr<PackageNamePart> package_name_part;
- std::tr1::shared_ptr<CategoryNamePart> category_name_part;
+ std::tr1::shared_ptr<const QualifiedPackageName> package;
+ std::tr1::shared_ptr<const PackageNamePart> package_name_part;
+ std::tr1::shared_ptr<const CategoryNamePart> category_name_part;
std::tr1::shared_ptr<VersionRequirements> version_requirements;
VersionRequirementsMode version_requirements_mode_v;
std::tr1::shared_ptr<const SlotRequirement> slot;
- std::tr1::shared_ptr<RepositoryName> repository;
+ std::tr1::shared_ptr<const RepositoryName> from_repository;
+ std::tr1::shared_ptr<const RepositoryName> in_repository;
std::tr1::shared_ptr<AdditionalPackageDepSpecRequirements> additional_requirements;
PartiallyMadePackageDepSpecData() :
@@ -621,6 +637,27 @@ namespace
{
}
+ PartiallyMadePackageDepSpecData(const PackageDepSpecData & other) :
+ PackageDepSpecData(other),
+ package(other.package_ptr()),
+ package_name_part(other.package_name_part_ptr()),
+ category_name_part(other.category_name_part_ptr()),
+ version_requirements(other.version_requirements_ptr() ? new VersionRequirements : 0),
+ version_requirements_mode_v(other.version_requirements_mode()),
+ slot(other.slot_requirement_ptr()),
+ from_repository(other.from_repository_ptr()),
+ in_repository(other.in_repository_ptr()),
+ additional_requirements(other.additional_requirements_ptr() ? new AdditionalPackageDepSpecRequirements : 0)
+ {
+ if (version_requirements)
+ std::copy(other.version_requirements_ptr()->begin(), other.version_requirements_ptr()->end(),
+ version_requirements->back_inserter());
+
+ if (additional_requirements)
+ std::copy(other.additional_requirements_ptr()->begin(), other.additional_requirements_ptr()->end(),
+ additional_requirements->back_inserter());
+ }
+
PartiallyMadePackageDepSpecData(const PartiallyMadePackageDepSpecData & other) :
PackageDepSpecData(other),
package(other.package),
@@ -629,7 +666,8 @@ namespace
version_requirements(other.version_requirements),
version_requirements_mode_v(other.version_requirements_mode_v),
slot(other.slot),
- repository(other.repository),
+ from_repository(other.from_repository),
+ in_repository(other.in_repository),
additional_requirements(other.additional_requirements)
{
}
@@ -684,8 +722,13 @@ namespace
if (slot_requirement_ptr())
s << stringify(*slot_requirement_ptr());
- if (repository_ptr())
- s << "::" << *repository_ptr();
+
+ if (in_repository_ptr() && from_repository_ptr())
+ s << "::" << *from_repository_ptr() << "->" << *in_repository_ptr();
+ else if (in_repository_ptr())
+ s << "::" << *in_repository_ptr();
+ else if (from_repository_ptr())
+ s << "::" << *from_repository_ptr() << "->";
if (version_requirements_ptr())
{
@@ -777,9 +820,14 @@ namespace
return slot;
}
- virtual std::tr1::shared_ptr<const RepositoryName> repository_ptr() const
+ virtual std::tr1::shared_ptr<const RepositoryName> from_repository_ptr() const
{
- return repository;
+ return from_repository;
+ }
+
+ virtual std::tr1::shared_ptr<const RepositoryName> in_repository_ptr() const
+ {
+ return in_repository;
}
virtual std::tr1::shared_ptr<const AdditionalPackageDepSpecRequirements> additional_requirements_ptr() const
@@ -805,6 +853,11 @@ namespace paludis
data(new PartiallyMadePackageDepSpecData(*other.data))
{
}
+
+ Implementation(const PackageDepSpec & other) :
+ data(new PartiallyMadePackageDepSpecData(*other.data()))
+ {
+ }
};
}
@@ -818,6 +871,11 @@ PartiallyMadePackageDepSpec::PartiallyMadePackageDepSpec(const PartiallyMadePack
{
}
+PartiallyMadePackageDepSpec::PartiallyMadePackageDepSpec(const PackageDepSpec & other) :
+ PrivateImplementationPattern<PartiallyMadePackageDepSpec>(new Implementation<PartiallyMadePackageDepSpec>(other))
+{
+}
+
PartiallyMadePackageDepSpec::~PartiallyMadePackageDepSpec()
{
}
@@ -837,9 +895,16 @@ PartiallyMadePackageDepSpec::slot_requirement(const std::tr1::shared_ptr<const S
}
PartiallyMadePackageDepSpec &
-PartiallyMadePackageDepSpec::repository(const RepositoryName & repo)
+PartiallyMadePackageDepSpec::from_repository(const RepositoryName & repo)
+{
+ _imp->data->from_repository.reset(new RepositoryName(repo));
+ return *this;
+}
+
+PartiallyMadePackageDepSpec &
+PartiallyMadePackageDepSpec::in_repository(const RepositoryName & repo)
{
- _imp->data->repository.reset(new RepositoryName(repo));
+ _imp->data->in_repository.reset(new RepositoryName(repo));
return *this;
}
diff --git a/paludis/dep_spec.hh b/paludis/dep_spec.hh
index 529d099..60d43a2 100644
--- a/paludis/dep_spec.hh
+++ b/paludis/dep_spec.hh
@@ -309,6 +309,7 @@ namespace paludis
PartiallyMadePackageDepSpec();
~PartiallyMadePackageDepSpec();
+ PartiallyMadePackageDepSpec(const PackageDepSpec &);
PartiallyMadePackageDepSpec(const PartiallyMadePackageDepSpec &);
///\}
@@ -324,9 +325,14 @@ namespace paludis
PartiallyMadePackageDepSpec & slot_requirement(const std::tr1::shared_ptr<const SlotRequirement> &);
/**
- * Set our repository requirements, return ourself.
+ * Set our in-repository requirements, return ourself.
*/
- PartiallyMadePackageDepSpec & repository(const RepositoryName &);
+ PartiallyMadePackageDepSpec & in_repository(const RepositoryName &);
+
+ /**
+ * Set our from-repository requirements, return ourself.
+ */
+ PartiallyMadePackageDepSpec & from_repository(const RepositoryName &);
/**
* Set our package name part requirements, return ourself.
@@ -446,9 +452,14 @@ namespace paludis
std::tr1::shared_ptr<const SlotRequirement> slot_requirement_ptr() const;
/**
- * Fetch the repo name (may be a zero pointer).
+ * Fetch the in-repo name (may be a zero pointer).
+ */
+ std::tr1::shared_ptr<const RepositoryName> in_repository_ptr() const;
+
+ /**
+ * Fetch the from-repo name (may be a zero pointer).
*/
- std::tr1::shared_ptr<const RepositoryName> repository_ptr() const;
+ std::tr1::shared_ptr<const RepositoryName> from_repository_ptr() const;
/**
* Fetch any additional requirements (may be a zero pointer).
@@ -470,6 +481,11 @@ namespace paludis
*/
std::tr1::shared_ptr<PackageDepSpec> without_additional_requirements() const;
+ /**
+ * Access to our data.
+ */
+ std::tr1::shared_ptr<const PackageDepSpecData> data() const;
+
virtual const PackageDepSpec * as_package_dep_spec() const;
};
@@ -525,9 +541,14 @@ namespace paludis
virtual std::tr1::shared_ptr<const SlotRequirement> slot_requirement_ptr() const = 0;
/**
- * Fetch the repo name (may be a zero pointer).
+ * Fetch the in-repo name (may be a zero pointer).
+ */
+ virtual std::tr1::shared_ptr<const RepositoryName> in_repository_ptr() const = 0;
+
+ /**
+ * Fetch the from-repo name (may be a zero pointer).
*/
- virtual std::tr1::shared_ptr<const RepositoryName> repository_ptr() const = 0;
+ virtual std::tr1::shared_ptr<const RepositoryName> from_repository_ptr() const = 0;
/**
* Fetch the additional requirements (may be a zero pointer).
diff --git a/paludis/dep_spec_flattener.cc b/paludis/dep_spec_flattener.cc
index cea26c2..f40460c 100644
--- a/paludis/dep_spec_flattener.cc
+++ b/paludis/dep_spec_flattener.cc
@@ -21,6 +21,7 @@
#include <paludis/dep_spec.hh>
#include <paludis/dep_tree.hh>
#include <paludis/environment.hh>
+#include <paludis/repository.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/log.hh>
@@ -125,16 +126,10 @@ dep_spec_flattener_internals::VisitNamedSetDepSpec<Heirarchy_, Item_, true>::vis
std::tr1::shared_ptr<const SetSpecTree::ConstItem> set(f->_imp->env->set(s.name()));
if (! set)
- {
- Log::get_instance()->message("flattener.unknown_set", ll_warning, lc_context) << "Unknown set '" << s.name() << "'";
- return;
- }
+ throw NoSuchSetError(stringify(s.name()));
if (! this->_imp->recursing_sets.insert(s.name()).second)
- {
- Log::get_instance()->message("flattener.recursive_set", ll_warning, lc_context) << "Recursively defined set '" << s.name() << "'";
- return;
- }
+ throw RecursivelyDefinedSetError(stringify(s.name()));
set->accept(*f);
diff --git a/paludis/elike_package_dep_spec-fwd.hh b/paludis/elike_package_dep_spec-fwd.hh
index 2c05fbe..8bdb614 100644
--- a/paludis/elike_package_dep_spec-fwd.hh
+++ b/paludis/elike_package_dep_spec-fwd.hh
@@ -22,8 +22,12 @@
#include <paludis/util/attributes.hh>
#include <paludis/util/options-fwd.hh>
+#include <paludis/util/keys.hh>
+#include <paludis/util/kc-fwd.hh>
#include <paludis/dep_spec-fwd.hh>
#include <paludis/package_id-fwd.hh>
+#include <paludis/version_operator-fwd.hh>
+#include <paludis/version_spec-fwd.hh>
#include <tr1/functional>
#include <iosfwd>
@@ -34,11 +38,55 @@ namespace paludis
typedef Options<ELikePackageDepSpecOption> ELikePackageDepSpecOptions;
- PackageDepSpec parse_elike_package_dep_spec(const std::string &, const ELikePackageDepSpecOptions &,
- const std::tr1::shared_ptr<const PackageID> &) PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
+ typedef kc::KeyedClass<
+ kc::Field<k::check_sanity, std::tr1::function<void (const std::string &)> >,
+ kc::Field<k::remove_trailing_square_bracket_if_exists, std::tr1::function<bool (std::string &, PartiallyMadePackageDepSpec &)> >,
+ kc::Field<k::remove_trailing_slot_if_exists, std::tr1::function<void (std::string &, PartiallyMadePackageDepSpec &)> >,
+ kc::Field<k::remove_trailing_repo_if_exists, std::tr1::function<void (std::string &, PartiallyMadePackageDepSpec &)> >,
+ kc::Field<k::has_version_operator, std::tr1::function<bool (const std::string &)> >,
+ kc::Field<k::get_remove_version_operator, std::tr1::function<VersionOperator (std::string &)> >,
+ kc::Field<k::get_remove_trailing_version, std::tr1::function<VersionSpec (std::string &)> >,
+ kc::Field<k::add_version_requirement, std::tr1::function<void (const VersionOperator &, const VersionSpec &, PartiallyMadePackageDepSpec &)> >,
+ kc::Field<k::add_package_requirement, std::tr1::function<void (const std::string &, PartiallyMadePackageDepSpec &)> >
+ > GenericELikePackageDepSpecParseFunctions;
- PartiallyMadePackageDepSpec partial_parse_elike_package_dep_spec(const std::string &, const ELikePackageDepSpecOptions &,
- const std::tr1::shared_ptr<const PackageID> &) PALUDIS_VISIBLE;
+ PackageDepSpec parse_generic_elike_package_dep_spec(const std::string & ss, const GenericELikePackageDepSpecParseFunctions & fns)
+ PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
+
+ PartiallyMadePackageDepSpec partial_parse_generic_elike_package_dep_spec(const std::string & ss,
+ const GenericELikePackageDepSpecParseFunctions & fns)
+ PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
+
+ PackageDepSpec parse_elike_package_dep_spec(const std::string & ss, const ELikePackageDepSpecOptions &,
+ const std::tr1::shared_ptr<const PackageID> &)
+ PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
+
+ PartiallyMadePackageDepSpec partial_parse_elike_package_dep_spec(const std::string & ss, const ELikePackageDepSpecOptions &,
+ const std::tr1::shared_ptr<const PackageID> &)
+ PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
+
+ void elike_check_sanity(const std::string & s) PALUDIS_VISIBLE;
+
+ bool elike_remove_trailing_square_bracket_if_exists(std::string & s, PartiallyMadePackageDepSpec & result,
+ const ELikePackageDepSpecOptions & options, bool & had_bracket_version_requirements,
+ const std::tr1::shared_ptr<const PackageID> & id) PALUDIS_VISIBLE;
+
+ void elike_remove_trailing_repo_if_exists(std::string & s, PartiallyMadePackageDepSpec & result,
+ const ELikePackageDepSpecOptions & options) PALUDIS_VISIBLE;
+
+ void elike_remove_trailing_slot_if_exists(std::string & s, PartiallyMadePackageDepSpec & result,
+ const ELikePackageDepSpecOptions & options) PALUDIS_VISIBLE;
+
+ bool elike_has_version_operator(const std::string & s, const bool had_bracket_version_requirements) PALUDIS_VISIBLE;
+
+ VersionOperator elike_get_remove_version_operator(std::string & s, const ELikePackageDepSpecOptions & options) PALUDIS_VISIBLE;
+
+ VersionSpec elike_get_remove_trailing_version(std::string & s) PALUDIS_VISIBLE;
+
+ void elike_add_version_requirement(const VersionOperator & op, const VersionSpec & spec, PartiallyMadePackageDepSpec & result)
+ PALUDIS_VISIBLE;
+
+ void elike_add_package_requirement(const std::string & s, PartiallyMadePackageDepSpec & result) PALUDIS_VISIBLE;
}
#endif
diff --git a/paludis/elike_package_dep_spec.cc b/paludis/elike_package_dep_spec.cc
index ed81186..49c8d07 100644
--- a/paludis/elike_package_dep_spec.cc
+++ b/paludis/elike_package_dep_spec.cc
@@ -23,6 +23,7 @@
#include <paludis/util/options.hh>
#include <paludis/util/log.hh>
#include <paludis/util/make_shared_ptr.hh>
+#include <paludis/util/kc.hh>
#include <paludis/dep_spec.hh>
#include <paludis/version_operator.hh>
#include <paludis/version_spec.hh>
@@ -33,289 +34,398 @@ using namespace paludis;
#include <paludis/elike_package_dep_spec-se.cc>
PartiallyMadePackageDepSpec
-paludis::partial_parse_elike_package_dep_spec(
- const std::string & ss, const ELikePackageDepSpecOptions & options, const std::tr1::shared_ptr<const PackageID> & id)
+paludis::partial_parse_generic_elike_package_dep_spec(const std::string & ss, const GenericELikePackageDepSpecParseFunctions & fns)
{
- Context context("When parsing package dep spec '" + ss + "':");
+ Context context("When parsing generic package dep spec '" + ss + "':");
- if (ss.empty())
- throw PackageDepSpecError("Got empty dep spec");
+ /* Check that it's not, e.g. a set with updso_throw_if_set, or empty. */
+ fns[k::check_sanity()](ss);
- PartiallyMadePackageDepSpec result;
std::string s(ss);
- bool had_bracket_version_requirements(false);
+ PartiallyMadePackageDepSpec result;
+
+ /* Remove trailing [use], [version] etc parts. */
+ while (fns[k::remove_trailing_square_bracket_if_exists()](s, result))
+ {
+ }
+
+ /* Remove trailing ::repo and :slot parts. */
+ fns[k::remove_trailing_repo_if_exists()](s, result);
+ fns[k::remove_trailing_slot_if_exists()](s, result);
+
+ if (fns[k::has_version_operator()](s))
+ {
+ /* Leading (or maybe =*) operator, so trailing version. */
+ VersionOperator op(fns[k::get_remove_version_operator()](s));
+ VersionSpec spec(fns[k::get_remove_trailing_version()](s));
+ fns[k::add_version_requirement()](op, spec, result);
+ fns[k::add_package_requirement()](s, result);
+ }
+ else
+ {
+ /* No leading operator, so no version. */
+ fns[k::add_package_requirement()](s, result);
+ }
+ return result;
+}
+
+PackageDepSpec
+paludis::parse_generic_elike_package_dep_spec(const std::string & ss, const GenericELikePackageDepSpecParseFunctions & fns)
+{
+ return partial_parse_generic_elike_package_dep_spec(ss, fns);
+}
+
+void
+paludis::elike_check_sanity(const std::string & s)
+{
+ if (s.empty())
+ throw PackageDepSpecError("Got empty dep spec");
+}
+
+bool
+paludis::elike_remove_trailing_square_bracket_if_exists(std::string & s, PartiallyMadePackageDepSpec & result,
+ const ELikePackageDepSpecOptions & options, bool & had_bracket_version_requirements,
+ const std::tr1::shared_ptr<const PackageID> & id)
+{
std::string::size_type use_group_p;
- while (std::string::npos != ((use_group_p = s.rfind('['))))
+ if (std::string::npos == ((use_group_p = s.rfind('['))))
+ return false;
+
+ if (! options[epdso_allow_square_bracket_deps])
{
- if (! options[epdso_allow_square_bracket_deps])
- {
- if (options[epdso_strict_parsing])
- throw PackageDepSpecError("[] dependencies not safe for use here");
- else
- Log::get_instance()->message("e.package_dep_spec.brackets_not_allowed", ll_warning, lc_context)
- << "[] dependencies not safe for use here";
- }
+ if (options[epdso_strict_parsing])
+ throw PackageDepSpecError("[] dependencies not safe for use here");
+ else
+ Log::get_instance()->message("e.package_dep_spec.brackets_not_allowed", ll_warning, lc_context)
+ << "[] dependencies not safe for use here";
+ }
- if (s.at(s.length() - 1) != ']')
- throw PackageDepSpecError("Mismatched []");
+ if (s.at(s.length() - 1) != ']')
+ throw PackageDepSpecError("Mismatched []");
- std::string flag(s.substr(use_group_p + 1));
- if (flag.length() < 2)
- throw PackageDepSpecError("Invalid [] contents");
+ std::string flag(s.substr(use_group_p + 1));
+ if (flag.length() < 2)
+ throw PackageDepSpecError("Invalid [] contents");
- flag.erase(flag.length() - 1);
+ flag.erase(flag.length() - 1);
- switch (flag.at(0))
- {
- case '<':
- case '>':
- case '=':
- case '~':
+ switch (flag.at(0))
+ {
+ case '<':
+ case '>':
+ case '=':
+ case '~':
+ {
+ char needed_mode(0);
+
+ while (! flag.empty())
{
- char needed_mode(0);
+ Context cc("When parsing [] segment '" + flag + "':");
- while (! flag.empty())
- {
- Context cc("When parsing [] segment '" + flag + "':");
+ std::string op;
+ std::string::size_type opos(0);
+ while (opos < flag.length())
+ if (std::string::npos == std::string("><=~").find(flag.at(opos)))
+ break;
+ else
+ ++opos;
- std::string op;
- std::string::size_type opos(0);
- while (opos < flag.length())
- if (std::string::npos == std::string("><=~").find(flag.at(opos)))
- break;
- else
- ++opos;
+ op = flag.substr(0, opos);
+ flag.erase(0, opos);
- op = flag.substr(0, opos);
- flag.erase(0, opos);
+ if (op.empty())
+ throw PackageDepSpecError("Missing operator inside []");
- if (op.empty())
- throw PackageDepSpecError("Missing operator inside []");
+ VersionOperator vop(op);
- VersionOperator vop(op);
+ std::string ver;
+ opos = flag.find_first_of("|&");
+ if (std::string::npos == opos)
+ {
+ ver = flag;
+ flag.clear();
+ }
+ else
+ {
+ if (0 == needed_mode)
+ needed_mode = flag.at(opos);
+ else if (needed_mode != flag.at(opos))
+ throw PackageDepSpecError("Mixed & and | inside []");
- std::string ver;
- opos = flag.find_first_of("|&");
- if (std::string::npos == opos)
- {
- ver = flag;
- flag.clear();
- }
+ result.version_requirements_mode((flag.at(opos) == '|' ? vr_or : vr_and));
+ ver = flag.substr(0, opos++);
+ flag.erase(0, opos);
+ }
+
+ if (ver.empty())
+ throw PackageDepSpecError("Missing version after operator '" + stringify(vop) + " inside []");
+
+ if ('*' == ver.at(ver.length() - 1))
+ {
+ ver.erase(ver.length() - 1);
+ if (vop == vo_equal)
+ vop = vo_equal_star;
else
- {
- if (0 == needed_mode)
- needed_mode = flag.at(opos);
- else if (needed_mode != flag.at(opos))
- throw PackageDepSpecError("Mixed & and | inside []");
-
- result.version_requirements_mode((flag.at(opos) == '|' ? vr_or : vr_and));
- ver = flag.substr(0, opos++);
- flag.erase(0, opos);
- }
-
- if (ver.empty())
- throw PackageDepSpecError("Missing version after operator '" + stringify(vop) + " inside []");
-
- if ('*' == ver.at(ver.length() - 1))
- {
- ver.erase(ver.length() - 1);
- if (vop == vo_equal)
- vop = vo_equal_star;
- else
- throw PackageDepSpecError("Invalid use of * with operator '" + stringify(vop) + " inside []");
- }
-
- VersionSpec vs(ver);
- result.version_requirement(VersionRequirement(vop, vs));
- had_bracket_version_requirements = true;
+ throw PackageDepSpecError("Invalid use of * with operator '" + stringify(vop) + " inside []");
}
- }
- break;
- default:
- {
- std::tr1::shared_ptr<const AdditionalPackageDepSpecRequirement> req(parse_elike_use_requirement(flag,
- id, ELikeUseRequirementOptions() + euro_allow_self_deps));
- result.additional_requirement(req);
+ VersionSpec vs(ver);
+ result.version_requirement(VersionRequirement(vop, vs));
+ had_bracket_version_requirements = true;
}
- break;
- };
+ }
+ break;
- s.erase(use_group_p);
- }
+ default:
+ {
+ std::tr1::shared_ptr<const AdditionalPackageDepSpecRequirement> req(parse_elike_use_requirement(flag,
+ id, ELikeUseRequirementOptions() + euro_allow_self_deps));
+ result.additional_requirement(req);
+ }
+ break;
+ };
+
+ s.erase(use_group_p);
+ return true;
+}
+
+void
+paludis::elike_remove_trailing_repo_if_exists(std::string & s, PartiallyMadePackageDepSpec & result,
+ const ELikePackageDepSpecOptions & options)
+{
std::string::size_type repo_p;
- if (std::string::npos != ((repo_p = s.rfind("::"))))
- {
- if (! options[epdso_allow_repository_deps])
- {
- if (options[epdso_strict_parsing])
- throw PackageDepSpecError("Repository dependencies not safe for use here");
- else
- Log::get_instance()->message("e.package_dep_spec.repository_not_allowed", ll_warning, lc_context)
- << "Repository dependencies not safe for use here";
- }
+ if (std::string::npos == ((repo_p = s.rfind("::"))))
+ return;
- result.repository(RepositoryName(s.substr(repo_p + 2)));
- s.erase(repo_p);
+ if (! options[epdso_allow_repository_deps])
+ {
+ if (options[epdso_strict_parsing])
+ throw PackageDepSpecError("Repository dependencies not safe for use here");
+ else
+ Log::get_instance()->message("e.package_dep_spec.repository_not_allowed", ll_warning, lc_context)
+ << "Repository dependencies not safe for use here";
}
+ result.in_repository(RepositoryName(s.substr(repo_p + 2)));
+ s.erase(repo_p);
+}
+
+void
+paludis::elike_remove_trailing_slot_if_exists(std::string & s, PartiallyMadePackageDepSpec & result,
+ const ELikePackageDepSpecOptions & options)
+{
std::string::size_type slot_p;
- if (std::string::npos != ((slot_p = s.rfind(':'))))
- {
- std::string match(s.substr(slot_p + 1));
- if (match.empty())
- throw PackageDepSpecError("Empty slot dependency specified");
+ if (std::string::npos == ((slot_p = s.rfind(':'))))
+ return;
- if ("*" == match)
+ std::string match(s.substr(slot_p + 1));
+ if (match.empty())
+ throw PackageDepSpecError("Empty slot dependency specified");
+
+ if ("*" == match)
+ {
+ if (! options[epdso_allow_slot_star_deps])
{
- if (! options[epdso_allow_slot_star_deps])
- {
- if (options[epdso_strict_parsing])
- throw PackageDepSpecError("Slot '*' dependencies not safe for use here");
- else
- Log::get_instance()->message("e.package_dep_spec.slot_star_not_allowed", ll_warning, lc_context)
- << "Slot '*' dependencies not safe for use here";
- }
- result.slot_requirement(make_shared_ptr(new ELikeSlotAnyUnlockedRequirement));
+ if (options[epdso_strict_parsing])
+ throw PackageDepSpecError("Slot '*' dependencies not safe for use here");
+ else
+ Log::get_instance()->message("e.package_dep_spec.slot_star_not_allowed", ll_warning, lc_context)
+ << "Slot '*' dependencies not safe for use here";
}
- else if ('=' == match.at(0))
+ result.slot_requirement(make_shared_ptr(new ELikeSlotAnyUnlockedRequirement));
+ }
+ else if ('=' == match.at(0))
+ {
+ if (! options[epdso_allow_slot_equal_deps])
{
- if (! options[epdso_allow_slot_equal_deps])
- {
- if (options[epdso_strict_parsing])
- throw PackageDepSpecError("Slot '=' dependencies not safe for use here");
- else
- Log::get_instance()->message("e.package_dep_spec.slot_equals_not_allowed", ll_warning, lc_context)
- << "Slot '=' dependencies not safe for use here";
- }
-
- if (1 == match.length())
- result.slot_requirement(make_shared_ptr(new ELikeSlotAnyLockedRequirement));
+ if (options[epdso_strict_parsing])
+ throw PackageDepSpecError("Slot '=' dependencies not safe for use here");
else
- result.slot_requirement(make_shared_ptr(new ELikeSlotExactRequirement(SlotName(s.substr(slot_p + 2)), true)));
+ Log::get_instance()->message("e.package_dep_spec.slot_equals_not_allowed", ll_warning, lc_context)
+ << "Slot '=' dependencies not safe for use here";
}
+
+ if (1 == match.length())
+ result.slot_requirement(make_shared_ptr(new ELikeSlotAnyLockedRequirement));
else
+ result.slot_requirement(make_shared_ptr(new ELikeSlotExactRequirement(SlotName(s.substr(slot_p + 2)), true)));
+ }
+ else
+ {
+ if (! options[epdso_allow_slot_deps])
{
- if (! options[epdso_allow_slot_deps])
- {
- if (options[epdso_strict_parsing])
- throw PackageDepSpecError("Slot dependencies not safe for use here");
- else
- Log::get_instance()->message("e.package_dep_spec.slot_not_allowed", ll_warning, lc_context)
- << "Slot dependencies not safe for use here";
- }
- result.slot_requirement(make_shared_ptr(new ELikeSlotExactRequirement(SlotName(s.substr(slot_p + 1)), false)));
+ if (options[epdso_strict_parsing])
+ throw PackageDepSpecError("Slot dependencies not safe for use here");
+ else
+ Log::get_instance()->message("e.package_dep_spec.slot_not_allowed", ll_warning, lc_context)
+ << "Slot dependencies not safe for use here";
}
- s.erase(slot_p);
+ result.slot_requirement(make_shared_ptr(new ELikeSlotExactRequirement(SlotName(s.substr(slot_p + 1)), false)));
}
+ s.erase(slot_p);
+}
- if (std::string::npos != std::string("<>=~").find(s.at(0)))
+bool
+paludis::elike_has_version_operator(const std::string & s, const bool had_bracket_version_requirements)
+{
+ if ((! s.empty()) && std::string::npos != std::string("<>=~").find(s.at(0)))
{
if (had_bracket_version_requirements)
throw PackageDepSpecError("Cannot mix [] and traditional version specifications");
+ return true;
+ }
+ else
+ return false;
+}
- std::string::size_type p(1);
- if (s.length() > 1 && std::string::npos != std::string("<>=~").find(s.at(1)))
- ++p;
- VersionOperator op(s.substr(0, p));
+VersionOperator
+paludis::elike_get_remove_version_operator(std::string & s, const ELikePackageDepSpecOptions & options)
+{
+ std::string::size_type p(1);
+ if (s.length() > 1 && std::string::npos != std::string("<>=~").find(s.at(1)))
+ ++p;
+ VersionOperator op(s.substr(0, p));
+ s.erase(0, p);
+
+ if (op == vo_tilde_greater)
+ if (! options[epdso_allow_tilde_greater_deps])
+ {
+ if (options[epdso_strict_parsing])
+ throw PackageDepSpecError("~> dependencies not safe for use here");
+ else
+ Log::get_instance()->message("e.package_dep_spec.tilde_greater_not_allowed", ll_warning, lc_context)
+ << "~> dependencies not safe for use here";
+ }
- if (op == vo_tilde_greater)
- if (! options[epdso_allow_tilde_greater_deps])
+ if ((! s.empty()) && ('*' == s.at(s.length() - 1)))
+ {
+ if (op != vo_equal)
+ {
+ if (! options[epdso_strict_star_operator])
{
if (options[epdso_strict_parsing])
- throw PackageDepSpecError("~> dependencies not safe for use here");
+ throw PackageDepSpecError("Package dep spec uses * with operator '" + stringify(op) + "'");
else
- Log::get_instance()->message("e.package_dep_spec.tilde_greater_not_allowed", ll_warning, lc_context)
- << "~> dependencies not safe for use here";
+ Log::get_instance()->message("e.package_dep_spec.bad_operator", ll_qa, lc_context)
+ << "Package dep spec uses * with operator '" << op << "', pretending it uses the equals operator instead";
}
+ }
+ op = vo_equal_star;
+ s.erase(s.length() - 1);
+ }
- std::string::size_type q(p);
+ return op;
+}
- while (true)
+VersionSpec
+paludis::elike_get_remove_trailing_version(std::string & s)
+{
+ /* find the last place a version spec could start (that is, a hyphen
+ * followed by a digit, or a hyphen followed by 'scm'). if it's the scm
+ * thing, find the second last place instead, if it exists. */
+ std::string::size_type hyphen_pos(s.rfind('-')), last_hyphen_pos(std::string::npos);
+ while (true)
+ {
+ if (std::string::npos == hyphen_pos || 0 == hyphen_pos)
{
- if (p >= s.length())
- throw PackageDepSpecError("Couldn't parse dep spec '" + ss + "'");
- q = s.find('-', q + 1);
- if ((std::string::npos == q) || (++q >= s.length()))
- throw PackageDepSpecError("Couldn't parse dep spec '" + ss + "'");
- if ((s.at(q) >= '0' && s.at(q) <= '9') || (0 == s.compare(q, 3, "scm")))
+ /* - at start or no - is an error. but if we've already found a
+ * trailing -scm, use that. */
+ if (std::string::npos != last_hyphen_pos)
+ {
+ hyphen_pos = last_hyphen_pos;
break;
+ }
+ else
+ throw PackageDepSpecError("No version found");
}
- std::string::size_type new_q(q);
- while (true)
+ /* make sure we've got room for the match */
+ if (! (hyphen_pos + 1 >= s.length()))
{
- if (new_q >= s.length())
- break;
- new_q = s.find('-', new_q + 1);
- if ((std::string::npos == new_q) || (++new_q >= s.length()))
+ if (std::string::npos != std::string("0123456789").find(s.at(hyphen_pos + 1)))
+ {
+ /* can't have an -scm before this */
break;
- if (s.at(new_q) >= '0' && s.at(new_q) <= '9')
- q = new_q;
- }
-
- std::string t(s.substr(p, q - p - 1));
- if (t.length() >= 3 && (0 == t.compare(0, 2, "*/")))
- {
- throw PackageDepSpecError("Wildcard '*' not allowed in '" + stringify(ss) + "'");
-
- if (0 != t.compare(t.length() - 2, 2, "/*"))
- result.package_name_part(PackageNamePart(t.substr(2)));
- }
- else if (t.length() >= 3 && (0 == t.compare(t.length() - 2, 2, "/*")))
- {
- throw PackageDepSpecError("Wildcard '*' not allowed in '" + stringify(ss) + "'");
-
- result.category_name_part(CategoryNamePart(t.substr(0, t.length() - 2)));
- }
- else
- result.package(QualifiedPackageName(t));
-
- if ('*' == s.at(s.length() - 1))
- {
- if (op != vo_equal)
+ }
+ else if (0 == s.compare(hyphen_pos + 1, 3, "scm"))
{
- if (! options[epdso_strict_star_operator])
+ if (std::string::npos == last_hyphen_pos)
{
- if (options[epdso_strict_parsing])
- throw PackageDepSpecError(
- "Package dep spec '" + ss + "' uses * "
- "with operator '" + stringify(op) + "'");
- else
- Log::get_instance()->message("e.package_dep_spec.bad_operator", ll_qa, lc_context)
- << "Package dep spec '" << ss << "' uses * with operator '" << op <<
- "', pretending it uses the equals operator instead";
+ /* we can still go back further, but we don't have to */
+ last_hyphen_pos = hyphen_pos;
+ }
+ else
+ {
+ /* -scm-scm not allowed, use our later match */
+ hyphen_pos = last_hyphen_pos;
+ break;
}
}
- op = vo_equal_star;
-
- result.version_requirement(VersionRequirement(op, VersionSpec(s.substr(q, s.length() - q - 1))));
}
- else
- result.version_requirement(VersionRequirement(op, VersionSpec(s.substr(q))));
+
+ hyphen_pos = s.rfind('-', hyphen_pos - 1);
}
- else
+
+ VersionSpec result(s.substr(hyphen_pos + 1));
+ s.erase(hyphen_pos);
+ return result;
+}
+
+void
+paludis::elike_add_version_requirement(const VersionOperator & op, const VersionSpec & spec, PartiallyMadePackageDepSpec & result)
+{
+ result.version_requirement(VersionRequirement(op, spec));
+}
+
+void
+paludis::elike_add_package_requirement(const std::string & s, PartiallyMadePackageDepSpec & result)
+{
+ if (std::string::npos == s.find('/'))
+ throw PackageDepSpecError("No category/ found in '" + s + "' (cat/pkg is required, a simple pkg is not allowed here)");
+
+ if (s.length() >= 3 && (0 == s.compare(0, 2, "*/")))
{
- if (s.length() >= 3 && (0 == s.compare(0, 2, "*/")))
- {
- throw PackageDepSpecError("Wildcard '*' not allowed in '" + stringify(ss) + "'");
+ throw PackageDepSpecError("Wildcard '*' not allowed here");
- if (0 != s.compare(s.length() - 2, 2, "/*"))
- result.package_name_part(PackageNamePart(s.substr(2)));
- }
- else if (s.length() >= 3 && (0 == s.compare(s.length() - 2, 2, "/*")))
- {
- throw PackageDepSpecError("Wildcard '*' not allowed in '" + stringify(ss) + "'");
+ if (0 != s.compare(s.length() - 2, 2, "/*"))
+ result.package_name_part(PackageNamePart(s.substr(2)));
+ }
+ else if (s.length() >= 3 && (0 == s.compare(s.length() - 2, 2, "/*")))
+ {
+ throw PackageDepSpecError("Wildcard '*' not allowed here");
- result.category_name_part(CategoryNamePart(s.substr(0, s.length() - 2)));
- }
- else
- result.package(QualifiedPackageName(s));
+ result.category_name_part(CategoryNamePart(s.substr(0, s.length() - 2)));
}
+ else
+ result.package(QualifiedPackageName(s));
+}
- return result;
+PartiallyMadePackageDepSpec
+paludis::partial_parse_elike_package_dep_spec(
+ const std::string & ss, const ELikePackageDepSpecOptions & options, const std::tr1::shared_ptr<const PackageID> & id)
+{
+ using namespace std::tr1::placeholders;
+
+ Context context("When parsing elike package dep spec '" + ss + "':");
+
+ bool had_bracket_version_requirements(false);
+
+ return partial_parse_generic_elike_package_dep_spec(ss, GenericELikePackageDepSpecParseFunctions::named_create()
+ (k::check_sanity(), &elike_check_sanity)
+ (k::remove_trailing_square_bracket_if_exists(), std::tr1::bind(&elike_remove_trailing_square_bracket_if_exists,
+ _1, _2, options, std::tr1::ref(had_bracket_version_requirements), id))
+ (k::remove_trailing_repo_if_exists(), std::tr1::bind(&elike_remove_trailing_repo_if_exists,
+ _1, _2, options))
+ (k::remove_trailing_slot_if_exists(), std::tr1::bind(&elike_remove_trailing_slot_if_exists,
+ _1, _2, options))
+ (k::has_version_operator(), std::tr1::bind(&elike_has_version_operator, _1, std::tr1::cref(had_bracket_version_requirements)))
+ (k::get_remove_version_operator(), std::tr1::bind(&elike_get_remove_version_operator, _1, options))
+ (k::get_remove_trailing_version(), std::tr1::bind(&elike_get_remove_trailing_version, _1))
+ (k::add_version_requirement(), std::tr1::bind(&elike_add_version_requirement, _1, _2, _3))
+ (k::add_package_requirement(), std::tr1::bind(&elike_add_package_requirement, _1, _2))
+ );
}
PackageDepSpec
diff --git a/paludis/elike_package_dep_spec.se b/paludis/elike_package_dep_spec.se
index 7e8734a..e116489 100644
--- a/paludis/elike_package_dep_spec.se
+++ b/paludis/elike_package_dep_spec.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_ELikePackageDepSpecOption()
diff --git a/paludis/elike_use_requirement.se b/paludis/elike_use_requirement.se
index 442c60c..e1c114a 100644
--- a/paludis/elike_use_requirement.se
+++ b/paludis/elike_use_requirement.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_ELikeUseRequirementOption()
diff --git a/paludis/environments/no_config/no_config_environment.cc b/paludis/environments/no_config/no_config_environment.cc
index 84bb2ce..fa06394 100644
--- a/paludis/environments/no_config/no_config_environment.cc
+++ b/paludis/environments/no_config/no_config_environment.cc
@@ -41,6 +41,8 @@
#include <set>
#include <list>
+#include "config.h"
+
using namespace paludis;
using namespace paludis::no_config_environment;
@@ -220,9 +222,11 @@ Implementation<NoConfigEnvironment>::initialise(NoConfigEnvironment * const env)
RepositoryMaker::get_instance()->find_maker("ebuild")(env,
std::tr1::bind(from_keys, keys, std::tr1::placeholders::_1)))));
+#ifdef ENABLE_VIRTUALS_REPOSITORY
if ((*DistributionData::get_instance()->distribution_from_string(env->distribution()))[k::support_old_style_virtuals()])
package_database->add_repository(-2, RepositoryMaker::get_instance()->find_maker("virtuals")(env,
std::tr1::bind(from_keys, make_shared_ptr(new Map<std::string, std::string>), std::tr1::placeholders::_1)));
+#endif
}
else
{
@@ -244,9 +248,11 @@ Implementation<NoConfigEnvironment>::initialise(NoConfigEnvironment * const env)
new Map<std::string, std::string>);
iv_keys->insert("root", "/");
+#ifdef ENABLE_VIRTUALS_REPOSITORY
if ((*DistributionData::get_instance()->distribution_from_string(env->distribution()))[k::support_old_style_virtuals()])
package_database->add_repository(-2, RepositoryMaker::get_instance()->find_maker("installed_virtuals")(env,
std::tr1::bind(from_keys, iv_keys, std::tr1::placeholders::_1)));
+#endif
}
}
diff --git a/paludis/environments/no_config/no_config_environment.se b/paludis/environments/no_config/no_config_environment.se
index 85cd57c..32376de 100644
--- a/paludis/environments/no_config/no_config_environment.se
+++ b/paludis/environments/no_config/no_config_environment.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_RepositoryType()
diff --git a/paludis/environments/no_config/no_config_environment.sr b/paludis/environments/no_config/no_config_environment.sr
index c6c76f3..e459802 100644
--- a/paludis/environments/no_config/no_config_environment.sr
+++ b/paludis/environments/no_config/no_config_environment.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_Params()
diff --git a/paludis/environments/no_config/no_config_environment_TEST_cleanup.sh b/paludis/environments/no_config/no_config_environment_TEST_cleanup.sh
index 43e621d..1948f42 100755
--- a/paludis/environments/no_config/no_config_environment_TEST_cleanup.sh
+++ b/paludis/environments/no_config/no_config_environment_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d no_config_environment_TEST_dir ] ; then
diff --git a/paludis/environments/no_config/no_config_environment_TEST_setup.sh b/paludis/environments/no_config/no_config_environment_TEST_setup.sh
index 7fcf32a..a4421aa 100755
--- a/paludis/environments/no_config/no_config_environment_TEST_setup.sh
+++ b/paludis/environments/no_config/no_config_environment_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir no_config_environment_TEST_dir || exit 2
diff --git a/paludis/environments/paludis/paludis_config.cc b/paludis/environments/paludis/paludis_config.cc
index 2439c25..7bdc045 100644
--- a/paludis/environments/paludis/paludis_config.cc
+++ b/paludis/environments/paludis/paludis_config.cc
@@ -373,8 +373,9 @@ PaludisConfig::PaludisConfig(PaludisEnvironment * const e, const std::string & s
/* repositories */
{
- /* add virtuals repositories */
+#ifdef ENABLE_VIRTUALS_REPOSITORY
+ /* add virtuals repositories */
if ((*DistributionData::get_instance()->distribution_from_string(distribution()))[k::support_old_style_virtuals()])
{
std::tr1::shared_ptr<Map<std::string, std::string> > iv_keys(
@@ -392,6 +393,7 @@ PaludisConfig::PaludisConfig(PaludisEnvironment * const e, const std::string & s
(k::keys(), std::tr1::bind(&from_keys, make_shared_ptr(new Map<std::string, std::string>), std::tr1::placeholders::_1))
);
}
+#endif
/* add normal repositories */
diff --git a/paludis/environments/paludis/paludis_environment_TEST_cleanup.sh b/paludis/environments/paludis/paludis_environment_TEST_cleanup.sh
index 043f533..8748033 100755
--- a/paludis/environments/paludis/paludis_environment_TEST_cleanup.sh
+++ b/paludis/environments/paludis/paludis_environment_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d paludis_environment_TEST_dir ] ; then
diff --git a/paludis/environments/paludis/paludis_environment_TEST_setup.sh b/paludis/environments/paludis/paludis_environment_TEST_setup.sh
index 9a481e4..df5b2e2 100755
--- a/paludis/environments/paludis/paludis_environment_TEST_setup.sh
+++ b/paludis/environments/paludis/paludis_environment_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir paludis_environment_TEST_dir || exit 2
diff --git a/paludis/environments/paludis/use_config_entry.sr b/paludis/environments/paludis/use_config_entry.sr
index 046c045..3abaf8d 100644
--- a/paludis/environments/paludis/use_config_entry.sr
+++ b/paludis/environments/paludis/use_config_entry.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_UseConfigEntry()
diff --git a/paludis/environments/portage/bashrc b/paludis/environments/portage/bashrc
index 381bb0b..48466f6 100644
--- a/paludis/environments/portage/bashrc
+++ b/paludis/environments/portage/bashrc
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# ebuild.bash doesn't allow USE etc to be set in user settings. But we need
# to source make.conf to pick up things like CFLAGS.
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index 1b036d7..9957183 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -56,6 +56,7 @@
#include <vector>
#include <list>
#include <fstream>
+#include "config.h"
using namespace paludis;
using namespace paludis::portage_environment;
@@ -80,7 +81,7 @@ namespace paludis
std::tr1::shared_ptr<KeyValueConfigFile> vars;
- std::set<std::string> use_with_expands;
+ std::list<std::string> use_with_expands;
std::set<std::string> use_expand;
std::set<std::string> accept_keywords;
std::multimap<std::string, std::string> mirrors;
@@ -208,8 +209,7 @@ namespace
new_values.clear();
else if ('-' == v->at(0))
new_values.erase(v->substr(1));
- else
- new_values.insert(*v);
+ new_values.insert(*v);
}
return join(new_values.begin(), new_values.end(), " ");
@@ -286,10 +286,8 @@ PortageEnvironment::PortageEnvironment(const std::string & s) :
/* use etc */
- tokenise_whitespace(_imp->vars->get("USE"), std::inserter(_imp->use_with_expands,
- _imp->use_with_expands.begin()));
- tokenise_whitespace(_imp->vars->get("USE_EXPAND"), std::inserter(_imp->use_expand,
- _imp->use_expand.begin()));
+ tokenise_whitespace(_imp->vars->get("USE"), std::back_inserter(_imp->use_with_expands));
+ tokenise_whitespace(_imp->vars->get("USE_EXPAND"), std::inserter(_imp->use_expand, _imp->use_expand.begin()));
for (std::set<std::string>::const_iterator i(_imp->use_expand.begin()), i_end(_imp->use_expand.end()) ;
i != i_end ; ++i)
{
@@ -301,7 +299,7 @@ PortageEnvironment::PortageEnvironment(const std::string & s) :
values.begin()));
for (std::set<std::string>::const_iterator v(values.begin()), v_end(values.end()) ;
v != v_end ; ++v)
- _imp->use_with_expands.insert(lower_i + "_" + *v);
+ _imp->use_with_expands.push_back(lower_i + "_" + *v);
}
/* accept keywords */
@@ -465,22 +463,26 @@ PortageEnvironment::_load_profile(const FSEntry & d)
void
PortageEnvironment::_add_virtuals_repository()
{
+#ifdef ENABLE_VIRTUALS_REPOSITORY
std::tr1::shared_ptr<Map<std::string, std::string> > keys(
new Map<std::string, std::string>);
package_database()->add_repository(-2,
RepositoryMaker::get_instance()->find_maker("virtuals")(this,
std::tr1::bind(from_keys, keys, std::tr1::placeholders::_1)));
+#endif
}
void
PortageEnvironment::_add_installed_virtuals_repository()
{
+#ifdef ENABLE_VIRTUALS_REPOSITORY
std::tr1::shared_ptr<Map<std::string, std::string> > keys(
new Map<std::string, std::string>);
keys->insert("root", stringify(root()));
package_database()->add_repository(-1,
RepositoryMaker::get_instance()->find_maker("installed_virtuals")(this,
std::tr1::bind(from_keys, keys, std::tr1::placeholders::_1)));
+#endif
}
void
@@ -570,9 +572,14 @@ PortageEnvironment::query_use(const UseFlagName & f, const PackageID & e) const
state = (*e.repository())[k::use_interface()]->query_use(f, e);
/* check use: general user config */
- std::set<std::string>::const_iterator u(_imp->use_with_expands.find(stringify(f)));
- if (u != _imp->use_with_expands.end())
- state = use_enabled;
+ for (std::list<std::string>::const_iterator i(_imp->use_with_expands.begin()), i_end(_imp->use_with_expands.end()) ;
+ i != i_end ; ++i)
+ if (*i == "-*")
+ state = use_disabled;
+ else if (*i == stringify(f))
+ state = use_enabled;
+ else if (*i == "-" + stringify(f))
+ state = use_disabled;
/* check use: per package config */
for (PackageUse::const_iterator i(_imp->package_use.begin()), i_end(_imp->package_use.end()) ;
@@ -685,7 +692,7 @@ PortageEnvironment::known_use_expand_names(const UseFlagName & prefix,
std::transform(prefix.data().begin(), prefix.data().end(), std::back_inserter(prefix_lower), &::tolower);
prefix_lower.append("_");
- for (std::set<std::string>::const_iterator i(_imp->use_with_expands.begin()),
+ for (std::list<std::string>::const_iterator i(_imp->use_with_expands.begin()),
i_end(_imp->use_with_expands.end()) ; i != i_end ; ++i)
if (0 == i->compare(0, prefix_lower.length(), prefix_lower, 0, prefix_lower.length()))
result->insert(UseFlagName(*i));
diff --git a/paludis/environments/portage/portage_environment_TEST.cc b/paludis/environments/portage/portage_environment_TEST.cc
index 40b75e3..01dd9b1 100644
--- a/paludis/environments/portage/portage_environment_TEST.cc
+++ b/paludis/environments/portage/portage_environment_TEST.cc
@@ -84,12 +84,14 @@ namespace test_cases
TEST_CHECK(! env.query_use(UseFlagName("three"), *idx));
TEST_CHECK(! env.query_use(UseFlagName("four"), *idx));
TEST_CHECK(! env.query_use(UseFlagName("five"), *idx));
+ TEST_CHECK(! env.query_use(UseFlagName("six"), *idx));
TEST_CHECK(! env.query_use(UseFlagName("one"), *id1));
TEST_CHECK(env.query_use(UseFlagName("two"), *id1));
TEST_CHECK(! env.query_use(UseFlagName("three"), *id1));
TEST_CHECK(env.query_use(UseFlagName("four"), *id1));
TEST_CHECK(! env.query_use(UseFlagName("five"), *id1));
+ TEST_CHECK(! env.query_use(UseFlagName("six"), *id1));
}
} test_query_use;
diff --git a/paludis/environments/portage/portage_environment_TEST_cleanup.sh b/paludis/environments/portage/portage_environment_TEST_cleanup.sh
index b64b00f..ba8c8d2 100755
--- a/paludis/environments/portage/portage_environment_TEST_cleanup.sh
+++ b/paludis/environments/portage/portage_environment_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d portage_environment_TEST_dir ] ; then
diff --git a/paludis/environments/portage/portage_environment_TEST_setup.sh b/paludis/environments/portage/portage_environment_TEST_setup.sh
index f260eab..4f4d767 100755
--- a/paludis/environments/portage/portage_environment_TEST_setup.sh
+++ b/paludis/environments/portage/portage_environment_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir portage_environment_TEST_dir || exit 2
@@ -11,7 +11,7 @@ ARCH="arch"
ACCEPT_KEYWORDS="arch"
USE_EXPAND="FOO_CARDS"
FOO_CARDS="four"
-USE="foo_c"
+USE="foo_c six"
END
mkdir -p var/db/pkg
@@ -30,7 +30,7 @@ touch repo/cat-one/pkg-x/pkg-x-1.ebuild || exit 4
mkdir -p query_use/${SYSCONFDIR}/portage
ln -s $(pwd )/profile query_use/${SYSCONFDIR}/make.profile
cat <<END > query_use/${SYSCONFDIR}/make.conf
-USE="one two -three"
+USE="one two -three -six"
PORTDIR="`pwd`/repo"
END
cat <<"END" > query_use/${SYSCONFDIR}/portage/package.use
diff --git a/paludis/environments/test/test_environment.cc b/paludis/environments/test/test_environment.cc
index 58082ad..4ea87e4 100644
--- a/paludis/environments/test/test_environment.cc
+++ b/paludis/environments/test/test_environment.cc
@@ -23,14 +23,22 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/make_shared_ptr.hh>
+#include <paludis/util/hashes.hh>
+#include <paludis/util/tokeniser.hh>
+#include <paludis/util/visitor-impl.hh>
#include <paludis/package_database.hh>
#include <paludis/package_id.hh>
#include <paludis/hook.hh>
+#include <paludis/user_dep_spec.hh>
#include <tr1/functional>
+#include <tr1/unordered_map>
#include <string>
+#include <list>
using namespace paludis;
+typedef std::tr1::unordered_map<SetName, std::tr1::shared_ptr<const SetSpecTree::ConstItem>, Hash<SetName> > Sets;
+
namespace paludis
{
template<>
@@ -38,6 +46,7 @@ namespace paludis
{
std::tr1::shared_ptr<PackageDatabase> package_database;
std::string paludis_command;
+ Sets sets;
Implementation(Environment * const e) :
package_database(new PackageDatabase(e)),
@@ -117,9 +126,13 @@ TestEnvironment::fetch_package_id(const QualifiedPackageName & q,
}
std::tr1::shared_ptr<SetSpecTree::ConstItem>
-TestEnvironment::local_set(const SetName &) const
+TestEnvironment::local_set(const SetName & s) const
{
- return std::tr1::shared_ptr<SetSpecTree::ConstItem>();
+ Sets::const_iterator i(_imp->sets.find(s));
+ if (_imp->sets.end() == i)
+ return std::tr1::shared_ptr<SetSpecTree::ConstItem>();
+ else
+ return i->second;
}
uid_t
@@ -193,7 +206,7 @@ TestEnvironment::known_use_expand_names(const UseFlagName &, const PackageID &)
std::tr1::shared_ptr<SetSpecTree::ConstItem>
TestEnvironment::world_set() const
{
- return std::tr1::shared_ptr<SetSpecTree::ConstItem>();
+ return local_set(SetName("world"));
}
void
@@ -221,3 +234,30 @@ TestEnvironment::need_keys_added() const
{
}
+void
+TestEnvironment::add_set(const SetName & s, const std::string & members_str)
+{
+ Context context("When adding set '" + stringify(s) + "' to test environment:");
+
+ std::list<std::string> members;
+ tokenise_whitespace(members_str, std::back_inserter(members));
+
+ std::tr1::shared_ptr<ConstTreeSequence<SetSpecTree, AllDepSpec> > top(
+ new ConstTreeSequence<SetSpecTree, AllDepSpec>(make_shared_ptr(new AllDepSpec)));
+ for (std::list<std::string>::const_iterator m(members.begin()), m_end(members.end()) ;
+ m != m_end ; ++m)
+ {
+ try
+ {
+ top->add(make_shared_ptr(new TreeLeaf<SetSpecTree, PackageDepSpec>(make_shared_ptr(new PackageDepSpec(
+ parse_user_package_dep_spec(*m, this, UserPackageDepSpecOptions() + updso_throw_if_set + updso_no_disambiguation))))));
+ }
+ catch (const GotASetNotAPackageDepSpec &)
+ {
+ top->add(make_shared_ptr(new TreeLeaf<SetSpecTree, NamedSetDepSpec>(make_shared_ptr(new NamedSetDepSpec(SetName(*m))))));
+ }
+ }
+
+ _imp->sets[s] = top;
+}
+
diff --git a/paludis/environments/test/test_environment.hh b/paludis/environments/test/test_environment.hh
index a4113ff..398bb28 100644
--- a/paludis/environments/test/test_environment.hh
+++ b/paludis/environments/test/test_environment.hh
@@ -126,6 +126,8 @@ namespace paludis
virtual void remove_from_world(const QualifiedPackageName &) const;
virtual void remove_from_world(const SetName &) const;
+
+ void add_set(const SetName &, const std::string &);
};
}
diff --git a/paludis/fetchers/dofile b/paludis/fetchers/dofile
index fd3e54b..190639a 100755
--- a/paludis/fetchers/dofile
+++ b/paludis/fetchers/dofile
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
shopt -s extglob
echo cp "/${1##file:+(/)}" "${2}" 1>&2
diff --git a/paludis/fetchers/dowget.in b/paludis/fetchers/dowget.in
index 8f4f9ab..165888c 100755
--- a/paludis/fetchers/dowget.in
+++ b/paludis/fetchers/dowget.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/filter-fwd.hh b/paludis/filter-fwd.hh
index 8e678e7..c10c7a9 100644
--- a/paludis/filter-fwd.hh
+++ b/paludis/filter-fwd.hh
@@ -34,6 +34,7 @@ namespace paludis
class NotMasked;
class InstalledAtRoot;
class And;
+ class Slot;
}
std::ostream & operator<< (std::ostream &, const Filter &)
diff --git a/paludis/filter.cc b/paludis/filter.cc
index 8d9c9cc..c365b4f 100644
--- a/paludis/filter.cc
+++ b/paludis/filter.cc
@@ -236,6 +236,36 @@ namespace
}
};
+ struct SlotFilterHandler :
+ AllFilterHandlerBase
+ {
+ const SlotName n;
+
+ SlotFilterHandler(const SlotName & nn) :
+ n(nn)
+ {
+ }
+
+ virtual std::tr1::shared_ptr<const PackageIDSet> ids(
+ const Environment * const,
+ const std::tr1::shared_ptr<const PackageIDSet> & id) const
+ {
+ std::tr1::shared_ptr<PackageIDSet> result(new PackageIDSet);
+
+ for (PackageIDSet::ConstIterator i(id->begin()), i_end(id->end()) ;
+ i != i_end ; ++i)
+ if ((*i)->slot() == n)
+ result->insert(*i);
+
+ return result;
+ }
+
+ virtual std::string as_string() const
+ {
+ return "slot is '" + stringify(n) + "'";
+ }
+ };
+
struct AndFilterHandler :
FilterHandler
{
@@ -306,6 +336,11 @@ filter::InstalledAtRoot::InstalledAtRoot(const FSEntry & r) :
{
}
+filter::Slot::Slot(const SlotName & n) :
+ Filter(make_shared_ptr(new SlotFilterHandler(n)))
+{
+}
+
filter::And::And(const Filter & f1, const Filter & f2) :
Filter(make_shared_ptr(new AndFilterHandler(f1, f2)))
{
diff --git a/paludis/filter.hh b/paludis/filter.hh
index 1f17913..361565e 100644
--- a/paludis/filter.hh
+++ b/paludis/filter.hh
@@ -107,6 +107,13 @@ namespace paludis
public:
And(const Filter &, const Filter &);
};
+
+ class PALUDIS_VISIBLE Slot :
+ public Filter
+ {
+ public:
+ Slot(const SlotName &);
+ };
}
#ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
diff --git a/paludis/find_unused_packages_task.cc b/paludis/find_unused_packages_task.cc
index 2a19448..34f3bda 100644
--- a/paludis/find_unused_packages_task.cc
+++ b/paludis/find_unused_packages_task.cc
@@ -47,7 +47,7 @@ FindUnusedPackagesTask::execute(const QualifiedPackageName & package)
std::tr1::shared_ptr<const PackageIDSequence> packages((*_env)[selection::AllVersionsGroupedBySlot(
generator::Matches(make_package_dep_spec()
.package(package)
- .repository(_repo->name()))
+ .in_repository(_repo->name()))
)]);
SlotName old_slot("I_am_a_slot");
diff --git a/paludis/fuzzy_finder.cc b/paludis/fuzzy_finder.cc
index 856850c..bab4f8f 100644
--- a/paludis/fuzzy_finder.cc
+++ b/paludis/fuzzy_finder.cc
@@ -144,8 +144,11 @@ FuzzyCandidatesFinder::FuzzyCandidatesFinder(const Environment & e, const std::s
package = stringify(pds.package_ptr()->package);
}
- if (pds.repository_ptr())
- g = g & generator::Repository(*pds.repository_ptr());
+ if (pds.in_repository_ptr())
+ g = g & generator::InRepository(*pds.in_repository_ptr());
+
+ if (pds.from_repository_ptr())
+ g = g & generator::FromRepository(*pds.from_repository_ptr());
}
std::tr1::shared_ptr<const PackageIDSequence> ids(e[selection::BestVersionOnly(g | FuzzyPackageName(package) | filter)]);
diff --git a/paludis/generator-fwd.hh b/paludis/generator-fwd.hh
index 3a11c27..821c0dd 100644
--- a/paludis/generator-fwd.hh
+++ b/paludis/generator-fwd.hh
@@ -32,7 +32,8 @@ namespace paludis
class All;
class Matches;
class Package;
- class Repository;
+ class FromRepository;
+ class InRepository;
class Category;
class Intersection;
template <typename> class SomeIDsMightSupportAction;
diff --git a/paludis/generator.cc b/paludis/generator.cc
index a199318..ed6210f 100644
--- a/paludis/generator.cc
+++ b/paludis/generator.cc
@@ -34,6 +34,7 @@
#include <paludis/environment.hh>
#include <paludis/package_database.hh>
#include <paludis/package_id.hh>
+#include <paludis/metadata_key.hh>
#include <algorithm>
#include <tr1/functional>
@@ -121,12 +122,12 @@ Generator::as_string() const
namespace
{
- struct RepositoryGeneratorHandler :
+ struct InRepositoryGeneratorHandler :
AllGeneratorHandlerBase
{
const RepositoryName name;
- RepositoryGeneratorHandler(const RepositoryName & n) :
+ InRepositoryGeneratorHandler(const RepositoryName & n) :
name(n)
{
}
@@ -147,6 +148,48 @@ namespace
}
};
+ struct FromRepositoryGeneratorHandler :
+ AllGeneratorHandlerBase
+ {
+ const RepositoryName name;
+
+ FromRepositoryGeneratorHandler(const RepositoryName & n) :
+ name(n)
+ {
+ }
+
+ virtual std::tr1::shared_ptr<const PackageIDSet> ids(
+ const Environment * const env,
+ const std::tr1::shared_ptr<const RepositoryNameSet> & repos,
+ const std::tr1::shared_ptr<const QualifiedPackageNameSet> & qpns) const
+ {
+ std::tr1::shared_ptr<PackageIDSet> result(new PackageIDSet);
+
+ for (RepositoryNameSet::ConstIterator r(repos->begin()), r_end(repos->end()) ;
+ r != r_end ; ++r)
+ {
+ for (QualifiedPackageNameSet::ConstIterator q(qpns->begin()), q_end(qpns->end()) ;
+ q != q_end ; ++q)
+ {
+ std::tr1::shared_ptr<const PackageIDSequence> id(
+ env->package_database()->fetch_repository(*r)->package_ids(*q));
+ for (PackageIDSequence::ConstIterator i(id->begin()), i_end(id->end()) ;
+ i != i_end ; ++i)
+ if ((*i)->from_repositories_key() && ((*i)->from_repositories_key()->value()->end() !=
+ (*i)->from_repositories_key()->value()->find(stringify(name))))
+ result->insert(*i);
+ }
+ }
+
+ return result;
+ }
+
+ virtual std::string as_string() const
+ {
+ return "packages originally from repository " + stringify(name);
+ }
+ };
+
struct CategoryGeneratorHandler :
AllGeneratorHandlerBase
{
@@ -244,12 +287,12 @@ namespace
virtual std::tr1::shared_ptr<const RepositoryNameSet> repositories(
const Environment * const env) const
{
- if (! spec.repository_ptr())
+ if (! spec.in_repository_ptr())
return AllGeneratorHandlerBase::repositories(env);
std::tr1::shared_ptr<RepositoryNameSet> result(new RepositoryNameSet);
- if (env->package_database()->has_repository_named(*spec.repository_ptr()))
- result->insert(*spec.repository_ptr());
+ if (env->package_database()->has_repository_named(*spec.in_repository_ptr()))
+ result->insert(*spec.in_repository_ptr());
return result;
}
@@ -505,8 +548,13 @@ generator::All::All() :
{
}
-generator::Repository::Repository(const RepositoryName & n) :
- Generator(make_shared_ptr(new RepositoryGeneratorHandler(n)))
+generator::InRepository::InRepository(const RepositoryName & n) :
+ Generator(make_shared_ptr(new InRepositoryGeneratorHandler(n)))
+{
+}
+
+generator::FromRepository::FromRepository(const RepositoryName & n) :
+ Generator(make_shared_ptr(new FromRepositoryGeneratorHandler(n)))
{
}
diff --git a/paludis/generator.hh b/paludis/generator.hh
index c60e47f..4f93f02 100644
--- a/paludis/generator.hh
+++ b/paludis/generator.hh
@@ -92,11 +92,18 @@ namespace paludis
Package(const QualifiedPackageName &);
};
- class PALUDIS_VISIBLE Repository :
+ class PALUDIS_VISIBLE FromRepository :
public Generator
{
public:
- Repository(const RepositoryName &);
+ FromRepository(const RepositoryName &);
+ };
+
+ class PALUDIS_VISIBLE InRepository :
+ public Generator
+ {
+ public:
+ InRepository(const RepositoryName &);
};
class PALUDIS_VISIBLE Category :
diff --git a/paludis/generator_TEST.cc b/paludis/generator_TEST.cc
index 4fc5de1..0c096f2 100644
--- a/paludis/generator_TEST.cc
+++ b/paludis/generator_TEST.cc
@@ -214,7 +214,7 @@ namespace test_cases
struct RepositoryGeneratorTestCase : GeneratorTestCaseBase
{
RepositoryGeneratorTestCase() :
- GeneratorTestCaseBase("repository", generator::Repository(RepositoryName("repo1")))
+ GeneratorTestCaseBase("repository", generator::InRepository(RepositoryName("repo1")))
{
}
@@ -229,7 +229,7 @@ namespace test_cases
struct NoRepositoryGeneratorTestCase : GeneratorTestCaseBase
{
NoRepositoryGeneratorTestCase() :
- GeneratorTestCaseBase("no repository", generator::Repository(RepositoryName("repo3")))
+ GeneratorTestCaseBase("no repository", generator::InRepository(RepositoryName("repo3")))
{
}
diff --git a/paludis/hook.se b/paludis/hook.se
index 6ea3773..02ab8f1 100644
--- a/paludis/hook.se
+++ b/paludis/hook.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_HookOutputDestination()
diff --git a/paludis/hook.sr b/paludis/hook.sr
index 43c5b26..6bb95e1 100644
--- a/paludis/hook.sr
+++ b/paludis/hook.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_HookResult()
diff --git a/paludis/hooker.bash b/paludis/hooker.bash
index c97e56c..753161c 100755
--- a/paludis/hooker.bash
+++ b/paludis/hooker.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/hooker_TEST_cleanup.sh b/paludis/hooker_TEST_cleanup.sh
index 6cf70d1..5411689 100755
--- a/paludis/hooker_TEST_cleanup.sh
+++ b/paludis/hooker_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d hooker_TEST_dir ] ; then
diff --git a/paludis/hooker_TEST_setup.sh b/paludis/hooker_TEST_setup.sh
index 19c382c..1ae83be 100755
--- a/paludis/hooker_TEST_setup.sh
+++ b/paludis/hooker_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir hooker_TEST_dir || exit 2
diff --git a/paludis/host_tuple_name.sr b/paludis/host_tuple_name.sr
index b831a97..1458ae7 100644
--- a/paludis/host_tuple_name.sr
+++ b/paludis/host_tuple_name.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_HostTupleName()
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index 0f6921c..ebc0a88 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -69,7 +69,6 @@ namespace paludis
DepList dep_list;
FetchActionOptions fetch_options;
InstallActionOptions install_options;
- UninstallActionOptions uninstall_options;
std::list<std::string> raw_targets;
std::tr1::shared_ptr<ConstTreeSequence<SetSpecTree, AllDepSpec> > targets;
@@ -99,12 +98,10 @@ namespace paludis
),
install_options(
InstallActionOptions::named_create()
- (k::no_config_protect(), false)
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
(k::destination(), std::tr1::shared_ptr<Repository>())
),
- uninstall_options(false),
targets(new ConstTreeSequence<SetSpecTree, AllDepSpec>(std::tr1::shared_ptr<AllDepSpec>(new AllDepSpec))),
destinations(d),
pretend(false),
@@ -385,7 +382,7 @@ InstallTask::_add_target(const std::string & target)
try
{
std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(parse_user_package_dep_spec(target,
- _imp->env, UserPackageDepSpecOptions() + updso_throw_if_set,
+ _imp->env, UserPackageDepSpecOptions() + updso_throw_if_set + updso_allow_wildcards,
filter::SupportsAction<InstallAction>())));
if (_imp->had_set_targets)
@@ -394,9 +391,38 @@ InstallTask::_add_target(const std::string & target)
if (! _imp->override_target_type)
_imp->dep_list.options()->target_type = dl_target_package;
- spec->set_tag(std::tr1::shared_ptr<const DepTag>(new TargetDepTag));
- _imp->targets->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(
- new TreeLeaf<SetSpecTree, PackageDepSpec>(spec)));
+ if (spec->package_ptr())
+ {
+ /* no wildcards */
+ spec->set_tag(std::tr1::shared_ptr<const DepTag>(new TargetDepTag));
+ _imp->targets->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(
+ new TreeLeaf<SetSpecTree, PackageDepSpec>(spec)));
+ }
+ else
+ {
+ std::tr1::shared_ptr<const PackageIDSequence> names((*_imp->env)[selection::BestVersionOnly(
+ generator::Matches(*spec) | filter::SupportsAction<InstallAction>())]);
+
+ if (names->empty())
+ {
+ /* no match. we'll get an error from this later anyway. */
+ spec->set_tag(std::tr1::shared_ptr<const DepTag>(new TargetDepTag));
+ _imp->targets->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(
+ new TreeLeaf<SetSpecTree, PackageDepSpec>(spec)));
+ }
+ else
+ for (PackageIDSequence::ConstIterator i(names->begin()), i_end(names->end()) ;
+ i != i_end ; ++i)
+ {
+ PartiallyMadePackageDepSpec p(*spec);
+ p.package((*i)->name());
+ std::tr1::shared_ptr<PackageDepSpec> specn(new PackageDepSpec(p));
+ specn->set_tag(std::tr1::shared_ptr<const DepTag>(new TargetDepTag));
+ _imp->targets->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(
+ new TreeLeaf<SetSpecTree, PackageDepSpec>(specn)));
+ }
+ }
+
_imp->raw_targets.push_back(stringify(*spec));
}
catch (const GotASetNotAPackageDepSpec &)
@@ -435,7 +461,7 @@ InstallTask::_add_package_id(const std::tr1::shared_ptr<const PackageID> & targe
.package(target->name())
.version_requirement(VersionRequirement(vo_equal, target->version()))
.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(target->slot())))
- .repository(target->repository()->name())));
+ .in_repository(target->repository()->name())));
spec->set_tag(std::tr1::shared_ptr<const DepTag>(new TargetDepTag));
_imp->targets->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(
@@ -720,7 +746,7 @@ InstallTask::_one(const DepList::Iterator dep, const int x, const int y, const i
generator::Matches(make_package_dep_spec()
.package(dep->package_id->name())
.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(dep->package_id->slot())))
- .repository(dep->destination->name())) |
+ .in_repository(dep->destination->name())) |
filter::SupportsAction<UninstallAction>())];
// don't clean the thing we just installed
@@ -756,7 +782,7 @@ InstallTask::_one(const DepList::Iterator dep, const int x, const int y, const i
try
{
- UninstallAction uninstall_action(_imp->uninstall_options);
+ UninstallAction uninstall_action;
(*c)->perform_action(uninstall_action);
}
catch (const UninstallActionError & e)
@@ -1084,13 +1110,6 @@ InstallTask::dep_list() const
}
void
-InstallTask::set_no_config_protect(const bool value)
-{
- _imp->install_options[k::no_config_protect()] = value;
- _imp->uninstall_options[k::no_config_protect()] = value;
-}
-
-void
InstallTask::set_fetch_only(const bool value)
{
_imp->fetch_only = value;
diff --git a/paludis/install_task.hh b/paludis/install_task.hh
index cc5ef28..286d0c7 100644
--- a/paludis/install_task.hh
+++ b/paludis/install_task.hh
@@ -94,7 +94,6 @@ namespace paludis
///\name DepList and Install behaviour options
///\{
- void set_no_config_protect(const bool value);
void set_fetch_only(const bool value);
void set_pretend(const bool value);
void set_preserve_world(const bool value);
diff --git a/paludis/install_task.se b/paludis/install_task.se
index de8c1a7..a78a140 100644
--- a/paludis/install_task.se
+++ b/paludis/install_task.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_InstallTaskContinueOnFailure()
diff --git a/paludis/match_package.cc b/paludis/match_package.cc
index 4d115d5..b00b34e 100644
--- a/paludis/match_package.cc
+++ b/paludis/match_package.cc
@@ -25,7 +25,9 @@
#include <paludis/package_database.hh>
#include <paludis/package_id.hh>
#include <paludis/slot_requirement.hh>
+#include <paludis/metadata_key.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/set.hh>
#include <tr1/functional>
#include <algorithm>
@@ -107,10 +109,20 @@ paludis::match_package(
;
}
- if (spec.repository_ptr())
- if (*spec.repository_ptr() != entry.repository()->name())
+ if (spec.in_repository_ptr())
+ if (*spec.in_repository_ptr() != entry.repository()->name())
return false;
+ if (spec.from_repository_ptr())
+ {
+ if (! entry.from_repositories_key())
+ return false;
+
+ if (entry.from_repositories_key()->value()->end() == entry.from_repositories_key()->value()->find(
+ stringify(*spec.from_repository_ptr())))
+ return false;
+ }
+
if (spec.slot_requirement_ptr())
{
SlotRequirementChecker v(entry.slot());
diff --git a/paludis/merger.se b/paludis/merger.se
index 766455d..2054621 100644
--- a/paludis/merger.se
+++ b/paludis/merger.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_MergeStatusFlag()
diff --git a/paludis/merger_TEST_cleanup.sh b/paludis/merger_TEST_cleanup.sh
index 44df00e..5acd496 100755
--- a/paludis/merger_TEST_cleanup.sh
+++ b/paludis/merger_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d merger_TEST_dir ] ; then
diff --git a/paludis/merger_TEST_setup.sh b/paludis/merger_TEST_setup.sh
index 22b89cc..b716a5d 100755
--- a/paludis/merger_TEST_setup.sh
+++ b/paludis/merger_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir merger_TEST_dir || exit 2
diff --git a/paludis/merger_entry_type.se b/paludis/merger_entry_type.se
index 90509de..263e587 100644
--- a/paludis/merger_entry_type.se
+++ b/paludis/merger_entry_type.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_EntryType()
diff --git a/paludis/metadata_key.se b/paludis/metadata_key.se
index 234f92c..28df6c0 100644
--- a/paludis/metadata_key.se
+++ b/paludis/metadata_key.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_MetadataKeyType()
diff --git a/paludis/name.se b/paludis/name.se
index c0c6019..32f177e 100644
--- a/paludis/name.se
+++ b/paludis/name.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_UseFlagState()
diff --git a/paludis/name.sr b/paludis/name.sr
index 88604ef..9ed0bde 100644
--- a/paludis/name.sr
+++ b/paludis/name.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_QualifiedPackageName()
diff --git a/paludis/package_id.hh b/paludis/package_id.hh
index 54aaaa0..34a0e0b 100644
--- a/paludis/package_id.hh
+++ b/paludis/package_id.hh
@@ -257,16 +257,11 @@ namespace paludis
virtual const std::tr1::shared_ptr<const MetadataTimeKey> installed_time_key() const = 0;
/**
- * The source_origin_key, if non-zero, contains a string describing
- * the source repository whence a package originated.
+ * The from_repositories key, if non-zero, contains the set of repositories
+ * that the ID is 'from'. An ID can be 'from' multiple repositories if, for
+ * example, it was built via a binary package.
*/
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > source_origin_key() const = 0;
-
- /**
- * The binary_origin_key, if non-zero, contains a string describing
- * the binary repository whence a package originated.
- */
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_origin_key() const = 0;
+ virtual const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const = 0;
/**
* The fs_location_key, if non-zero, indicates the filesystem
diff --git a/paludis/package_id.se b/paludis/package_id.se
index 841acba..7948383 100644
--- a/paludis/package_id.se
+++ b/paludis/package_id.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_PackageIDCanonicalForm()
diff --git a/paludis/qa.se b/paludis/qa.se
index 11210c3..d9e816b 100644
--- a/paludis/qa.se
+++ b/paludis/qa.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_QAMessageLevel()
diff --git a/paludis/qa.sr b/paludis/qa.sr
index 50d3df1..f6290c0 100644
--- a/paludis/qa.sr
+++ b/paludis/qa.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_QAMessage()
diff --git a/paludis/range_rewriter.cc b/paludis/range_rewriter.cc
index 87881a4..42dfb7f 100644
--- a/paludis/range_rewriter.cc
+++ b/paludis/range_rewriter.cc
@@ -122,7 +122,12 @@ namespace
return std::tr1::shared_ptr<const SlotRequirement>();
}
- virtual std::tr1::shared_ptr<const RepositoryName> repository_ptr() const
+ virtual std::tr1::shared_ptr<const RepositoryName> from_repository_ptr() const
+ {
+ return std::tr1::shared_ptr<const RepositoryName>();
+ }
+
+ virtual std::tr1::shared_ptr<const RepositoryName> in_repository_ptr() const
{
return std::tr1::shared_ptr<const RepositoryName>();
}
@@ -217,8 +222,8 @@ RangeRewriter::visit_leaf(const PackageDepSpec & a)
if (_imp->invalid)
return;
- if (a.additional_requirements_ptr() || a.slot_requirement_ptr() || a.repository_ptr() || a.package_name_part_ptr()
- || a.category_name_part_ptr() || ! a.version_requirements_ptr() || ! a.package_ptr())
+ if (a.additional_requirements_ptr() || a.slot_requirement_ptr() || a.in_repository_ptr() || a.package_name_part_ptr()
+ || a.category_name_part_ptr() || ! a.version_requirements_ptr() || ! a.package_ptr() || a.from_repository_ptr())
{
_imp->invalid = true;
return;
diff --git a/paludis/report_task.cc b/paludis/report_task.cc
index 89b47f7..ef3772e 100644
--- a/paludis/report_task.cc
+++ b/paludis/report_task.cc
@@ -194,28 +194,37 @@ ReportTask::execute()
v != v_end ; ++v)
{
bool is_missing(false);
- std::tr1::shared_ptr<const PackageID> origin;
- std::tr1::shared_ptr<RepositoryName> repo_name;
+ std::tr1::shared_ptr<PackageIDSequence> origins;
- if ((*v)->source_origin_key())
+ if ((*v)->from_repositories_key())
{
- repo_name.reset(new RepositoryName((*v)->source_origin_key()->value()));
-
- std::tr1::shared_ptr<const PackageIDSequence> installable(
- (*e)[selection::BestVersionOnly(
- generator::Matches(make_package_dep_spec()
- .package((*v)->name())
- .version_requirement(VersionRequirement(vo_equal, (*v)->version()))
- .repository(*repo_name)) |
- filter::SupportsAction<InstallAction>())]);
-
- if (installable->empty())
- is_missing = ! ((*v)->transient_key() && (*v)->transient_key()->value());
- else
- origin = *installable->last();
+ is_missing = ! ((*v)->transient_key() && (*v)->transient_key()->value());
+
+ for (Set<std::string>::ConstIterator o((*v)->from_repositories_key()->value()->begin()),
+ o_end((*v)->from_repositories_key()->value()->end()) ;
+ o != o_end ; ++o)
+ {
+ std::tr1::shared_ptr<const PackageIDSequence> installable(
+ (*e)[selection::BestVersionOnly(
+ generator::Matches(make_package_dep_spec()
+ .package((*v)->name())
+ .version_requirement(VersionRequirement(vo_equal, (*v)->version()))
+ .in_repository(RepositoryName(*o))) |
+ filter::SupportsAction<InstallAction>())]);
+
+ if (! installable->empty())
+ {
+ is_missing = false;
+ if (! origins)
+ origins.reset(new PackageIDSequence);
+ origins->push_back(*installable->last());
+ }
+ }
}
- bool is_masked(origin && origin->masked());
+ bool is_masked(origins && origins->end() != std::find_if(origins->begin(),
+ origins->end(), std::tr1::bind(std::tr1::mem_fn(&PackageID::masked),
+ std::tr1::placeholders::_1)));
bool is_vulnerable(false);
bool is_unused(false);
@@ -230,7 +239,7 @@ ReportTask::execute()
{
on_report_package_failure_pre(*v);
if (is_masked)
- on_report_package_is_masked(*v, origin);
+ on_report_package_is_masked(*v, origins);
if (is_vulnerable)
{
on_report_package_is_vulnerable_pre(*v);
@@ -239,7 +248,7 @@ ReportTask::execute()
on_report_package_is_vulnerable_post(*v);
}
if (is_missing)
- on_report_package_is_missing(*v, *repo_name);
+ on_report_package_is_missing(*v);
if (is_unused)
on_report_package_is_unused(*v);
on_report_package_failure_post(*v);
@@ -255,3 +264,4 @@ ReportTask::execute()
on_report_all_post();
}
+
diff --git a/paludis/report_task.hh b/paludis/report_task.hh
index e836c70..bce701b 100644
--- a/paludis/report_task.hh
+++ b/paludis/report_task.hh
@@ -73,12 +73,11 @@ namespace paludis
virtual void on_report_package_success(const std::tr1::shared_ptr<const PackageID> & id) = 0;
virtual void on_report_package_failure_pre(const std::tr1::shared_ptr<const PackageID> & id) = 0;
virtual void on_report_package_is_masked(const std::tr1::shared_ptr<const PackageID> & id,
- const std::tr1::shared_ptr<const PackageID> & origin) = 0;
+ const std::tr1::shared_ptr<const PackageIDSequence> & origins) = 0;
virtual void on_report_package_is_vulnerable_pre(const std::tr1::shared_ptr<const PackageID> & id) = 0;
virtual void on_report_package_is_vulnerable(const std::tr1::shared_ptr<const PackageID> & id, const GLSADepTag & glsa_tag) = 0;
virtual void on_report_package_is_vulnerable_post(const std::tr1::shared_ptr<const PackageID> & id) = 0;
- virtual void on_report_package_is_missing(const std::tr1::shared_ptr<const PackageID> & id,
- const RepositoryName & repo_name) = 0;
+ virtual void on_report_package_is_missing(const std::tr1::shared_ptr<const PackageID> & id) = 0;
virtual void on_report_package_is_unused(const std::tr1::shared_ptr<const PackageID> & id) = 0;
virtual void on_report_package_failure_post(const std::tr1::shared_ptr<const PackageID> & id) = 0;
virtual void on_report_check_package_post(const QualifiedPackageName & p) = 0;
diff --git a/paludis/repositories/cran/cran/cran.bash b/paludis/repositories/cran/cran/cran.bash
index e472088..ba70ffc 100644
--- a/paludis/repositories/cran/cran/cran.bash
+++ b/paludis/repositories/cran/cran/cran.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006,2007 Danny van Dyk
diff --git a/paludis/repositories/cran/cran_installed_repository.sr b/paludis/repositories/cran/cran_installed_repository.sr
index c892bb2..3b56196 100644
--- a/paludis/repositories/cran/cran_installed_repository.sr
+++ b/paludis/repositories/cran/cran_installed_repository.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_CRANInstalledRepositoryParams()
diff --git a/paludis/repositories/cran/cran_package_id.cc b/paludis/repositories/cran/cran_package_id.cc
index 3216d76..0212b73 100644
--- a/paludis/repositories/cran/cran_package_id.cc
+++ b/paludis/repositories/cran/cran_package_id.cc
@@ -409,16 +409,10 @@ CRANPackageID::installed_time_key() const
return std::tr1::shared_ptr<const MetadataTimeKey>();
}
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-CRANPackageID::source_origin_key() const
-{
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
-}
-
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-CRANPackageID::binary_origin_key() const
+const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
+CRANPackageID::from_repositories_key() const
{
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
+ return std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >();
}
std::size_t
diff --git a/paludis/repositories/cran/cran_package_id.hh b/paludis/repositories/cran/cran_package_id.hh
index e27caba..daaecc3 100644
--- a/paludis/repositories/cran/cran_package_id.hh
+++ b/paludis/repositories/cran/cran_package_id.hh
@@ -71,12 +71,11 @@ namespace paludis
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const Contents> > > contents_key() const;
virtual const std::tr1::shared_ptr<const MetadataTimeKey> installed_time_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > source_origin_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_origin_key() const;
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<PackageIDSequence> > contains_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const PackageID> > > contained_in_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > fs_location_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<bool> > transient_key() const;
+ virtual const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const;
virtual bool supports_action(const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/cran/cran_repository.sr b/paludis/repositories/cran/cran_repository.sr
index fb5732d..6da3346 100644
--- a/paludis/repositories/cran/cran_repository.sr
+++ b/paludis/repositories/cran/cran_repository.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_CRANRepositoryParams()
diff --git a/paludis/repositories/cran/package_dep_spec.cc b/paludis/repositories/cran/package_dep_spec.cc
index bb0e03c..2ed4c6c 100644
--- a/paludis/repositories/cran/package_dep_spec.cc
+++ b/paludis/repositories/cran/package_dep_spec.cc
@@ -95,7 +95,12 @@ namespace
return std::tr1::shared_ptr<const SlotRequirement>();
}
- virtual std::tr1::shared_ptr<const RepositoryName> repository_ptr() const
+ virtual std::tr1::shared_ptr<const RepositoryName> from_repository_ptr() const
+ {
+ return std::tr1::shared_ptr<const RepositoryName>();
+ }
+
+ virtual std::tr1::shared_ptr<const RepositoryName> in_repository_ptr() const
{
return std::tr1::shared_ptr<const RepositoryName>();
}
diff --git a/paludis/repositories/e/Makefile.am b/paludis/repositories/e/Makefile.am
index afc8034..49547c6 100644
--- a/paludis/repositories/e/Makefile.am
+++ b/paludis/repositories/e/Makefile.am
@@ -71,6 +71,7 @@ paludis_repositories_e_include_HEADERS = \
exndbam_repository.hh \
exndbam_repository-sr.hh \
fetch_visitor.hh \
+ info_metadata_key.hh \
pretend_fetch_visitor.hh \
fix_locked_dependencies.hh \
glsa-sr.hh \
@@ -122,6 +123,7 @@ libpaludiserepository_la_SOURCES = \
exndbam_repository.cc \
exheres_layout.cc \
fetch_visitor.cc \
+ info_metadata_key.cc \
pretend_fetch_visitor.cc \
fix_locked_dependencies.cc \
glsa.cc \
diff --git a/paludis/repositories/e/dep_parser.se b/paludis/repositories/e/dep_parser.se
index bf3c9eb..4dd2555 100644
--- a/paludis/repositories/e/dep_parser.se
+++ b/paludis/repositories/e/dep_parser.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_DependencySpecTreeParseOption()
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 707b8d9..4c0c5a2 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -25,6 +25,7 @@
#include <paludis/repositories/e/ebuild.hh>
#include <paludis/repositories/e/e_repository.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/visitor_cast.hh>
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/stringify.hh>
@@ -407,38 +408,52 @@ EInstalledRepository::perform_info(const std::tr1::shared_ptr<const ERepositoryI
continue;
/* try to find an info_vars file from the original repo */
- FSEntry i("/dev/null");
- if (id->source_origin_key())
+ std::tr1::shared_ptr<const Set<std::string> > i;
+ if (id->from_repositories_key())
{
- RepositoryName rn(id->source_origin_key()->value());
- if (_imp->params.environment->package_database()->has_repository_named(rn))
+ for (Set<std::string>::ConstIterator o(id->from_repositories_key()->value()->begin()),
+ o_end(id->from_repositories_key()->value()->end()) ;
+ o != o_end ; ++o)
{
- const std::tr1::shared_ptr<const Repository> r(_imp->params.environment->package_database()->fetch_repository(rn));
- if ((*r)[k::e_interface()])
+ RepositoryName rn(*o);
+ if (_imp->params.environment->package_database()->has_repository_named(rn))
{
- i = (*r)[k::e_interface()]->info_variables_file((*r)[k::e_interface()]->params().location / "profiles");
-
- /* also try its master, if it has one */
- if ((! i.exists()) && (*r)[k::e_interface()]->params().master_repository)
- i = (*r)[k::e_interface()]->info_variables_file(
- (*r)[k::e_interface()]->params().master_repository->params().location / "profiles");
+ const std::tr1::shared_ptr<const Repository> r(
+ _imp->params.environment->package_database()->fetch_repository(rn));
+ Repository::MetadataConstIterator m(r->find_metadata("info_vars"));
+ if (r->end_metadata() != m)
+ {
+ const MetadataCollectionKey<Set<std::string> > * const mm(
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**m));
+ if (mm)
+ {
+ i = mm->value();
+ break;
+ }
+ }
}
}
}
/* try to find an info_vars file from any repo */
- if (i == FSEntry("/dev/null"))
+ if (! i)
{
- for (PackageDatabase::RepositoryConstIterator r(_imp->params.environment->package_database()->begin_repositories()),
+ for (PackageDatabase::RepositoryConstIterator
+ r(_imp->params.environment->package_database()->begin_repositories()),
r_end(_imp->params.environment->package_database()->end_repositories()) ;
r != r_end ; ++r)
{
- if (! (**r)[k::e_interface()])
- continue;
-
- i = (**r)[k::e_interface()]->info_variables_file((**r)[k::e_interface()]->params().location / "profiles");
- if (i.exists())
- break;
+ Repository::MetadataConstIterator m((*r)->find_metadata("info_vars"));
+ if ((*r)->end_metadata() != m)
+ {
+ const MetadataCollectionKey<Set<std::string> > * const mm(
+ visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**m));
+ if (mm)
+ {
+ i = mm->value();
+ break;
+ }
+ }
}
}
@@ -463,7 +478,7 @@ EInstalledRepository::perform_info(const std::tr1::shared_ptr<const ERepositoryI
(k::use_expand(), "")
(k::expand_vars(), make_shared_ptr(new Map<std::string, std::string>))
(k::profiles(), make_shared_ptr(new FSEntrySequence))
- (k::info_vars(), i)
+ (k::info_vars(), i ? i : make_shared_ptr(new const Set<std::string>))
(k::use_ebuild_file(), false)
(k::load_environment(), load_env.get()));
diff --git a/paludis/repositories/e/e_installed_repository.hh b/paludis/repositories/e/e_installed_repository.hh
index 319ef36..8a972ab 100644
--- a/paludis/repositories/e/e_installed_repository.hh
+++ b/paludis/repositories/e/e_installed_repository.hh
@@ -118,7 +118,7 @@ namespace paludis
///\{
virtual void perform_uninstall(const std::tr1::shared_ptr<const erepository::ERepositoryID> & id,
- const UninstallActionOptions & o, bool reinstalling) const = 0;
+ bool reinstalling) const = 0;
virtual void perform_config(const std::tr1::shared_ptr<const erepository::ERepositoryID> & id) const;
diff --git a/paludis/repositories/e/e_installed_repository.sr b/paludis/repositories/e/e_installed_repository.sr
index c9914db..8383368 100644
--- a/paludis/repositories/e/e_installed_repository.sr
+++ b/paludis/repositories/e/e_installed_repository.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_EInstalledRepositoryParams()
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index 0644f59..667edd7 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -91,8 +91,7 @@ namespace paludis
std::tr1::shared_ptr<const MetadataValueKey<std::string> > short_description;
std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const Contents> > > contents;
std::tr1::shared_ptr<const MetadataTimeKey> installed_time;
- std::tr1::shared_ptr<const MetadataValueKey<std::string> > source_origin;
- std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_origin;
+ std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories;
std::tr1::shared_ptr<const MetadataValueKey<std::string> > asflags;
std::tr1::shared_ptr<const MetadataValueKey<std::string> > cbuild;
@@ -150,7 +149,6 @@ EInstalledRepositoryID::need_keys_added() const
return;
_imp->has_keys = true;
-
// fs_location key could have been loaded by the ::fs_location_key() already. keep this
// at the top, other keys use it.
if (! _imp->fs_location)
@@ -302,24 +300,18 @@ EInstalledRepositoryID::need_keys_added() const
_imp->dir / contents_filename(), mkt_normal));
add_metadata_key(_imp->installed_time);
+ std::tr1::shared_ptr<Set<std::string> > from_repositories_value(new Set<std::string>);
if ((_imp->dir / "REPOSITORY").exists())
- {
- _imp->source_origin.reset(new LiteralMetadataValueKey<std::string> ("REPOSITORY", "Source repository",
- mkt_normal, file_contents(_imp->dir / "REPOSITORY")));
- add_metadata_key(_imp->source_origin);
- }
- else if ((_imp->dir / "repository").exists())
- {
- _imp->source_origin.reset(new LiteralMetadataValueKey<std::string> ("repository", "Source repository",
- mkt_normal, file_contents(_imp->dir / "repository")));
- add_metadata_key(_imp->source_origin);
- }
-
+ from_repositories_value->insert(file_contents(_imp->dir / "REPOSITORY"));
+ if ((_imp->dir / "repository").exists())
+ from_repositories_value->insert(file_contents(_imp->dir / "repository"));
if ((_imp->dir / "BINARY_REPOSITORY").exists())
+ from_repositories_value->insert(file_contents(_imp->dir / "BINARY_REPOSITORY"));
+ if (! from_repositories_value->empty())
{
- _imp->binary_origin.reset(new LiteralMetadataValueKey<std::string> ("BINARY_REPOSITORY", "Binary repository",
- mkt_normal, file_contents(_imp->dir / "BINARY_REPOSITORY")));
- add_metadata_key(_imp->binary_origin);
+ _imp->from_repositories.reset(new LiteralMetadataStringSetKey("REPOSITORIES",
+ "From repositories", mkt_normal, from_repositories_value));
+ add_metadata_key(_imp->from_repositories);
}
if ((_imp->dir / "ASFLAGS").exists())
@@ -605,18 +597,11 @@ EInstalledRepositoryID::installed_time_key() const
return _imp->installed_time;
}
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-EInstalledRepositoryID::source_origin_key() const
-{
- need_keys_added();
- return _imp->source_origin;
-}
-
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-EInstalledRepositoryID::binary_origin_key() const
+const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
+EInstalledRepositoryID::from_repositories_key() const
{
need_keys_added();
- return _imp->binary_origin;
+ return _imp->from_repositories;
}
const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> >
@@ -717,10 +702,9 @@ namespace
{
}
- void visit(const UninstallAction & a)
+ void visit(const UninstallAction &)
{
- std::tr1::static_pointer_cast<const EInstalledRepository>(id->repository())->perform_uninstall(id,
- a.options, false);
+ std::tr1::static_pointer_cast<const EInstalledRepository>(id->repository())->perform_uninstall(id, false);
}
void visit(const InstalledAction &)
diff --git a/paludis/repositories/e/e_installed_repository_id.hh b/paludis/repositories/e/e_installed_repository_id.hh
index 1cbe5b7..d453368 100644
--- a/paludis/repositories/e/e_installed_repository_id.hh
+++ b/paludis/repositories/e/e_installed_repository_id.hh
@@ -73,11 +73,10 @@ namespace paludis
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const Contents> > > contents_key() const;
virtual const std::tr1::shared_ptr<const MetadataTimeKey> installed_time_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > source_origin_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_origin_key() const;
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<PackageIDSequence> > contains_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const PackageID> > > contained_in_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > fs_location_key() const;
+ virtual const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const;
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<UseFlagNameSet> > use_key() const;
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > inherited_key() const;
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc
index 2bb03bf..1114698 100644
--- a/paludis/repositories/e/e_key.cc
+++ b/paludis/repositories/e/e_key.cc
@@ -959,10 +959,19 @@ EInheritedKey::value() const
return _imp->value;
}
+namespace
+{
+ std::string format_string(const std::string & i, const Formatter<std::string> & f)
+ {
+ return f.format(i, format::Plain());
+ }
+}
+
std::string
-EInheritedKey::pretty_print_flat(const Formatter<std::string> &) const
+EInheritedKey::pretty_print_flat(const Formatter<std::string> & f) const
{
- return join(value()->begin(), value()->end(), " ");
+ using namespace std::tr1::placeholders;
+ return join(value()->begin(), value()->end(), " ", std::tr1::bind(&format_string, _1, f));
}
namespace paludis
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index 2308d76..ae6fb3c 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -33,6 +33,7 @@
#include <paludis/repositories/e/eapi.hh>
#include <paludis/repositories/e/use_desc.hh>
#include <paludis/repositories/e/layout.hh>
+#include <paludis/repositories/e/info_metadata_key.hh>
#ifdef ENABLE_QA
# include <paludis/repositories/e/qa/qa_controller.hh>
@@ -52,10 +53,6 @@
#include <paludis/mask.hh>
#include <paludis/qa.hh>
#include <paludis/elike_package_dep_spec.hh>
-#include <paludis/selection.hh>
-#include <paludis/generator.hh>
-#include <paludis/filter.hh>
-#include <paludis/filtered_generator.hh>
#include <paludis/util/fs_entry.hh>
#include <paludis/util/log.hh>
@@ -113,79 +110,6 @@ typedef std::tr1::unordered_multimap<std::string, std::string, Hash<std::string>
typedef std::tr1::unordered_map<QualifiedPackageName, std::tr1::shared_ptr<const PackageDepSpec>, Hash<QualifiedPackageName> > VirtualsMap;
typedef std::list<RepositoryEInterface::ProfilesDescLine> ProfilesDesc;
-namespace
-{
- class PkgInfoSectionKey :
- public MetadataSectionKey
- {
- private:
- mutable Mutex _mutex;
- mutable bool _added;
-
- const Environment * const _env;
- const FSEntry _f;
- const std::string & _p;
-
- protected:
- virtual void need_keys_added() const
- {
- Lock l(_mutex);
- if (_added)
- return;
- _added = true;
-
- // don't inherit from master_repository, just causes clutter
- std::set<std::string> info_pkgs;
- if (_f.exists())
- {
- LineConfigFile vars(_f, LineConfigFileOptions() + lcfo_disallow_continuations);
- info_pkgs.insert(vars.begin(), vars.end());
- }
-
- if (! info_pkgs.empty())
- {
- for (std::set<std::string>::const_iterator i(info_pkgs.begin()),
- i_end(info_pkgs.end()) ; i != i_end ; ++i)
- {
- std::tr1::shared_ptr<MetadataKey> key;
- std::tr1::shared_ptr<const PackageIDSequence> q((*_env)[selection::AllVersionsSorted(
- generator::Matches(parse_elike_package_dep_spec(*i,
- (*(*erepository::EAPIData::get_instance()->eapi_from_string(_p))
- [k::supported()])[k::package_dep_spec_parse_options()],
- std::tr1::shared_ptr<const PackageID>())) |
- filter::InstalledAtRoot(_env->root()))]);
- if (q->empty())
- key.reset(new LiteralMetadataValueKey<std::string>(*i, *i, mkt_normal, "(none)"));
- else
- {
- using namespace std::tr1::placeholders;
- std::tr1::shared_ptr<Set<std::string> > s(new Set<std::string>);
- std::transform(indirect_iterator(q->begin()), indirect_iterator(q->end()), s->inserter(),
- std::tr1::bind(std::tr1::mem_fn(&PackageID::canonical_form), _1, idcf_version));
- key.reset(new LiteralMetadataStringSetKey(*i, *i, mkt_normal, s));
- }
-
- add_metadata_key(key);
- }
- }
- }
-
- public:
- PkgInfoSectionKey(const Environment * const e, const FSEntry & f, const std::string & p) :
- MetadataSectionKey("info_pkgs", "Package information", mkt_normal),
- _added(false),
- _env(e),
- _f(f),
- _p(p)
- {
- }
-
- ~PkgInfoSectionKey()
- {
- }
- };
-}
-
namespace paludis
{
/**
@@ -266,6 +190,7 @@ namespace paludis
std::tr1::shared_ptr<const MetadataValueKey<std::string> > profile_eapi_key;
std::tr1::shared_ptr<const MetadataValueKey<std::string> > use_manifest_key;
std::tr1::shared_ptr<const MetadataSectionKey> info_pkgs_key;
+ std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > info_vars_key;
std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_destination_key;
std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_src_uri_prefix_key;
std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_keywords;
@@ -335,10 +260,21 @@ namespace paludis
"profile_eapi", "profile_eapi", mkt_normal, params.profile_eapi)),
use_manifest_key(new LiteralMetadataValueKey<std::string> (
"use_manifest", "use_manifest", mkt_normal, stringify(params.use_manifest))),
- info_pkgs_key((layout->info_packages_file(params.location / "profiles")).exists() ?
- std::tr1::shared_ptr<MetadataSectionKey>(new PkgInfoSectionKey(
- params.environment, layout->info_packages_file(params.location / "profiles"), params.profile_eapi)) :
- std::tr1::shared_ptr<MetadataSectionKey>()),
+ info_pkgs_key(layout->info_packages_files()->end() != std::find_if(layout->info_packages_files()->begin(),
+ layout->info_packages_files()->end(),
+ std::tr1::bind(std::tr1::mem_fn(&FSEntry::is_regular_file_or_symlink_to_regular_file),
+ std::tr1::placeholders::_1)) ?
+ make_shared_ptr(new erepository::InfoPkgsMetadataKey(params.environment, layout->info_packages_files(),
+ params.profile_eapi)) :
+ std::tr1::shared_ptr<erepository::InfoPkgsMetadataKey>()
+ ),
+ info_vars_key(layout->info_variables_files()->end() != std::find_if(layout->info_variables_files()->begin(),
+ layout->info_variables_files()->end(),
+ std::tr1::bind(std::tr1::mem_fn(&FSEntry::is_regular_file_or_symlink_to_regular_file),
+ std::tr1::placeholders::_1)) ?
+ make_shared_ptr(new erepository::InfoVarsMetadataKey(layout->info_variables_files())) :
+ std::tr1::shared_ptr<erepository::InfoVarsMetadataKey>()
+ ),
binary_destination_key(new LiteralMetadataValueKey<std::string> (
"binary_destination", "binary_destination", mkt_normal, stringify(params.binary_destination))),
binary_src_uri_prefix_key(new LiteralMetadataValueKey<std::string> (
@@ -434,6 +370,7 @@ namespace
RepositoryName
fetch_repo_name(const FSEntry & tree_root)
{
+ bool illegal(false);
try
{
do
@@ -452,6 +389,10 @@ namespace
} while (false);
}
+ catch (const RepositoryNameError &)
+ {
+ illegal = true;
+ }
catch (...)
{
}
@@ -459,9 +400,14 @@ namespace
std::string modified_location(tree_root.basename());
std::replace(modified_location.begin(), modified_location.end(), '/', '-');
- Log::get_instance()->message("e.repo_name.unusable", ll_qa, lc_no_context)
- << "Couldn't open repo_name file in '" << tree_root << "/profiles/', falling back to generated name 'x-"
- << modified_location << "' (ignore this message if you have yet to sync this repository).";
+ if (illegal)
+ Log::get_instance()->message("e.repo_name.invalid", ll_qa, lc_no_context)
+ << "repo_name file in '" << tree_root << "/profiles/', specifies an illegal repository name, falling back to generated name 'x-"
+ << modified_location << "'.";
+ else
+ Log::get_instance()->message("e.repo_name.unusable", ll_qa, lc_no_context)
+ << "Couldn't open repo_name file in '" << tree_root << "/profiles/', falling back to generated name 'x-"
+ << modified_location << "' (ignore this message if you have yet to sync this repository).";
return RepositoryName("x-" + modified_location);
}
@@ -527,6 +473,8 @@ ERepository::_add_metadata_keys() const
add_metadata_key(_imp->use_manifest_key);
if (_imp->info_pkgs_key)
add_metadata_key(_imp->info_pkgs_key);
+ if (_imp->info_vars_key)
+ add_metadata_key(_imp->info_vars_key);
add_metadata_key(_imp->binary_destination_key);
add_metadata_key(_imp->binary_src_uri_prefix_key);
add_metadata_key(_imp->binary_keywords);
@@ -1146,10 +1094,8 @@ ERepository::describe_use_flag(const UseFlagName & f,
{
std::string expand_sep(stringify((*(*erepository::EAPIData::get_instance()->eapi_from_string(
_imp->params.profile_eapi))[k::supported()])[k::ebuild_options()].use_expand_separator));
- std::tr1::shared_ptr<const FSEntrySequence> use_desc_dirs(_imp->layout->use_desc_dirs());
- for (FSEntrySequence::ConstIterator p(use_desc_dirs->begin()), p_end(use_desc_dirs->end()) ;
- p != p_end ; ++p)
- _imp->use_desc.push_back(std::tr1::shared_ptr<UseDesc>(new UseDesc(*p, expand_sep)));
+ std::tr1::shared_ptr<const UseDescFileInfoSequence> use_desc_info(_imp->layout->use_desc_files());
+ _imp->use_desc.push_back(std::tr1::shared_ptr<UseDesc>(new UseDesc(use_desc_info, expand_sep)));
}
std::string result;
@@ -1465,12 +1411,6 @@ ERepository::arch_variable() const
[k::supported()])[k::ebuild_environment_variables()][k::env_arch()];
}
-FSEntry
-ERepository::info_variables_file(const FSEntry & f) const
-{
- return layout()->info_variables_file(f);
-}
-
void
ERepository::need_keys_added() const
{
@@ -1488,3 +1428,9 @@ ERepository::installed_root_key() const
return std::tr1::shared_ptr<const MetadataValueKey<FSEntry> >();
}
+const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
+ERepository::info_vars_key() const
+{
+ return _imp->info_vars_key;
+}
+
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index d96716e..9e23b1e 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_repository.hh
@@ -207,8 +207,6 @@ namespace paludis
const ERepositoryParams & params() const;
- virtual FSEntry info_variables_file(const FSEntry &) const;
-
///\}
///\name Profile setting and querying functions
@@ -245,6 +243,7 @@ namespace paludis
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > installed_root_key() const;
+ virtual const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > info_vars_key() const;
};
}
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 39dfdb5..d9c1190 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -51,6 +51,8 @@
#include <fstream>
#include <string>
+#include "config.h"
+
using namespace test;
using namespace paludis;
@@ -1071,6 +1073,12 @@ namespace test_cases
void run()
{
+#ifdef ENABLE_VIRTUALS_REPOSITORY
+ ::setenv("PALUDIS_ENABLE_VIRTUALS_REPOSITORY", "yes", 1);
+#else
+ ::setenv("PALUDIS_ENABLE_VIRTUALS_REPOSITORY", "", 1);
+#endif
+
TestEnvironment env;
env.set_paludis_command("/bin/false");
@@ -1094,26 +1102,29 @@ namespace test_cases
installed_repo->add_version("cat", "pretend-installed", "1")->provide_key()->set_from_string("virtual/virtual-pretend-installed");
env.package_database()->add_repository(2, installed_repo);
+#ifdef ENABLE_VIRTUALS_REPOSITORY
std::tr1::shared_ptr<Map<std::string, std::string> > iv_keys(new Map<std::string, std::string>);
iv_keys->insert("root", "/");
env.package_database()->add_repository(-2, RepositoryMaker::get_instance()->find_maker("installed_virtuals")(&env,
std::tr1::bind(from_keys, iv_keys, std::tr1::placeholders::_1)));
env.package_database()->add_repository(-2, RepositoryMaker::get_instance()->find_maker("virtuals")(&env,
std::tr1::bind(from_keys, make_shared_ptr(new Map<std::string, std::string>), std::tr1::placeholders::_1)));
+#endif
InstallAction action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), installed_repo)
);
+#ifdef ENABLE_VIRTUALS_REPOSITORY
{
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=virtual/virtual-pretend-installed-0",
&env, UserPackageDepSpecOptions()))))]->last());
TEST_CHECK(id);
}
+#endif
{
TestMessageSuffix suffix("in-ebuild die", true);
@@ -1328,7 +1339,6 @@ namespace test_cases
InstallAction action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), installed_repo)
);
@@ -1393,7 +1403,6 @@ namespace test_cases
InstallAction action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), installed_repo)
);
@@ -1524,6 +1533,11 @@ namespace test_cases
void run()
{
+#ifdef ENABLE_VIRTUALS_REPOSITORY
+ ::setenv("PALUDIS_ENABLE_VIRTUALS_REPOSITORY", "yes", 1);
+#else
+ ::setenv("PALUDIS_ENABLE_VIRTUALS_REPOSITORY", "", 1);
+#endif
TestEnvironment env;
env.set_paludis_command("/bin/false");
std::tr1::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
@@ -1546,17 +1560,18 @@ namespace test_cases
installed_repo->add_version("cat", "pretend-installed", "1")->provide_key()->set_from_string("virtual/virtual-pretend-installed");
env.package_database()->add_repository(2, installed_repo);
+#ifdef ENABLE_VIRTUALS_REPOSITORY
std::tr1::shared_ptr<Map<std::string, std::string> > iv_keys(new Map<std::string, std::string>);
iv_keys->insert("root", "/");
env.package_database()->add_repository(-2, RepositoryMaker::get_instance()->find_maker("installed_virtuals")(&env,
std::tr1::bind(from_keys, iv_keys, std::tr1::placeholders::_1)));
env.package_database()->add_repository(-2, RepositoryMaker::get_instance()->find_maker("virtuals")(&env,
std::tr1::bind(from_keys, make_shared_ptr(new Map<std::string, std::string>), std::tr1::placeholders::_1)));
+#endif
InstallAction action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), installed_repo)
);
@@ -2014,7 +2029,6 @@ namespace test_cases
InstallAction action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), installed_repo)
);
diff --git a/paludis/repositories/e/e_repository_TEST_cleanup.sh b/paludis/repositories/e/e_repository_TEST_cleanup.sh
index 3fcc1aa..6a64e5f 100755
--- a/paludis/repositories/e/e_repository_TEST_cleanup.sh
+++ b/paludis/repositories/e/e_repository_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d e_repository_TEST_dir ] ; then
diff --git a/paludis/repositories/e/e_repository_TEST_setup.sh b/paludis/repositories/e/e_repository_TEST_setup.sh
index 4438138..63969b8 100755
--- a/paludis/repositories/e/e_repository_TEST_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir e_repository_TEST_dir || exit 1
@@ -786,19 +786,21 @@ pkg_setup() {
BV2=$(best_version cat/doesnotexist )
[[ "$BV2" == "" ]] || die "BV2 is $BV2"
- if ! best_version virtual/virtual-pretend-installed >/dev/null ; then
- die "failed virtual/virtual-pretend-installed"
- fi
+ if [[ -n "$PALUDIS_ENABLE_VIRTUALS_REPOSITORY" ]] ; then
+ if ! best_version virtual/virtual-pretend-installed >/dev/null ; then
+ die "failed virtual/virtual-pretend-installed"
+ fi
- BV3=$(best_version virtual/virtual-pretend-installed )
- [[ "$BV3" == "cat/pretend-installed-1" ]] || die "BV3 is $BV3"
+ BV3=$(best_version virtual/virtual-pretend-installed )
+ [[ "$BV3" == "cat/pretend-installed-1" ]] || die "BV3 is $BV3"
- if best_version virtual/virtual-doesnotexist >/dev/null ; then
- die "not failed virtual/virtual-doesnotexist"
- fi
+ if best_version virtual/virtual-doesnotexist >/dev/null ; then
+ die "not failed virtual/virtual-doesnotexist"
+ fi
- BV2=$(best_version virtual/virtual-doesnotexist )
- [[ "$BV4" == "" ]] || die "BV4 is $BV4"
+ BV2=$(best_version virtual/virtual-doesnotexist )
+ [[ "$BV4" == "" ]] || die "BV4 is $BV4"
+ fi
}
END
mkdir -p "cat/has-version"
@@ -1533,20 +1535,22 @@ pkg_setup() {
BV2=$(best_version cat/doesnotexist )
[[ "$BV2" == "" ]] || die "BV2 is $BV2"
- if ! best_version virtual/virtual-pretend-installed >/dev/null ; then
- die "failed virtual/virtual-pretend-installed"
- fi
+ if [[ -n "$PALUDIS_ENABLE_VIRTUALS_REPOSITORY" ]] ; then
+ if ! best_version virtual/virtual-pretend-installed >/dev/null ; then
+ die "failed virtual/virtual-pretend-installed"
+ fi
- BV3=$(best_version virtual/virtual-pretend-installed )
- [[ "$BV3" == "virtual/virtual-pretend-installed-1::installed-virtuals (virtual for cat/pretend-installed-1:0::installed)" ]] \
- || die "BV3 is $BV3"
+ BV3=$(best_version virtual/virtual-pretend-installed )
+ [[ "$BV3" == "virtual/virtual-pretend-installed-1::installed-virtuals (virtual for cat/pretend-installed-1:0::installed)" ]] \
+ || die "BV3 is $BV3"
- if best_version virtual/virtual-doesnotexist >/dev/null ; then
- die "not failed virtual/virtual-doesnotexist"
- fi
+ if best_version virtual/virtual-doesnotexist >/dev/null ; then
+ die "not failed virtual/virtual-doesnotexist"
+ fi
- BV2=$(best_version virtual/virtual-doesnotexist )
- [[ "$BV4" == "" ]] || die "BV4 is $BV4"
+ BV2=$(best_version virtual/virtual-doesnotexist )
+ [[ "$BV4" == "" ]] || die "BV4 is $BV4"
+ fi
}
END
mkdir -p "packages/cat/has-version"
@@ -1651,7 +1655,7 @@ DEFAULT_SRC_CONFIGURE_OPTION_WITHS="dormouse"
src_unpack() {
mkdir ${S}
cat <<'END2' > ${S}/configure
-#!/bin/bash
+#!/usr/bin/env bash
echo "${@}" | grep -q -- '--enable-enabled-hamster' || exit 1
echo "${@}" | grep -q -- '--disable-gerbil' || exit 2
echo "${@}" | grep -q -- '--nice-juicy-steak' || exit 3
diff --git a/paludis/repositories/e/e_repository_params.se b/paludis/repositories/e/e_repository_params.se
index 7420af8..6a249ec 100644
--- a/paludis/repositories/e/e_repository_params.se
+++ b/paludis/repositories/e/e_repository_params.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_UseManifest()
diff --git a/paludis/repositories/e/e_repository_params.sr b/paludis/repositories/e/e_repository_params.sr
index 1bc7a51..e067349 100644
--- a/paludis/repositories/e/e_repository_params.sr
+++ b/paludis/repositories/e/e_repository_params.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_ERepositoryParams()
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index 2422619..b830628 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -284,7 +284,7 @@ ERepositorySets::security_set(bool insecurity) const
make_package_dep_spec()
.package((*c)->name())
.version_requirement(VersionRequirement(vo_equal, (*c)->version()))
- .repository((*c)->repository()->name())));
+ .in_repository((*c)->repository()->name())));
spec->set_tag(glsa_tags.find(glsa->id())->second);
security_packages->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(
new TreeLeaf<SetSpecTree, PackageDepSpec>(spec)));
@@ -317,7 +317,7 @@ ERepositorySets::security_set(bool insecurity) const
std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec()
.package((*r)->name())
.version_requirement(VersionRequirement(vo_equal, (*r)->version()))
- .repository((*r)->repository()->name())));
+ .in_repository((*r)->repository()->name())));
spec->set_tag(glsa_tags.find(glsa->id())->second);
security_packages->add(std::tr1::shared_ptr<SetSpecTree::ConstItem>(
new TreeLeaf<SetSpecTree, PackageDepSpec>(spec)));
diff --git a/paludis/repositories/e/e_repository_sets_TEST_cleanup.sh b/paludis/repositories/e/e_repository_sets_TEST_cleanup.sh
index 03e7320..c62ea9d 100755
--- a/paludis/repositories/e/e_repository_sets_TEST_cleanup.sh
+++ b/paludis/repositories/e/e_repository_sets_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d e_repository_sets_TEST_dir ] ; then
diff --git a/paludis/repositories/e/e_repository_sets_TEST_setup.sh b/paludis/repositories/e/e_repository_sets_TEST_setup.sh
index b6167e8..376dc70 100755
--- a/paludis/repositories/e/e_repository_sets_TEST_setup.sh
+++ b/paludis/repositories/e/e_repository_sets_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir e_repository_sets_TEST_dir || exit 1
diff --git a/paludis/repositories/e/eapi.sr b/paludis/repositories/e/eapi.sr
index e43eb33..24bad0a 100644
--- a/paludis/repositories/e/eapi.sr
+++ b/paludis/repositories/e/eapi.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_class_EAPIEbuildPhases()
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 646cb3c..778a70b 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -578,8 +578,6 @@ EbuildInstallCommand::extend_command(const Command & cmd)
.with_setenv("PALUDIS_LOADSAVEENV_DIR", stringify(install_params[k::loadsaveenv_dir()]))
.with_setenv("PALUDIS_CONFIG_PROTECT", install_params[k::config_protect()])
.with_setenv("PALUDIS_CONFIG_PROTECT_MASK", install_params[k::config_protect_mask()])
- .with_setenv("PALUDIS_EBUILD_OVERRIDE_CONFIG_PROTECT_MASK",
- install_params[k::disable_cfgpro()] ? "/" : "")
.with_setenv("PALUDIS_PROFILE_DIR", stringify(*install_params[k::profiles()]->begin()))
.with_setenv("PALUDIS_PROFILE_DIRS", join(install_params[k::profiles()]->begin(),
install_params[k::profiles()]->end(), " "))
@@ -634,8 +632,7 @@ EbuildUninstallCommand::extend_command(const Command & cmd)
Command result(Command(cmd)
.with_setenv("ROOT", uninstall_params[k::root()])
.with_setenv("PALUDIS_LOADSAVEENV_DIR", stringify(uninstall_params[k::loadsaveenv_dir()]))
- .with_setenv("PALUDIS_EBUILD_OVERRIDE_CONFIG_PROTECT_MASK",
- uninstall_params[k::disable_cfgpro()] ? "/" : ""));
+ );
if (uninstall_params[k::load_environment()])
result
@@ -836,12 +833,7 @@ EbuildInfoCommand::failure()
Command
EbuildInfoCommand::extend_command(const Command & cmd)
{
- std::string info_vars;
- if (info_params[k::info_vars()].is_regular_file_or_symlink_to_regular_file())
- {
- LineConfigFile info_vars_f(info_params[k::info_vars()], LineConfigFileOptions() + lcfo_disallow_continuations);
- info_vars = join(info_vars_f.begin(), info_vars_f.end(), " ");
- }
+ std::string info_vars(join(info_params[k::info_vars()]->begin(), info_params[k::info_vars()]->end(), " "));
Command result(Command(cmd)
.with_stdout_prefix(" ")
diff --git a/paludis/repositories/e/ebuild.hh b/paludis/repositories/e/ebuild.hh
index 711639a..ebc7ac6 100644
--- a/paludis/repositories/e/ebuild.hh
+++ b/paludis/repositories/e/ebuild.hh
@@ -103,7 +103,6 @@ namespace paludis
kc::Field<k::root, std::string>,
kc::Field<k::profiles, std::tr1::shared_ptr<const FSEntrySequence> >,
kc::Field<k::expand_vars, std::tr1::shared_ptr<const Map<std::string, std::string> > >,
- kc::Field<k::disable_cfgpro, bool>,
kc::Field<k::slot, SlotName>,
kc::Field<k::config_protect, std::string>,
kc::Field<k::config_protect_mask, std::string>,
@@ -134,7 +133,6 @@ namespace paludis
*/
typedef kc::KeyedClass<
kc::Field<k::root, std::string>,
- kc::Field<k::disable_cfgpro, bool>,
kc::Field<k::unmerge_only, bool>,
kc::Field<k::load_environment, const FSEntry *>,
kc::Field<k::loadsaveenv_dir, FSEntry>
@@ -166,7 +164,7 @@ namespace paludis
kc::Field<k::profiles, std::tr1::shared_ptr<const FSEntrySequence> >,
kc::Field<k::expand_vars, std::tr1::shared_ptr<const Map<std::string, std::string> > >,
kc::Field<k::load_environment, const FSEntry *>,
- kc::Field<k::info_vars, FSEntry>,
+ kc::Field<k::info_vars, std::tr1::shared_ptr<const Set<std::string> > >,
kc::Field<k::use_ebuild_file, bool>
> EbuildInfoCommandParams;
diff --git a/paludis/repositories/e/ebuild/0/build_functions.bash b/paludis/repositories/e/ebuild/0/build_functions.bash
index 0a71e89..03ca2cd 100644
--- a/paludis/repositories/e/ebuild/0/build_functions.bash
+++ b/paludis/repositories/e/ebuild/0/build_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_infovars.bash b/paludis/repositories/e/ebuild/0/builtin_infovars.bash
index 1c7c429..a603282 100644
--- a/paludis/repositories/e/ebuild/0/builtin_infovars.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_infovars.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_init.bash b/paludis/repositories/e/ebuild/0/builtin_init.bash
index ee56fff..46bcbba 100644
--- a/paludis/repositories/e/ebuild/0/builtin_init.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_init.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_initmisc.bash b/paludis/repositories/e/ebuild/0/builtin_initmisc.bash
index e449f1d..2655749 100644
--- a/paludis/repositories/e/ebuild/0/builtin_initmisc.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_initmisc.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_initrm.bash b/paludis/repositories/e/ebuild/0/builtin_initrm.bash
index b06142e..87193f6 100644
--- a/paludis/repositories/e/ebuild/0/builtin_initrm.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_initrm.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_killold.bash b/paludis/repositories/e/ebuild/0/builtin_killold.bash
index 8532b85..a528a3a 100644
--- a/paludis/repositories/e/ebuild/0/builtin_killold.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_killold.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_killoldmisc.bash b/paludis/repositories/e/ebuild/0/builtin_killoldmisc.bash
index f56e98f..4f48965 100644
--- a/paludis/repositories/e/ebuild/0/builtin_killoldmisc.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_killoldmisc.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_killoldrm.bash b/paludis/repositories/e/ebuild/0/builtin_killoldrm.bash
index 4731628..9a064e5 100644
--- a/paludis/repositories/e/ebuild/0/builtin_killoldrm.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_killoldrm.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_loadenv.bash b/paludis/repositories/e/ebuild/0/builtin_loadenv.bash
index fe1c916..365f496 100644
--- a/paludis/repositories/e/ebuild/0/builtin_loadenv.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_loadenv.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_metadata.bash b/paludis/repositories/e/ebuild/0/builtin_metadata.bash
index 07c9dc7..849648d 100644
--- a/paludis/repositories/e/ebuild/0/builtin_metadata.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_metadata.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_saveenv.bash b/paludis/repositories/e/ebuild/0/builtin_saveenv.bash
index b227b32..a17346d 100644
--- a/paludis/repositories/e/ebuild/0/builtin_saveenv.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_saveenv.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_tidyup.bash b/paludis/repositories/e/ebuild/0/builtin_tidyup.bash
index 0336939..1c52d54 100644
--- a/paludis/repositories/e/ebuild/0/builtin_tidyup.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_tidyup.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_tidyupmisc.bash b/paludis/repositories/e/ebuild/0/builtin_tidyupmisc.bash
index 054d1c8..8d83ee3 100644
--- a/paludis/repositories/e/ebuild/0/builtin_tidyupmisc.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_tidyupmisc.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_tidyuprm.bash b/paludis/repositories/e/ebuild/0/builtin_tidyuprm.bash
index 82408b0..1eb9d44 100644
--- a/paludis/repositories/e/ebuild/0/builtin_tidyuprm.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_tidyuprm.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/builtin_variable.bash b/paludis/repositories/e/ebuild/0/builtin_variable.bash
index ce0c0b1..6b17837 100644
--- a/paludis/repositories/e/ebuild/0/builtin_variable.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_variable.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/conditional_functions.bash b/paludis/repositories/e/ebuild/0/conditional_functions.bash
index 3bd41c5..d464317 100644
--- a/paludis/repositories/e/ebuild/0/conditional_functions.bash
+++ b/paludis/repositories/e/ebuild/0/conditional_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/conditional_functions_TEST.bash b/paludis/repositories/e/ebuild/0/conditional_functions_TEST.bash
index 68abc07..4e31924 100644
--- a/paludis/repositories/e/ebuild/0/conditional_functions_TEST.bash
+++ b/paludis/repositories/e/ebuild/0/conditional_functions_TEST.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/eclass_functions.bash b/paludis/repositories/e/ebuild/0/eclass_functions.bash
index 14ded47..62f1e67 100644
--- a/paludis/repositories/e/ebuild/0/eclass_functions.bash
+++ b/paludis/repositories/e/ebuild/0/eclass_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/ever_functions.bash b/paludis/repositories/e/ebuild/0/ever_functions.bash
index 09249dc..00f4d14 100644
--- a/paludis/repositories/e/ebuild/0/ever_functions.bash
+++ b/paludis/repositories/e/ebuild/0/ever_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/exlib_functions.bash b/paludis/repositories/e/ebuild/0/exlib_functions.bash
index fd77bba..aa0cbb8 100644
--- a/paludis/repositories/e/ebuild/0/exlib_functions.bash
+++ b/paludis/repositories/e/ebuild/0/exlib_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/list_functions.bash b/paludis/repositories/e/ebuild/0/list_functions.bash
index 4cd49fa..27046ae 100644
--- a/paludis/repositories/e/ebuild/0/list_functions.bash
+++ b/paludis/repositories/e/ebuild/0/list_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/list_functions_TEST.bash b/paludis/repositories/e/ebuild/0/list_functions_TEST.bash
index 4c99c57..d378cd7 100644
--- a/paludis/repositories/e/ebuild/0/list_functions_TEST.bash
+++ b/paludis/repositories/e/ebuild/0/list_functions_TEST.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/output_functions.bash b/paludis/repositories/e/ebuild/0/output_functions.bash
index e22fde4..b6cee47 100644
--- a/paludis/repositories/e/ebuild/0/output_functions.bash
+++ b/paludis/repositories/e/ebuild/0/output_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/pkg_config.bash b/paludis/repositories/e/ebuild/0/pkg_config.bash
index c8160a6..efb9a35 100644
--- a/paludis/repositories/e/ebuild/0/pkg_config.bash
+++ b/paludis/repositories/e/ebuild/0/pkg_config.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/pkg_info.bash b/paludis/repositories/e/ebuild/0/pkg_info.bash
index 1990df6..bd70768 100644
--- a/paludis/repositories/e/ebuild/0/pkg_info.bash
+++ b/paludis/repositories/e/ebuild/0/pkg_info.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/pkg_nofetch.bash b/paludis/repositories/e/ebuild/0/pkg_nofetch.bash
index ed6976a..5e4e4fb 100644
--- a/paludis/repositories/e/ebuild/0/pkg_nofetch.bash
+++ b/paludis/repositories/e/ebuild/0/pkg_nofetch.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/pkg_postinst.bash b/paludis/repositories/e/ebuild/0/pkg_postinst.bash
index 3fe06e8..989460c 100644
--- a/paludis/repositories/e/ebuild/0/pkg_postinst.bash
+++ b/paludis/repositories/e/ebuild/0/pkg_postinst.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/pkg_postrm.bash b/paludis/repositories/e/ebuild/0/pkg_postrm.bash
index d027ec8..7fa8e5b 100644
--- a/paludis/repositories/e/ebuild/0/pkg_postrm.bash
+++ b/paludis/repositories/e/ebuild/0/pkg_postrm.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/pkg_preinst.bash b/paludis/repositories/e/ebuild/0/pkg_preinst.bash
index 5bfb427..8196129 100644
--- a/paludis/repositories/e/ebuild/0/pkg_preinst.bash
+++ b/paludis/repositories/e/ebuild/0/pkg_preinst.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/pkg_prerm.bash b/paludis/repositories/e/ebuild/0/pkg_prerm.bash
index 8f2824a..a4d0b13 100644
--- a/paludis/repositories/e/ebuild/0/pkg_prerm.bash
+++ b/paludis/repositories/e/ebuild/0/pkg_prerm.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/pkg_pretend.bash b/paludis/repositories/e/ebuild/0/pkg_pretend.bash
index cd5a4c9..b2264f0 100644
--- a/paludis/repositories/e/ebuild/0/pkg_pretend.bash
+++ b/paludis/repositories/e/ebuild/0/pkg_pretend.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/pkg_setup.bash b/paludis/repositories/e/ebuild/0/pkg_setup.bash
index f5fabae..22eece8 100644
--- a/paludis/repositories/e/ebuild/0/pkg_setup.bash
+++ b/paludis/repositories/e/ebuild/0/pkg_setup.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/portage_stubs.bash b/paludis/repositories/e/ebuild/0/portage_stubs.bash
index 0896d6f..7c8745d 100644
--- a/paludis/repositories/e/ebuild/0/portage_stubs.bash
+++ b/paludis/repositories/e/ebuild/0/portage_stubs.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/src_compile.bash b/paludis/repositories/e/ebuild/0/src_compile.bash
index ec8aff1..b48a701 100644
--- a/paludis/repositories/e/ebuild/0/src_compile.bash
+++ b/paludis/repositories/e/ebuild/0/src_compile.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/src_install.bash b/paludis/repositories/e/ebuild/0/src_install.bash
index 50baf67..1939c50 100644
--- a/paludis/repositories/e/ebuild/0/src_install.bash
+++ b/paludis/repositories/e/ebuild/0/src_install.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/src_test.bash b/paludis/repositories/e/ebuild/0/src_test.bash
index 37aeeb6..53a9648 100644
--- a/paludis/repositories/e/ebuild/0/src_test.bash
+++ b/paludis/repositories/e/ebuild/0/src_test.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/0/src_unpack.bash b/paludis/repositories/e/ebuild/0/src_unpack.bash
index 5cc8831..7128d16 100644
--- a/paludis/repositories/e/ebuild/0/src_unpack.bash
+++ b/paludis/repositories/e/ebuild/0/src_unpack.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/1/output_functions.bash b/paludis/repositories/e/ebuild/1/output_functions.bash
index ffadb1a..47e20c1 100644
--- a/paludis/repositories/e/ebuild/1/output_functions.bash
+++ b/paludis/repositories/e/ebuild/1/output_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/1/src_compile.bash b/paludis/repositories/e/ebuild/1/src_compile.bash
index 33c2ab7..e1a1707 100644
--- a/paludis/repositories/e/ebuild/1/src_compile.bash
+++ b/paludis/repositories/e/ebuild/1/src_compile.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/binary_functions.bash b/paludis/repositories/e/ebuild/binary_functions.bash
index f1150ae..899198b 100644
--- a/paludis/repositories/e/ebuild/binary_functions.bash
+++ b/paludis/repositories/e/ebuild/binary_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/die_functions.bash b/paludis/repositories/e/ebuild/die_functions.bash
index 1a46bbc..4888a28 100644
--- a/paludis/repositories/e/ebuild/die_functions.bash
+++ b/paludis/repositories/e/ebuild/die_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index 7cec38c..78a00ee 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/build_functions.bash b/paludis/repositories/e/ebuild/exheres-0/build_functions.bash
index 7fb443b..7a01ace 100644
--- a/paludis/repositories/e/ebuild/exheres-0/build_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/build_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_infovars.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_infovars.bash
index b0f48e2..756626a 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_infovars.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_infovars.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_init.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_init.bash
index 909d5f0..9ac285c 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_init.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_init.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash
index 8f82322..120a5e0 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_initrm.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_initrm.bash
index e13c6a6..2abd465 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_initrm.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_initrm.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_killold.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_killold.bash
index 39ee4f7..744531d 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_killold.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_killold.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_killoldmisc.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_killoldmisc.bash
index fe4c4b6..90219f2 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_killoldmisc.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_killoldmisc.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_killoldrm.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_killoldrm.bash
index 15f57fd..26ea51d 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_killoldrm.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_killoldrm.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_loadenv.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_loadenv.bash
index 93f5cd1..322ce9a 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_loadenv.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_loadenv.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_metadata.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_metadata.bash
index 4201c97..819b3fb 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_metadata.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_metadata.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_saveenv.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_saveenv.bash
index c98e397..6d373ce 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_saveenv.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_saveenv.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash
index 80c0f9e..6c2ea39 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_tidyup.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_tidyupmisc.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_tidyupmisc.bash
index 482a4f8..8466353 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_tidyupmisc.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_tidyupmisc.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_tidyuprm.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_tidyuprm.bash
index 881cb8f..e375788 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_tidyuprm.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_tidyuprm.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_variable.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_variable.bash
index d7f668d..00cae21 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_variable.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_variable.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/conditional_functions.bash b/paludis/repositories/e/ebuild/exheres-0/conditional_functions.bash
index cf26fde..4f6642f 100755
--- a/paludis/repositories/e/ebuild/exheres-0/conditional_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/conditional_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/conditional_functions_TEST.bash b/paludis/repositories/e/ebuild/exheres-0/conditional_functions_TEST.bash
index 91874ee..7eea6d1 100644
--- a/paludis/repositories/e/ebuild/exheres-0/conditional_functions_TEST.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/conditional_functions_TEST.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash b/paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash
index fa6d6ef..67d8fad 100644
--- a/paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/eclass_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/ever_functions.bash b/paludis/repositories/e/ebuild/exheres-0/ever_functions.bash
index fe2f3f9..af4bbdb 100644
--- a/paludis/repositories/e/ebuild/exheres-0/ever_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/ever_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
index 2132b4b..340838c 100644
--- a/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/exlib_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/list_functions.bash b/paludis/repositories/e/ebuild/exheres-0/list_functions.bash
index d9f72a0..d22c90f 100644
--- a/paludis/repositories/e/ebuild/exheres-0/list_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/list_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/list_functions_TEST.bash b/paludis/repositories/e/ebuild/exheres-0/list_functions_TEST.bash
index 2315b8e..bb7c09e 100644
--- a/paludis/repositories/e/ebuild/exheres-0/list_functions_TEST.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/list_functions_TEST.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/output_functions.bash b/paludis/repositories/e/ebuild/exheres-0/output_functions.bash
index 4d44fe0..2fd560a 100644
--- a/paludis/repositories/e/ebuild/exheres-0/output_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/output_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/pkg_config.bash b/paludis/repositories/e/ebuild/exheres-0/pkg_config.bash
index 3a03225..bd13220 100644
--- a/paludis/repositories/e/ebuild/exheres-0/pkg_config.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/pkg_config.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/pkg_info.bash b/paludis/repositories/e/ebuild/exheres-0/pkg_info.bash
index 9b67bc1..5f62426 100644
--- a/paludis/repositories/e/ebuild/exheres-0/pkg_info.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/pkg_info.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/pkg_nofetch.bash b/paludis/repositories/e/ebuild/exheres-0/pkg_nofetch.bash
index 6b6f684..5091b6b 100644
--- a/paludis/repositories/e/ebuild/exheres-0/pkg_nofetch.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/pkg_nofetch.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/pkg_postinst.bash b/paludis/repositories/e/ebuild/exheres-0/pkg_postinst.bash
index f1c67f4..896afb6 100644
--- a/paludis/repositories/e/ebuild/exheres-0/pkg_postinst.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/pkg_postinst.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/pkg_postrm.bash b/paludis/repositories/e/ebuild/exheres-0/pkg_postrm.bash
index 5bd4049..503a823 100644
--- a/paludis/repositories/e/ebuild/exheres-0/pkg_postrm.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/pkg_postrm.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/pkg_preinst.bash b/paludis/repositories/e/ebuild/exheres-0/pkg_preinst.bash
index bb8fc97..b01cd81 100644
--- a/paludis/repositories/e/ebuild/exheres-0/pkg_preinst.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/pkg_preinst.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/pkg_prerm.bash b/paludis/repositories/e/ebuild/exheres-0/pkg_prerm.bash
index 47a3c33..30e373c 100644
--- a/paludis/repositories/e/ebuild/exheres-0/pkg_prerm.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/pkg_prerm.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/pkg_pretend.bash b/paludis/repositories/e/ebuild/exheres-0/pkg_pretend.bash
index e78158b..0fc76a2 100644
--- a/paludis/repositories/e/ebuild/exheres-0/pkg_pretend.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/pkg_pretend.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/pkg_setup.bash b/paludis/repositories/e/ebuild/exheres-0/pkg_setup.bash
index 1e0bd0f..7978153 100644
--- a/paludis/repositories/e/ebuild/exheres-0/pkg_setup.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/pkg_setup.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/portage_stubs.bash b/paludis/repositories/e/ebuild/exheres-0/portage_stubs.bash
index 9f0ba6e..e017abc 100755
--- a/paludis/repositories/e/ebuild/exheres-0/portage_stubs.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/portage_stubs.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/src_compile.bash b/paludis/repositories/e/ebuild/exheres-0/src_compile.bash
index e00df26..efe3c61 100644
--- a/paludis/repositories/e/ebuild/exheres-0/src_compile.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/src_compile.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/src_configure.bash b/paludis/repositories/e/ebuild/exheres-0/src_configure.bash
index 3736ca6..01feb06 100644
--- a/paludis/repositories/e/ebuild/exheres-0/src_configure.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/src_configure.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/src_install.bash b/paludis/repositories/e/ebuild/exheres-0/src_install.bash
index 6237b2f..cc07706 100644
--- a/paludis/repositories/e/ebuild/exheres-0/src_install.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/src_install.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/src_prepare.bash b/paludis/repositories/e/ebuild/exheres-0/src_prepare.bash
index ad39653..8d6bc44 100644
--- a/paludis/repositories/e/ebuild/exheres-0/src_prepare.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/src_prepare.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/src_test.bash b/paludis/repositories/e/ebuild/exheres-0/src_test.bash
index 4fc0d7f..b5c97db 100644
--- a/paludis/repositories/e/ebuild/exheres-0/src_test.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/src_test.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/exheres-0/src_unpack.bash b/paludis/repositories/e/ebuild/exheres-0/src_unpack.bash
index 15e01d6..05475fd 100644
--- a/paludis/repositories/e/ebuild/exheres-0/src_unpack.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/src_unpack.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/install_functions.bash b/paludis/repositories/e/ebuild/install_functions.bash
index acfed99..3e343fb 100644
--- a/paludis/repositories/e/ebuild/install_functions.bash
+++ b/paludis/repositories/e/ebuild/install_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/kdebuild-1/output_functions.bash b/paludis/repositories/e/ebuild/kdebuild-1/output_functions.bash
index aca3739..e341559 100644
--- a/paludis/repositories/e/ebuild/kdebuild-1/output_functions.bash
+++ b/paludis/repositories/e/ebuild/kdebuild-1/output_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/kernel_functions.bash b/paludis/repositories/e/ebuild/kernel_functions.bash
index 9cf8724..360efa0 100644
--- a/paludis/repositories/e/ebuild/kernel_functions.bash
+++ b/paludis/repositories/e/ebuild/kernel_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/kernel_functions_TEST.bash b/paludis/repositories/e/ebuild/kernel_functions_TEST.bash
index 503b6f2..928cd28 100644
--- a/paludis/repositories/e/ebuild/kernel_functions_TEST.bash
+++ b/paludis/repositories/e/ebuild/kernel_functions_TEST.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/multilib_functions.bash b/paludis/repositories/e/ebuild/multilib_functions.bash
index febcb11..52afab5 100644
--- a/paludis/repositories/e/ebuild/multilib_functions.bash
+++ b/paludis/repositories/e/ebuild/multilib_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/output_functions.bash b/paludis/repositories/e/ebuild/output_functions.bash
index e22fde4..b6cee47 100644
--- a/paludis/repositories/e/ebuild/output_functions.bash
+++ b/paludis/repositories/e/ebuild/output_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/paludis-1/output_functions.bash b/paludis/repositories/e/ebuild/paludis-1/output_functions.bash
index 51aa1fe..8debf77 100644
--- a/paludis/repositories/e/ebuild/paludis-1/output_functions.bash
+++ b/paludis/repositories/e/ebuild/paludis-1/output_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/pbin-1/builtin_installbin.bash b/paludis/repositories/e/ebuild/pbin-1/builtin_installbin.bash
index 7906702..37b8ed0 100644
--- a/paludis/repositories/e/ebuild/pbin-1/builtin_installbin.bash
+++ b/paludis/repositories/e/ebuild/pbin-1/builtin_installbin.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/pbin-1/builtin_pivotbin.bash b/paludis/repositories/e/ebuild/pbin-1/builtin_pivotbin.bash
index 7d17ac3..bf550a9 100644
--- a/paludis/repositories/e/ebuild/pbin-1/builtin_pivotbin.bash
+++ b/paludis/repositories/e/ebuild/pbin-1/builtin_pivotbin.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/pipe_functions.bash b/paludis/repositories/e/ebuild/pipe_functions.bash
index 6403e64..22ead7f 100755
--- a/paludis/repositories/e/ebuild/pipe_functions.bash
+++ b/paludis/repositories/e/ebuild/pipe_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/run_test.bash b/paludis/repositories/e/ebuild/run_test.bash
index f230ec1..2dfa3df 100755
--- a/paludis/repositories/e/ebuild/run_test.bash
+++ b/paludis/repositories/e/ebuild/run_test.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
shopt -s expand_aliases
diff --git a/paludis/repositories/e/ebuild/sandbox.bash b/paludis/repositories/e/ebuild/sandbox.bash
index 9a36a28..c9036c3 100644
--- a/paludis/repositories/e/ebuild/sandbox.bash
+++ b/paludis/repositories/e/ebuild/sandbox.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/source_functions.bash b/paludis/repositories/e/ebuild/source_functions.bash
index b54c71c..cf4ce16 100755
--- a/paludis/repositories/e/ebuild/source_functions.bash
+++ b/paludis/repositories/e/ebuild/source_functions.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007, 2008 David Leverton
diff --git a/paludis/repositories/e/ebuild/usage_error.bash b/paludis/repositories/e/ebuild/usage_error.bash
index 4172177..8f879cf 100644
--- a/paludis/repositories/e/ebuild/usage_error.bash
+++ b/paludis/repositories/e/ebuild/usage_error.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/utils/awk b/paludis/repositories/e/ebuild/utils/awk
index f7dc583..54f1daa 100755
--- a/paludis/repositories/e/ebuild/utils/awk
+++ b/paludis/repositories/e/ebuild/utils/awk
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if /bin/awk --version &>/dev/null ; then
/bin/awk "$@"
diff --git a/paludis/repositories/e/ebuild/utils/awk_TEST.bash b/paludis/repositories/e/ebuild/utils/awk_TEST.bash
index 5c69862..223710d 100644
--- a/paludis/repositories/e/ebuild/utils/awk_TEST.bash
+++ b/paludis/repositories/e/ebuild/utils/awk_TEST.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/utils/canonicalise b/paludis/repositories/e/ebuild/utils/canonicalise
index b186eba..8aafed0 100755
--- a/paludis/repositories/e/ebuild/utils/canonicalise
+++ b/paludis/repositories/e/ebuild/utils/canonicalise
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
case $(uname -s) in
FreeBSD) realpath "$@" ;;
*) readlink -f "$@" ;;
diff --git a/paludis/repositories/e/ebuild/utils/dobin b/paludis/repositories/e/ebuild/utils/dobin
index 34cbd3a..d7520a0 100755
--- a/paludis/repositories/e/ebuild/utils/dobin
+++ b/paludis/repositories/e/ebuild/utils/dobin
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/doconfd b/paludis/repositories/e/ebuild/utils/doconfd
index a46e8be..36d8241 100755
--- a/paludis/repositories/e/ebuild/utils/doconfd
+++ b/paludis/repositories/e/ebuild/utils/doconfd
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/dodir b/paludis/repositories/e/ebuild/utils/dodir
index fca8d9a..ef2e0f9 100755
--- a/paludis/repositories/e/ebuild/utils/dodir
+++ b/paludis/repositories/e/ebuild/utils/dodir
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/dodoc b/paludis/repositories/e/ebuild/utils/dodoc
index 37b7fd2..438a5ac 100755
--- a/paludis/repositories/e/ebuild/utils/dodoc
+++ b/paludis/repositories/e/ebuild/utils/dodoc
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/doenvd b/paludis/repositories/e/ebuild/utils/doenvd
index 91d2677..5882bc7 100755
--- a/paludis/repositories/e/ebuild/utils/doenvd
+++ b/paludis/repositories/e/ebuild/utils/doenvd
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/doexe b/paludis/repositories/e/ebuild/utils/doexe
index e3f3207..92723cf 100755
--- a/paludis/repositories/e/ebuild/utils/doexe
+++ b/paludis/repositories/e/ebuild/utils/doexe
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/dohard b/paludis/repositories/e/ebuild/utils/dohard
index 707bc32..27b7dc0 100755
--- a/paludis/repositories/e/ebuild/utils/dohard
+++ b/paludis/repositories/e/ebuild/utils/dohard
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/dohtml b/paludis/repositories/e/ebuild/utils/dohtml
index a7e3c7a..5e439ce 100755
--- a/paludis/repositories/e/ebuild/utils/dohtml
+++ b/paludis/repositories/e/ebuild/utils/dohtml
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
@@ -72,6 +72,8 @@ parse_args() {
doc_prefix="$2"
shift
;;
+ */)
+ args=( "${args[@]}" "$1"* );;
*)
args=( "${args[@]}" "$1" ) ;;
esac
diff --git a/paludis/repositories/e/ebuild/utils/doinfo b/paludis/repositories/e/ebuild/utils/doinfo
index 223f61e..261a20c 100755
--- a/paludis/repositories/e/ebuild/utils/doinfo
+++ b/paludis/repositories/e/ebuild/utils/doinfo
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/doinitd b/paludis/repositories/e/ebuild/utils/doinitd
index 3e9904d..d753572 100755
--- a/paludis/repositories/e/ebuild/utils/doinitd
+++ b/paludis/repositories/e/ebuild/utils/doinitd
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/doins b/paludis/repositories/e/ebuild/utils/doins
index 6de34f8..df2318b 100755
--- a/paludis/repositories/e/ebuild/utils/doins
+++ b/paludis/repositories/e/ebuild/utils/doins
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/dolib b/paludis/repositories/e/ebuild/utils/dolib
index 0fed548..89b56ca 100755
--- a/paludis/repositories/e/ebuild/utils/dolib
+++ b/paludis/repositories/e/ebuild/utils/dolib
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/dolib.a b/paludis/repositories/e/ebuild/utils/dolib.a
index abb2fef..9a0d290 100755
--- a/paludis/repositories/e/ebuild/utils/dolib.a
+++ b/paludis/repositories/e/ebuild/utils/dolib.a
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/dolib.so b/paludis/repositories/e/ebuild/utils/dolib.so
index dc324a0..67fb84a 100755
--- a/paludis/repositories/e/ebuild/utils/dolib.so
+++ b/paludis/repositories/e/ebuild/utils/dolib.so
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/doman b/paludis/repositories/e/ebuild/utils/doman
index 18e46d3..7ffefca 100755
--- a/paludis/repositories/e/ebuild/utils/doman
+++ b/paludis/repositories/e/ebuild/utils/doman
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/domo b/paludis/repositories/e/ebuild/utils/domo
index fe3d57c..d6ead2c 100755
--- a/paludis/repositories/e/ebuild/utils/domo
+++ b/paludis/repositories/e/ebuild/utils/domo
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/donewins b/paludis/repositories/e/ebuild/utils/donewins
index 9428526..92e38bd 100755
--- a/paludis/repositories/e/ebuild/utils/donewins
+++ b/paludis/repositories/e/ebuild/utils/donewins
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/dosbin b/paludis/repositories/e/ebuild/utils/dosbin
index 3ce589c..92df659 100755
--- a/paludis/repositories/e/ebuild/utils/dosbin
+++ b/paludis/repositories/e/ebuild/utils/dosbin
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/dosed b/paludis/repositories/e/ebuild/utils/dosed
index e387bb4..70e877e 100755
--- a/paludis/repositories/e/ebuild/utils/dosed
+++ b/paludis/repositories/e/ebuild/utils/dosed
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/dosym b/paludis/repositories/e/ebuild/utils/dosym
index 5ffb7bb..edff1b6 100755
--- a/paludis/repositories/e/ebuild/utils/dosym
+++ b/paludis/repositories/e/ebuild/utils/dosym
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/ecompress b/paludis/repositories/e/ebuild/utils/ecompress
index 96a6047..3595944 100755
--- a/paludis/repositories/e/ebuild/utils/ecompress
+++ b/paludis/repositories/e/ebuild/utils/ecompress
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2008 David Leverton
diff --git a/paludis/repositories/e/ebuild/utils/ecompressdir b/paludis/repositories/e/ebuild/utils/ecompressdir
index 1e0734a..04a1d58 100755
--- a/paludis/repositories/e/ebuild/utils/ecompressdir
+++ b/paludis/repositories/e/ebuild/utils/ecompressdir
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2008 David Leverton
diff --git a/paludis/repositories/e/ebuild/utils/emake b/paludis/repositories/e/ebuild/utils/emake
index 55e0d2c..43fb804 100755
--- a/paludis/repositories/e/ebuild/utils/emake
+++ b/paludis/repositories/e/ebuild/utils/emake
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/banned_in_eapi_exheres-0 b/paludis/repositories/e/ebuild/utils/exheres-0/banned_in_eapi_exheres-0
index e888259..dcf2488 100755
--- a/paludis/repositories/e/ebuild/utils/exheres-0/banned_in_eapi_exheres-0
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/banned_in_eapi_exheres-0
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/nonfatal b/paludis/repositories/e/ebuild/utils/exheres-0/nonfatal
index 28167cb..e666694 100755
--- a/paludis/repositories/e/ebuild/utils/exheres-0/nonfatal
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/nonfatal
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2008 Bo ├śrsted Andresen
diff --git a/paludis/repositories/e/ebuild/utils/fowners b/paludis/repositories/e/ebuild/utils/fowners
index 7f450a2..716ff52 100755
--- a/paludis/repositories/e/ebuild/utils/fowners
+++ b/paludis/repositories/e/ebuild/utils/fowners
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/fperms b/paludis/repositories/e/ebuild/utils/fperms
index 0722704..ed065e6 100755
--- a/paludis/repositories/e/ebuild/utils/fperms
+++ b/paludis/repositories/e/ebuild/utils/fperms
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/kdebuild-1/banned_in_eapi_kdebuild-1 b/paludis/repositories/e/ebuild/utils/kdebuild-1/banned_in_eapi_kdebuild-1
index a987d4e..2504c7f 100644
--- a/paludis/repositories/e/ebuild/utils/kdebuild-1/banned_in_eapi_kdebuild-1
+++ b/paludis/repositories/e/ebuild/utils/kdebuild-1/banned_in_eapi_kdebuild-1
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/utils/make b/paludis/repositories/e/ebuild/utils/make
index 5006f69..e121e6a 100755
--- a/paludis/repositories/e/ebuild/utils/make
+++ b/paludis/repositories/e/ebuild/utils/make
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if /bin/make --version &>/dev/null ; then
/bin/make "$@"
diff --git a/paludis/repositories/e/ebuild/utils/make_TEST.bash b/paludis/repositories/e/ebuild/utils/make_TEST.bash
index a352618..259db38 100644
--- a/paludis/repositories/e/ebuild/utils/make_TEST.bash
+++ b/paludis/repositories/e/ebuild/utils/make_TEST.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/utils/newbin b/paludis/repositories/e/ebuild/utils/newbin
index 78e9741..6bfdca2 100755
--- a/paludis/repositories/e/ebuild/utils/newbin
+++ b/paludis/repositories/e/ebuild/utils/newbin
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/newconfd b/paludis/repositories/e/ebuild/utils/newconfd
index 7ddb13f..49bf0e5 100755
--- a/paludis/repositories/e/ebuild/utils/newconfd
+++ b/paludis/repositories/e/ebuild/utils/newconfd
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/newdoc b/paludis/repositories/e/ebuild/utils/newdoc
index 694e3b6..1264682 100755
--- a/paludis/repositories/e/ebuild/utils/newdoc
+++ b/paludis/repositories/e/ebuild/utils/newdoc
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/newenvd b/paludis/repositories/e/ebuild/utils/newenvd
index 57c29bc..3738f1b 100755
--- a/paludis/repositories/e/ebuild/utils/newenvd
+++ b/paludis/repositories/e/ebuild/utils/newenvd
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/newexe b/paludis/repositories/e/ebuild/utils/newexe
index 3584088..55fa65d 100755
--- a/paludis/repositories/e/ebuild/utils/newexe
+++ b/paludis/repositories/e/ebuild/utils/newexe
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/newinitd b/paludis/repositories/e/ebuild/utils/newinitd
index 7322aee..8d54e5f 100755
--- a/paludis/repositories/e/ebuild/utils/newinitd
+++ b/paludis/repositories/e/ebuild/utils/newinitd
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/newins b/paludis/repositories/e/ebuild/utils/newins
index b87555c..e220bcc 100755
--- a/paludis/repositories/e/ebuild/utils/newins
+++ b/paludis/repositories/e/ebuild/utils/newins
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/newlib.a b/paludis/repositories/e/ebuild/utils/newlib.a
index f723355..4d5f163 100755
--- a/paludis/repositories/e/ebuild/utils/newlib.a
+++ b/paludis/repositories/e/ebuild/utils/newlib.a
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/newlib.so b/paludis/repositories/e/ebuild/utils/newlib.so
index 8be5491..4f4bdf4 100755
--- a/paludis/repositories/e/ebuild/utils/newlib.so
+++ b/paludis/repositories/e/ebuild/utils/newlib.so
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/newman b/paludis/repositories/e/ebuild/utils/newman
index 99721db..48519f4 100755
--- a/paludis/repositories/e/ebuild/utils/newman
+++ b/paludis/repositories/e/ebuild/utils/newman
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/newsbin b/paludis/repositories/e/ebuild/utils/newsbin
index 9aad1bb..7dd0a2d 100755
--- a/paludis/repositories/e/ebuild/utils/newsbin
+++ b/paludis/repositories/e/ebuild/utils/newsbin
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/patch b/paludis/repositories/e/ebuild/utils/patch
index 4b7d8db..38d9729 100755
--- a/paludis/repositories/e/ebuild/utils/patch
+++ b/paludis/repositories/e/ebuild/utils/patch
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if /bin/patch -g0 </dev/null &>/dev/null ; then
/bin/patch "$@"
diff --git a/paludis/repositories/e/ebuild/utils/patch_TEST.bash b/paludis/repositories/e/ebuild/utils/patch_TEST.bash
index 073b1d0..ae95a99 100644
--- a/paludis/repositories/e/ebuild/utils/patch_TEST.bash
+++ b/paludis/repositories/e/ebuild/utils/patch_TEST.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/utils/prep.in b/paludis/repositories/e/ebuild/utils/prep.in
index 2bc94f3..cb6a5cb 100755
--- a/paludis/repositories/e/ebuild/utils/prep.in
+++ b/paludis/repositories/e/ebuild/utils/prep.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
diff --git a/paludis/repositories/e/ebuild/utils/run_test.bash b/paludis/repositories/e/ebuild/utils/run_test.bash
index 1f9db4e..186a9fc 100644
--- a/paludis/repositories/e/ebuild/utils/run_test.bash
+++ b/paludis/repositories/e/ebuild/utils/run_test.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
shopt -s expand_aliases
diff --git a/paludis/repositories/e/ebuild/utils/sed b/paludis/repositories/e/ebuild/utils/sed
index 4ddac24..eb04b14 100755
--- a/paludis/repositories/e/ebuild/utils/sed
+++ b/paludis/repositories/e/ebuild/utils/sed
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if /bin/sed --version &>/dev/null ; then
/bin/sed "$@"
diff --git a/paludis/repositories/e/ebuild/utils/sed_TEST.bash b/paludis/repositories/e/ebuild/utils/sed_TEST.bash
index 200ee44..2ff6b66 100644
--- a/paludis/repositories/e/ebuild/utils/sed_TEST.bash
+++ b/paludis/repositories/e/ebuild/utils/sed_TEST.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/utils/unpack b/paludis/repositories/e/ebuild/utils/unpack
index 94da791..7f60310 100755
--- a/paludis/repositories/e/ebuild/utils/unpack
+++ b/paludis/repositories/e/ebuild/utils/unpack
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/utils/wrapped_getfsize b/paludis/repositories/e/ebuild/utils/wrapped_getfsize
index 6bbc449..dcb6771 100755
--- a/paludis/repositories/e/ebuild/utils/wrapped_getfsize
+++ b/paludis/repositories/e/ebuild/utils/wrapped_getfsize
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
case $(uname -s) in
FreeBSD)
stat -f '%z' "$@"
diff --git a/paludis/repositories/e/ebuild/utils/wrapped_getfsize_TEST.bash b/paludis/repositories/e/ebuild/utils/wrapped_getfsize_TEST.bash
index e432102..6deb6d7 100755
--- a/paludis/repositories/e/ebuild/utils/wrapped_getfsize_TEST.bash
+++ b/paludis/repositories/e/ebuild/utils/wrapped_getfsize_TEST.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/utils/wrapped_getmtime b/paludis/repositories/e/ebuild/utils/wrapped_getmtime
index e2616de..d907c83 100755
--- a/paludis/repositories/e/ebuild/utils/wrapped_getmtime
+++ b/paludis/repositories/e/ebuild/utils/wrapped_getmtime
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
case $(uname -s) in
FreeBSD)
diff --git a/paludis/repositories/e/ebuild/utils/wrapped_ldconfig b/paludis/repositories/e/ebuild/utils/wrapped_ldconfig
index ecb53eb..594fea7 100755
--- a/paludis/repositories/e/ebuild/utils/wrapped_ldconfig
+++ b/paludis/repositories/e/ebuild/utils/wrapped_ldconfig
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
case $(uname -s) in
FreeBSD)
diff --git a/paludis/repositories/e/ebuild/write_binary_ebuild.bash b/paludis/repositories/e/ebuild/write_binary_ebuild.bash
index 8d3e981..7614193 100644
--- a/paludis/repositories/e/ebuild/write_binary_ebuild.bash
+++ b/paludis/repositories/e/ebuild/write_binary_ebuild.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild/write_vdb_entry.bash b/paludis/repositories/e/ebuild/write_vdb_entry.bash
index 82c6f64..0a3871c 100755
--- a/paludis/repositories/e/ebuild/write_vdb_entry.bash
+++ b/paludis/repositories/e/ebuild/write_vdb_entry.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index a01006b..d3df168 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -52,6 +52,7 @@
#include <paludis/util/kc.hh>
#include <paludis/util/config_file.hh>
#include <paludis/util/instantiation_policy-impl.hh>
+#include <paludis/util/make_shared_ptr.hh>
#include <tr1/functional>
#include <fstream>
#include <list>
@@ -707,7 +708,6 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
(k::root(), o[k::destination()]->installed_root_key() ?
stringify(o[k::destination()]->installed_root_key()->value()) : "/")
(k::profiles(), _imp->params.profiles)
- (k::disable_cfgpro(), o[k::no_config_protect()])
(k::config_protect(), _imp->e_repository->profile_variable("CONFIG_PROTECT"))
(k::config_protect_mask(), _imp->e_repository->profile_variable("CONFIG_PROTECT_MASK"))
(k::loadsaveenv_dir(), _imp->params.builddir / (stringify(id->name().category) + "-" +
@@ -777,13 +777,6 @@ EbuildEntries::info(const std::tr1::shared_ptr<const ERepositoryID> & id,
(k::userpriv(), phase->option("userpriv") && userpriv_ok)
(k::builddir(), _imp->params.builddir));
- FSEntry i(_imp->e_repository->layout()->info_variables_file(
- _imp->e_repository->params().location / "profiles"));
-
- if (_imp->e_repository->params().master_repository && ! i.exists())
- i = _imp->e_repository->params().master_repository->layout()->info_variables_file(
- _imp->e_repository->params().master_repository->params().location / "profiles");
-
EbuildInfoCommandParams info_params(
EbuildInfoCommandParams::named_create()
(k::use(), use)
@@ -792,7 +785,9 @@ EbuildEntries::info(const std::tr1::shared_ptr<const ERepositoryID> & id,
(k::root(), stringify(_imp->params.environment->root()))
(k::profiles(), _imp->params.profiles)
(k::load_environment(), static_cast<const FSEntry *>(0))
- (k::info_vars(), i)
+ (k::info_vars(), _imp->e_repository->info_vars_key() ?
+ _imp->e_repository->info_vars_key()->value() :
+ make_shared_ptr(new const Set<std::string>))
(k::use_ebuild_file(), true)
);
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 59bd36c..61067c3 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -584,16 +584,10 @@ EbuildID::installed_time_key() const
return std::tr1::shared_ptr<const MetadataTimeKey>();
}
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-EbuildID::source_origin_key() const
-{
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
-}
-
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-EbuildID::binary_origin_key() const
+const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
+EbuildID::from_repositories_key() const
{
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
+ return std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >();
}
const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
diff --git a/paludis/repositories/e/ebuild_id.hh b/paludis/repositories/e/ebuild_id.hh
index d7b6680..97efef5 100644
--- a/paludis/repositories/e/ebuild_id.hh
+++ b/paludis/repositories/e/ebuild_id.hh
@@ -77,11 +77,10 @@ namespace paludis
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const Contents> > > contents_key() const;
virtual const std::tr1::shared_ptr<const MetadataTimeKey> installed_time_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > source_origin_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_origin_key() const;
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<PackageIDSequence> > contains_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const PackageID> > > contained_in_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > fs_location_key() const;
+ const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const;
const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > inherited_key() const;
const std::tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index 2523e46..e08cd81 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -75,7 +75,9 @@ namespace paludis
std::tr1::shared_ptr<FSEntrySequence> repository_mask_files;
std::tr1::shared_ptr<FSEntrySequence> profiles_desc_files;
std::tr1::shared_ptr<FSEntrySequence> mirror_files;
- std::tr1::shared_ptr<FSEntrySequence> use_desc_dirs;
+ std::tr1::shared_ptr<FSEntrySequence> info_variables_files;
+ std::tr1::shared_ptr<FSEntrySequence> info_packages_files;
+ std::tr1::shared_ptr<UseDescFileInfoSequence> use_desc_files;
Implementation(const ERepository * const n, const FSEntry & t,
std::tr1::shared_ptr<const ERepositoryEntries> e) :
@@ -87,7 +89,9 @@ namespace paludis
repository_mask_files(new FSEntrySequence),
profiles_desc_files(new FSEntrySequence),
mirror_files(new FSEntrySequence),
- use_desc_dirs(new FSEntrySequence)
+ info_variables_files(new FSEntrySequence),
+ info_packages_files(new FSEntrySequence),
+ use_desc_files(new UseDescFileInfoSequence)
{
}
};
@@ -105,14 +109,47 @@ ExheresLayout::ExheresLayout(const ERepository * const r, const FSEntry & tree_r
_imp->repository_mask_files->push_back(*master_repository_location() / "metadata" / "repository_mask.conf");
_imp->profiles_desc_files->push_back(*master_repository_location() / "metadata" / "profiles_desc.conf");
_imp->mirror_files->push_back(*master_repository_location() / "metadata" / "mirrors.conf");
- _imp->use_desc_dirs->push_back(*master_repository_location() / "metadata" / "desc");
+ _imp->info_variables_files->push_back(*master_repository_location() / "metadata" / "info" / "variables.conf");
+
+ FSEntry descs(*master_repository_location() / "metadata" / "options" / "descriptions");
+ if (descs.is_directory_or_symlink_to_directory())
+ {
+ for (DirIterator d(descs), d_end ; d != d_end ; ++d)
+ {
+ if (! is_file_with_extension(*d, ".conf", IsFileWithOptions()))
+ continue;
+
+ std::string p(strip_trailing_string(strip_trailing_string(d->basename(), ".conf"), ".local"));
+ if (p == "options")
+ _imp->use_desc_files->push_back(std::make_pair(*d, ""));
+ else
+ _imp->use_desc_files->push_back(std::make_pair(*d, p));
+ }
+ }
}
_imp->arch_list_files->push_back(_imp->tree_root / "metadata" / "arch.conf");
_imp->repository_mask_files->push_back(_imp->tree_root / "metadata" / "repository_mask.conf");
_imp->profiles_desc_files->push_back(_imp->tree_root / "metadata" / "profiles_desc.conf");
_imp->mirror_files->push_back(_imp->tree_root / "metadata" / "mirrors.conf");
- _imp->use_desc_dirs->push_back(_imp->tree_root / "metadata" / "desc");
+ _imp->info_variables_files->push_back(_imp->tree_root / "metadata" / "info" / "variables.conf");
+ _imp->info_packages_files->push_back(_imp->tree_root / "metadata" / "info" / "packages.conf");
+
+ FSEntry descs(_imp->tree_root / "metadata" / "options" / "descriptions");
+ if (descs.is_directory_or_symlink_to_directory())
+ {
+ for (DirIterator d(descs), d_end ; d != d_end ; ++d)
+ {
+ if (! is_file_with_extension(*d, ".conf", IsFileWithOptions()))
+ continue;
+
+ std::string p(strip_trailing_string(strip_trailing_string(d->basename(), ".conf"), ".local"));
+ if (p == "options")
+ _imp->use_desc_files->push_back(std::make_pair(*d, ""));
+ else
+ _imp->use_desc_files->push_back(std::make_pair(*d, p));
+ }
+ }
}
ExheresLayout::~ExheresLayout()
@@ -371,16 +408,16 @@ ExheresLayout::package_ids(const QualifiedPackageName & n) const
return std::tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
}
-FSEntry
-ExheresLayout::info_packages_file(const FSEntry & dir) const
+const std::tr1::shared_ptr<const FSEntrySequence>
+ExheresLayout::info_packages_files() const
{
- return dir / "info_packages.conf";
+ return _imp->info_packages_files;
}
-FSEntry
-ExheresLayout::info_variables_file(const FSEntry & dir) const
+const std::tr1::shared_ptr<const FSEntrySequence>
+ExheresLayout::info_variables_files() const
{
- return dir / "info_variables.conf";
+ return _imp->info_variables_files;
}
FSEntry
@@ -419,10 +456,10 @@ ExheresLayout::mirror_files() const
return _imp->mirror_files;
}
-std::tr1::shared_ptr<const FSEntrySequence>
-ExheresLayout::use_desc_dirs() const
+std::tr1::shared_ptr<const UseDescFileInfoSequence>
+ExheresLayout::use_desc_files() const
{
- return _imp->use_desc_dirs;
+ return _imp->use_desc_files;
}
FSEntry
diff --git a/paludis/repositories/e/exheres_layout.hh b/paludis/repositories/e/exheres_layout.hh
index 6cda140..329007a 100644
--- a/paludis/repositories/e/exheres_layout.hh
+++ b/paludis/repositories/e/exheres_layout.hh
@@ -76,10 +76,10 @@ namespace paludis
const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual FSEntry info_packages_file(const FSEntry &) const
+ virtual const std::tr1::shared_ptr<const FSEntrySequence> info_packages_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual FSEntry info_variables_file(const FSEntry &) const
+ virtual const std::tr1::shared_ptr<const FSEntrySequence> info_variables_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual FSEntry package_directory(const QualifiedPackageName &) const
@@ -104,7 +104,7 @@ namespace paludis
virtual std::tr1::shared_ptr<const FSEntrySequence> mirror_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::tr1::shared_ptr<const FSEntrySequence> use_desc_dirs() const
+ virtual std::tr1::shared_ptr<const UseDescFileInfoSequence> use_desc_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual FSEntry profiles_base_dir() const
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index d59a7bd..9eb9273 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -368,8 +368,7 @@ ExndbamRepository::merge(const MergeParams & m)
if (if_overwritten_id)
{
- UninstallActionOptions uninstall_options(false);
- perform_uninstall(std::tr1::static_pointer_cast<const ERepositoryID>(if_overwritten_id), uninstall_options, true);
+ perform_uninstall(std::tr1::static_pointer_cast<const ERepositoryID>(if_overwritten_id), true);
}
VDBPostMergeCommand post_merge_command(
@@ -380,8 +379,7 @@ ExndbamRepository::merge(const MergeParams & m)
}
void
-ExndbamRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID> & id,
- const UninstallActionOptions & o, bool replace) const
+ExndbamRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID> & id, bool replace) const
{
Context context("When uninstalling '" + stringify(*id) + (replace ? "' for a reinstall:" : "':"));
@@ -458,7 +456,6 @@ ExndbamRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositor
EbuildUninstallCommandParams uninstall_params(EbuildUninstallCommandParams::named_create()
(k::root(), stringify(_imp->params.root))
- (k::disable_cfgpro(), o[k::no_config_protect()])
(k::unmerge_only(), false)
(k::loadsaveenv_dir(), ver_dir)
(k::load_environment(), load_env.get()));
diff --git a/paludis/repositories/e/exndbam_repository.hh b/paludis/repositories/e/exndbam_repository.hh
index 49de3fd..006c05c 100644
--- a/paludis/repositories/e/exndbam_repository.hh
+++ b/paludis/repositories/e/exndbam_repository.hh
@@ -108,7 +108,7 @@ namespace paludis
///\{
void perform_uninstall(const std::tr1::shared_ptr<const erepository::ERepositoryID> & id,
- const UninstallActionOptions & o, bool reinstalling) const;
+ bool reinstalling) const;
///\}
diff --git a/paludis/repositories/e/exndbam_repository.sr b/paludis/repositories/e/exndbam_repository.sr
index 5f1d6fe..84ba50e 100644
--- a/paludis/repositories/e/exndbam_repository.sr
+++ b/paludis/repositories/e/exndbam_repository.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_ExndbamRepositoryParams()
diff --git a/paludis/repositories/e/exndbam_repository_TEST_cleanup.sh b/paludis/repositories/e/exndbam_repository_TEST_cleanup.sh
index 790816f..b30004a 100755
--- a/paludis/repositories/e/exndbam_repository_TEST_cleanup.sh
+++ b/paludis/repositories/e/exndbam_repository_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d exndbam_repository_TEST_dir ] ; then
diff --git a/paludis/repositories/e/exndbam_repository_TEST_setup.sh b/paludis/repositories/e/exndbam_repository_TEST_setup.sh
index 7b4fd25..e3442ce 100755
--- a/paludis/repositories/e/exndbam_repository_TEST_setup.sh
+++ b/paludis/repositories/e/exndbam_repository_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir -p exndbam_repository_TEST_dir || exit 1
diff --git a/paludis/repositories/e/fetch_visitor_TEST_cleanup.sh b/paludis/repositories/e/fetch_visitor_TEST_cleanup.sh
index d9f826c..8dfc462 100755
--- a/paludis/repositories/e/fetch_visitor_TEST_cleanup.sh
+++ b/paludis/repositories/e/fetch_visitor_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d fetch_visitor_TEST_dir ] ; then
diff --git a/paludis/repositories/e/fetch_visitor_TEST_setup.sh b/paludis/repositories/e/fetch_visitor_TEST_setup.sh
index 14e2b70..b11b015 100755
--- a/paludis/repositories/e/fetch_visitor_TEST_setup.sh
+++ b/paludis/repositories/e/fetch_visitor_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir fetch_visitor_TEST_dir || exit 1
diff --git a/paludis/repositories/e/info_metadata_key.cc b/paludis/repositories/e/info_metadata_key.cc
new file mode 100644
index 0000000..9d9eb98
--- /dev/null
+++ b/paludis/repositories/e/info_metadata_key.cc
@@ -0,0 +1,201 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2008 Ciaran McCreesh
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <paludis/repositories/e/info_metadata_key.hh>
+#include <paludis/repositories/e/eapi.hh>
+#include <paludis/util/private_implementation_pattern-impl.hh>
+#include <paludis/util/fs_entry.hh>
+#include <paludis/util/mutex.hh>
+#include <paludis/util/config_file.hh>
+#include <paludis/util/stringify.hh>
+#include <paludis/util/options.hh>
+#include <paludis/util/wrapped_forward_iterator.hh>
+#include <paludis/util/wrapped_output_iterator.hh>
+#include <paludis/util/kc.hh>
+#include <paludis/util/sequence.hh>
+#include <paludis/util/indirect_iterator-impl.hh>
+#include <paludis/util/join.hh>
+#include <paludis/util/visitor-impl.hh>
+#include <paludis/literal_metadata_key.hh>
+#include <paludis/selection.hh>
+#include <paludis/generator.hh>
+#include <paludis/filter.hh>
+#include <paludis/filtered_generator.hh>
+#include <paludis/dep_spec.hh>
+#include <paludis/environment.hh>
+#include <paludis/package_id.hh>
+#include <paludis/formatter.hh>
+#include <set>
+#include <algorithm>
+#include <tr1/functional>
+
+using namespace paludis;
+using namespace paludis::erepository;
+
+namespace paludis
+{
+ template <>
+ struct Implementation<InfoVarsMetadataKey>
+ {
+ const std::tr1::shared_ptr<const FSEntrySequence> locations;
+
+ mutable Mutex mutex;
+ mutable std::tr1::shared_ptr<Set<std::string> > value;
+
+ Implementation(const std::tr1::shared_ptr<const FSEntrySequence> & l) :
+ locations(l)
+ {
+ }
+ };
+
+ template <>
+ struct Implementation<InfoPkgsMetadataKey>
+ {
+ const Environment * const env;
+ const std::tr1::shared_ptr<const FSEntrySequence> locations;
+ const std::string eapi;
+
+ mutable Mutex mutex;
+ mutable bool added;
+
+ Implementation(const Environment * const e, const std::tr1::shared_ptr<const FSEntrySequence> & l,
+ const std::string & p) :
+ env(e),
+ locations(l),
+ eapi(p),
+ added(false)
+ {
+ }
+ };
+}
+
+InfoVarsMetadataKey::InfoVarsMetadataKey(const std::tr1::shared_ptr<const FSEntrySequence> & f) :
+ MetadataCollectionKey<Set<std::string> >("info_vars", "Variable information names", mkt_internal),
+ PrivateImplementationPattern<InfoVarsMetadataKey>(new Implementation<InfoVarsMetadataKey>(f)),
+ _imp(PrivateImplementationPattern<InfoVarsMetadataKey>::_imp)
+{
+}
+
+InfoVarsMetadataKey::~InfoVarsMetadataKey()
+{
+}
+
+const std::tr1::shared_ptr<const Set<std::string> >
+InfoVarsMetadataKey::value() const
+{
+ Lock l(_imp->mutex);
+
+ if (_imp->value)
+ return _imp->value;
+ _imp->value.reset(new Set<std::string>);
+
+ for (FSEntrySequence::ConstIterator location(_imp->locations->begin()), location_end(_imp->locations->end()) ;
+ location != location_end ; ++location)
+ {
+ Context context("When loading info variables file '" + stringify(*location) + "':");
+
+ if (location->is_regular_file_or_symlink_to_regular_file())
+ {
+ LineConfigFile f(*location, LineConfigFileOptions() + lcfo_disallow_continuations);
+ for (LineConfigFile::ConstIterator line(f.begin()), line_end(f.end()) ;
+ line != line_end ; ++line)
+ _imp->value->insert(*line);
+ }
+ }
+
+ return _imp->value;
+}
+
+InfoPkgsMetadataKey::InfoPkgsMetadataKey(const Environment * const e,
+ const std::tr1::shared_ptr<const FSEntrySequence> & f, const std::string & p) :
+ MetadataSectionKey("info_pkgs", "Package information", mkt_normal),
+ PrivateImplementationPattern<InfoPkgsMetadataKey>(new Implementation<InfoPkgsMetadataKey>(e, f, p)),
+ _imp(PrivateImplementationPattern<InfoPkgsMetadataKey>::_imp)
+{
+}
+
+InfoPkgsMetadataKey::~InfoPkgsMetadataKey()
+{
+}
+
+void
+InfoPkgsMetadataKey::need_keys_added() const
+{
+ Lock l(_imp->mutex);
+ if (_imp->added)
+ return;
+
+ std::set<std::string> info_pkgs;
+ for (FSEntrySequence::ConstIterator location(_imp->locations->begin()), location_end(_imp->locations->end()) ;
+ location != location_end ; ++location)
+ {
+ Context context("When loading info packages file '" + stringify(*location) + "':");
+ _imp->added = true;
+
+ if (location->is_regular_file_or_symlink_to_regular_file())
+ {
+ LineConfigFile p(*location, LineConfigFileOptions() + lcfo_disallow_continuations);
+ std::copy(p.begin(), p.end(), std::inserter(info_pkgs, info_pkgs.begin()));
+ }
+ }
+
+ for (std::set<std::string>::const_iterator i(info_pkgs.begin()), i_end(info_pkgs.end()) ;
+ i != i_end ; ++i)
+ {
+ std::tr1::shared_ptr<MetadataKey> key;
+ std::tr1::shared_ptr<const PackageIDSequence> q((*_imp->env)[selection::AllVersionsSorted(
+ generator::Matches(parse_elike_package_dep_spec(*i,
+ (*(*erepository::EAPIData::get_instance()->eapi_from_string(_imp->eapi))
+ [k::supported()])[k::package_dep_spec_parse_options()],
+ std::tr1::shared_ptr<const PackageID>())) |
+ filter::InstalledAtRoot(_imp->env->root()))]);
+
+ if (q->empty())
+ key.reset(new LiteralMetadataValueKey<std::string>(*i, *i, mkt_normal, "(none)"));
+ else
+ {
+ using namespace std::tr1::placeholders;
+ std::tr1::shared_ptr<Set<std::string> > s(new Set<std::string>);
+ std::transform(indirect_iterator(q->begin()), indirect_iterator(q->end()), s->inserter(),
+ std::tr1::bind(std::tr1::mem_fn(&PackageID::canonical_form), _1, idcf_version));
+ key.reset(new LiteralMetadataStringSetKey(*i, *i, mkt_normal, s));
+ }
+
+ add_metadata_key(key);
+ }
+}
+
+namespace
+{
+ std::string format_string(const std::string & i, const Formatter<std::string> & f)
+ {
+ return f.format(i, format::Plain());
+ }
+}
+
+std::string
+InfoVarsMetadataKey::pretty_print_flat(const Formatter<std::string> & f) const
+{
+ using namespace std::tr1::placeholders;
+ return join(value()->begin(), value()->end(), " ", std::tr1::bind(&format_string, _1, f));
+}
+
+template class PrivateImplementationPattern<InfoPkgsMetadataKey>;
+template class PrivateImplementationPattern<InfoVarsMetadataKey>;
+
diff --git a/paludis/repositories/e/info_metadata_key.hh b/paludis/repositories/e/info_metadata_key.hh
new file mode 100644
index 0000000..3ebfe2f
--- /dev/null
+++ b/paludis/repositories/e/info_metadata_key.hh
@@ -0,0 +1,55 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+#ifndef PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_INFO_METADATA_KEY_HH
+#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_INFO_METADATA_KEY_HH 1
+
+#include <paludis/metadata_key.hh>
+#include <paludis/environment-fwd.hh>
+#include <paludis/util/fs_entry-fwd.hh>
+#include <paludis/util/set.hh>
+#include <paludis/util/private_implementation_pattern.hh>
+
+namespace paludis
+{
+ namespace erepository
+ {
+ class InfoPkgsMetadataKey :
+ public MetadataSectionKey,
+ private PrivateImplementationPattern<InfoPkgsMetadataKey>
+ {
+ private:
+ PrivateImplementationPattern<InfoPkgsMetadataKey>::ImpPtr & _imp;
+
+ protected:
+ virtual void need_keys_added() const;
+
+ public:
+ InfoPkgsMetadataKey(const Environment * const e,
+ const std::tr1::shared_ptr<const FSEntrySequence> & f, const std::string & p);
+ ~InfoPkgsMetadataKey();
+ };
+
+ class InfoVarsMetadataKey :
+ public MetadataCollectionKey<Set<std::string> >,
+ private PrivateImplementationPattern<InfoVarsMetadataKey>
+ {
+ private:
+ PrivateImplementationPattern<InfoVarsMetadataKey>::ImpPtr & _imp;
+
+ public:
+ InfoVarsMetadataKey(const std::tr1::shared_ptr<const FSEntrySequence> &);
+ ~InfoVarsMetadataKey();
+
+ const std::tr1::shared_ptr<const Set<std::string> > value() const;
+
+ std::string pretty_print_flat(const Formatter<std::string> &) const;
+ };
+ }
+
+#ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
+ extern template class PrivateImplementationPattern<erepository::InfoPkgsMetadataKey>;
+ extern template class PrivateImplementationPattern<erepository::InfoVarsMetadataKey>;
+#endif
+}
+
+#endif
diff --git a/paludis/repositories/e/layout.hh b/paludis/repositories/e/layout.hh
index 93b46db..523306c 100644
--- a/paludis/repositories/e/layout.hh
+++ b/paludis/repositories/e/layout.hh
@@ -29,6 +29,7 @@
#include <paludis/util/exception.hh>
#include <paludis/util/virtual_constructor.hh>
#include <paludis/util/map-fwd.hh>
+#include <paludis/repositories/e/use_desc.hh>
#include <tr1/memory>
namespace paludis
@@ -96,10 +97,10 @@ namespace paludis
const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual FSEntry info_packages_file(const FSEntry &) const
+ virtual const std::tr1::shared_ptr<const FSEntrySequence> info_packages_files() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual FSEntry info_variables_file(const FSEntry &) const
+ virtual const std::tr1::shared_ptr<const FSEntrySequence> info_variables_files() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
virtual FSEntry package_directory(const QualifiedPackageName &) const
@@ -124,7 +125,7 @@ namespace paludis
virtual std::tr1::shared_ptr<const FSEntrySequence> mirror_files() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
- virtual std::tr1::shared_ptr<const FSEntrySequence> use_desc_dirs() const
+ virtual std::tr1::shared_ptr<const UseDescFileInfoSequence> use_desc_files() const
PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
virtual FSEntry profiles_base_dir() const
diff --git a/paludis/repositories/e/manifest2_entry.sr b/paludis/repositories/e/manifest2_entry.sr
index 3d591fa..28fca22 100644
--- a/paludis/repositories/e/manifest2_entry.sr
+++ b/paludis/repositories/e/manifest2_entry.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_Manifest2Entry()
diff --git a/paludis/repositories/e/qa/manifest_TEST_cleanup.sh b/paludis/repositories/e/qa/manifest_TEST_cleanup.sh
index 9f08606..c361b7c 100755
--- a/paludis/repositories/e/qa/manifest_TEST_cleanup.sh
+++ b/paludis/repositories/e/qa/manifest_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d manifest_TEST_dir ] ; then
diff --git a/paludis/repositories/e/qa/manifest_TEST_setup.sh b/paludis/repositories/e/qa/manifest_TEST_setup.sh
index 2033a6f..c1135b7 100755
--- a/paludis/repositories/e/qa/manifest_TEST_setup.sh
+++ b/paludis/repositories/e/qa/manifest_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir -p manifest_TEST_dir/repo1 || exit 2
diff --git a/paludis/repositories/e/qa/misc_files_TEST_cleanup.sh b/paludis/repositories/e/qa/misc_files_TEST_cleanup.sh
index 41afeac..641b8e3 100755
--- a/paludis/repositories/e/qa/misc_files_TEST_cleanup.sh
+++ b/paludis/repositories/e/qa/misc_files_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d misc_files_TEST_dir ] ; then
diff --git a/paludis/repositories/e/qa/misc_files_TEST_setup.sh b/paludis/repositories/e/qa/misc_files_TEST_setup.sh
index ed3fb92..2cd5596 100755
--- a/paludis/repositories/e/qa/misc_files_TEST_setup.sh
+++ b/paludis/repositories/e/qa/misc_files_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir misc_files_TEST_dir || exit 2
diff --git a/paludis/repositories/e/qa/visibility.cc b/paludis/repositories/e/qa/visibility.cc
index 4601e86..96b8d98 100644
--- a/paludis/repositories/e/qa/visibility.cc
+++ b/paludis/repositories/e/qa/visibility.cc
@@ -132,8 +132,8 @@ namespace
pp.package(*v->second->package_ptr());
if (orig_p.slot_requirement_ptr())
pp.slot_requirement(orig_p.slot_requirement_ptr());
- if (orig_p.repository_ptr())
- pp.repository(*orig_p.repository_ptr());
+ if (orig_p.in_repository_ptr())
+ pp.in_repository(*orig_p.in_repository_ptr());
local_p.reset(new PackageDepSpec(pp));
local_p->set_tag(orig_p.tag());
diff --git a/paludis/repositories/e/qa/visibility_TEST_cleanup.sh b/paludis/repositories/e/qa/visibility_TEST_cleanup.sh
index acda8e2..26b426a 100755
--- a/paludis/repositories/e/qa/visibility_TEST_cleanup.sh
+++ b/paludis/repositories/e/qa/visibility_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d visibility_TEST_dir ] ; then
diff --git a/paludis/repositories/e/qa/visibility_TEST_setup.sh b/paludis/repositories/e/qa/visibility_TEST_setup.sh
index 7af3abb..6eb0724 100755
--- a/paludis/repositories/e/qa/visibility_TEST_setup.sh
+++ b/paludis/repositories/e/qa/visibility_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir visibility_TEST_dir || exit 1
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index 2e92ecc..9d1373d 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -74,7 +74,9 @@ namespace paludis
std::tr1::shared_ptr<FSEntrySequence> repository_mask_files;
std::tr1::shared_ptr<FSEntrySequence> profiles_desc_files;
std::tr1::shared_ptr<FSEntrySequence> mirror_files;
- std::tr1::shared_ptr<FSEntrySequence> use_desc_dirs;
+ std::tr1::shared_ptr<FSEntrySequence> info_packages_files;
+ std::tr1::shared_ptr<FSEntrySequence> info_variables_files;
+ std::tr1::shared_ptr<UseDescFileInfoSequence> use_desc_files;
Implementation(const ERepository * const r, const FSEntry & t,
std::tr1::shared_ptr<const ERepositoryEntries> e) :
@@ -86,7 +88,9 @@ namespace paludis
repository_mask_files(new FSEntrySequence),
profiles_desc_files(new FSEntrySequence),
mirror_files(new FSEntrySequence),
- use_desc_dirs(new FSEntrySequence)
+ info_packages_files(new FSEntrySequence),
+ info_variables_files(new FSEntrySequence),
+ use_desc_files(new UseDescFileInfoSequence)
{
}
};
@@ -104,14 +108,41 @@ TraditionalLayout::TraditionalLayout(const ERepository * const repo, const FSEnt
_imp->repository_mask_files->push_back(*master_repository_location() / "profiles" / "package.mask");
_imp->profiles_desc_files->push_back(*master_repository_location() / "profiles" / "profiles.desc");
_imp->mirror_files->push_back(*master_repository_location() / "profiles" / "thirdpartymirrors");
- _imp->use_desc_dirs->push_back(*master_repository_location() / "profiles");
+ _imp->info_variables_files->push_back(*master_repository_location() / "profiles" / "info_vars");
+
+ _imp->use_desc_files->push_back(std::make_pair(*master_repository_location() / "profiles" / "use.desc", ""));
+ _imp->use_desc_files->push_back(std::make_pair(*master_repository_location() / "profiles" / "use.local.desc", ""));
+ FSEntry descs(*master_repository_location() / "profiles" / "desc");
+ if (descs.is_directory_or_symlink_to_directory())
+ {
+ for (DirIterator d(descs), d_end ; d != d_end ; ++d)
+ {
+ if (! is_file_with_extension(*d, ".desc", IsFileWithOptions()))
+ continue;
+ _imp->use_desc_files->push_back(std::make_pair(*d, strip_trailing_string(d->basename(), ".desc")));
+ }
+ }
}
_imp->arch_list_files->push_back(_imp->tree_root / "profiles" / "arch.list");
_imp->repository_mask_files->push_back(_imp->tree_root / "profiles" / "package.mask");
_imp->profiles_desc_files->push_back(_imp->tree_root / "profiles" / "profiles.desc");
_imp->mirror_files->push_back(_imp->tree_root / "profiles" / "thirdpartymirrors");
- _imp->use_desc_dirs->push_back(_imp->tree_root / "profiles");
+ _imp->info_variables_files->push_back(_imp->tree_root / "profiles" / "info_vars");
+ _imp->info_packages_files->push_back(_imp->tree_root / "profiles" / "info_pkgs");
+
+ _imp->use_desc_files->push_back(std::make_pair(_imp->tree_root / "profiles" / "use.desc", ""));
+ _imp->use_desc_files->push_back(std::make_pair(_imp->tree_root / "profiles" / "use.local.desc", ""));
+ FSEntry descs(_imp->tree_root / "profiles" / "desc");
+ if (descs.is_directory_or_symlink_to_directory())
+ {
+ for (DirIterator d(descs), d_end ; d != d_end ; ++d)
+ {
+ if (! is_file_with_extension(*d, ".desc", IsFileWithOptions()))
+ continue;
+ _imp->use_desc_files->push_back(std::make_pair(*d, strip_trailing_string(d->basename(), ".desc")));
+ }
+ }
}
TraditionalLayout::~TraditionalLayout()
@@ -389,16 +420,16 @@ TraditionalLayout::package_ids(const QualifiedPackageName & n) const
return std::tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
}
-FSEntry
-TraditionalLayout::info_packages_file(const FSEntry & dir) const
+const std::tr1::shared_ptr<const FSEntrySequence>
+TraditionalLayout::info_packages_files() const
{
- return dir / "info_pkgs";
+ return _imp->info_packages_files;
}
-FSEntry
-TraditionalLayout::info_variables_file(const FSEntry & dir) const
+const std::tr1::shared_ptr<const FSEntrySequence>
+TraditionalLayout::info_variables_files() const
{
- return dir / "info_vars";
+ return _imp->info_variables_files;
}
FSEntry
@@ -437,10 +468,10 @@ TraditionalLayout::mirror_files() const
return _imp->mirror_files;
}
-std::tr1::shared_ptr<const FSEntrySequence>
-TraditionalLayout::use_desc_dirs() const
+std::tr1::shared_ptr<const UseDescFileInfoSequence>
+TraditionalLayout::use_desc_files() const
{
- return _imp->use_desc_dirs;
+ return _imp->use_desc_files;
}
FSEntry
diff --git a/paludis/repositories/e/traditional_layout.hh b/paludis/repositories/e/traditional_layout.hh
index 06c47d6..796f1dc 100644
--- a/paludis/repositories/e/traditional_layout.hh
+++ b/paludis/repositories/e/traditional_layout.hh
@@ -77,10 +77,10 @@ namespace paludis
const QualifiedPackageName &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual FSEntry info_packages_file(const FSEntry &) const
+ virtual const std::tr1::shared_ptr<const FSEntrySequence> info_packages_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual FSEntry info_variables_file(const FSEntry &) const
+ virtual const std::tr1::shared_ptr<const FSEntrySequence> info_variables_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual FSEntry package_directory(const QualifiedPackageName &) const
@@ -105,7 +105,7 @@ namespace paludis
virtual std::tr1::shared_ptr<const FSEntrySequence> mirror_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::tr1::shared_ptr<const FSEntrySequence> use_desc_dirs() const
+ virtual std::tr1::shared_ptr<const UseDescFileInfoSequence> use_desc_files() const
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual FSEntry profiles_base_dir() const
diff --git a/paludis/repositories/e/use_desc.cc b/paludis/repositories/e/use_desc.cc
index 4f6a045..0ce503a 100644
--- a/paludis/repositories/e/use_desc.cc
+++ b/paludis/repositories/e/use_desc.cc
@@ -29,10 +29,13 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/config_file.hh>
#include <paludis/util/hashes.hh>
+#include <paludis/util/sequence-impl.hh>
#include <tr1/unordered_map>
using namespace paludis;
+template class Sequence<UseDescFileInfo>;
+
namespace paludis
{
template<>
@@ -57,20 +60,16 @@ namespace paludis
}
}
- Implementation(const FSEntry & f, const std::string & expand_sep)
+ Implementation(const std::tr1::shared_ptr<const UseDescFileInfoSequence> & f, const std::string & expand_sep)
{
- add(f / "use.desc", "");
- add(f / "use.local.desc", "");
-
- if ((f / "desc").is_directory_or_symlink_to_directory())
- for (DirIterator d(f / "desc"), d_end ; d != d_end ; ++d)
- if (is_file_with_extension(*d, ".desc", IsFileWithOptions()))
- add(*d, strip_trailing_string(d->basename(), ".desc") + expand_sep);
+ for (UseDescFileInfoSequence::ConstIterator ff(f->begin()), ff_end(f->end()) ;
+ ff != ff_end ; ++ff)
+ add(ff->first, ff->second.empty() ? ff->second : ff->second + expand_sep);
}
};
}
-UseDesc::UseDesc(const FSEntry & f, const std::string & expand_sep) :
+UseDesc::UseDesc(const std::tr1::shared_ptr<const UseDescFileInfoSequence> & f, const std::string & expand_sep) :
PrivateImplementationPattern<UseDesc>(new Implementation<UseDesc>(f, expand_sep))
{
}
diff --git a/paludis/repositories/e/use_desc.hh b/paludis/repositories/e/use_desc.hh
index f386d36..4190e24 100644
--- a/paludis/repositories/e/use_desc.hh
+++ b/paludis/repositories/e/use_desc.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -22,12 +22,15 @@
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/instantiation_policy.hh>
+#include <paludis/util/fs_entry-fwd.hh>
#include <paludis/name-fwd.hh>
#include <paludis/package_id-fwd.hh>
+#include <utility>
namespace paludis
{
- class FSEntry;
+ typedef std::pair<FSEntry, std::string> UseDescFileInfo;
+ typedef Sequence<UseDescFileInfo> UseDescFileInfoSequence;
/**
* Implements use.desc options for ERepository.
@@ -42,7 +45,7 @@ namespace paludis
///\name Basic operations
///\{
- UseDesc(const FSEntry &, const std::string & expand_sep);
+ UseDesc(const std::tr1::shared_ptr<const UseDescFileInfoSequence> &, const std::string & expand_sep);
~UseDesc();
///\}
diff --git a/paludis/repositories/e/vdb_merger_TEST_cleanup.sh b/paludis/repositories/e/vdb_merger_TEST_cleanup.sh
index 139f9fa..801c8f1 100755
--- a/paludis/repositories/e/vdb_merger_TEST_cleanup.sh
+++ b/paludis/repositories/e/vdb_merger_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d vdb_merger_TEST_dir ] ; then
diff --git a/paludis/repositories/e/vdb_merger_TEST_setup.sh b/paludis/repositories/e/vdb_merger_TEST_setup.sh
index f49dfa8..0ffa2f1 100755
--- a/paludis/repositories/e/vdb_merger_TEST_setup.sh
+++ b/paludis/repositories/e/vdb_merger_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir vdb_merger_TEST_dir || exit 2
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index cd0a136..b8dcaf7 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -368,8 +368,7 @@ VDBRepositoryKeyReadError::VDBRepositoryKeyReadError(
}
void
-VDBRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID> & id,
- const UninstallActionOptions & o, bool reinstalling) const
+VDBRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID> & id, bool reinstalling) const
{
Context context("When uninstalling '" + stringify(*id) + (reinstalling ? "' for a reinstall:" : "':"));
@@ -437,7 +436,6 @@ VDBRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID>
EbuildUninstallCommandParams uninstall_params(EbuildUninstallCommandParams::named_create()
(k::root(), stringify(_imp->params.root))
- (k::disable_cfgpro(), o[k::no_config_protect()])
(k::unmerge_only(), false)
(k::loadsaveenv_dir(), pkg_dir)
(k::load_environment(), load_env.get()));
@@ -843,10 +841,7 @@ VDBRepository::merge(const MergeParams & m)
merger.merge();
if (is_replace)
- {
- UninstallActionOptions uninstall_options(false);
- perform_uninstall(is_replace, uninstall_options, true);
- }
+ perform_uninstall(is_replace, true);
VDBPostMergeCommand post_merge_command(
VDBPostMergeCommandParams::named_create()
diff --git a/paludis/repositories/e/vdb_repository.hh b/paludis/repositories/e/vdb_repository.hh
index 67657de..b47483a 100644
--- a/paludis/repositories/e/vdb_repository.hh
+++ b/paludis/repositories/e/vdb_repository.hh
@@ -105,7 +105,7 @@ namespace paludis
virtual void regenerate_cache() const;
virtual void perform_uninstall(const std::tr1::shared_ptr<const erepository::ERepositoryID> & id,
- const UninstallActionOptions & o, bool reinstalling) const;
+ bool reinstalling) const;
/* RepositoryProvidesInterface */
diff --git a/paludis/repositories/e/vdb_repository.sr b/paludis/repositories/e/vdb_repository.sr
index f18fe13..c687a0d 100644
--- a/paludis/repositories/e/vdb_repository.sr
+++ b/paludis/repositories/e/vdb_repository.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_VDBRepositoryParams()
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index b895f09..817239a 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -337,13 +337,10 @@ namespace test_cases
InstallAction install_action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), vdb_repo)
);
- UninstallAction uninstall_action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false)
- );
+ UninstallAction uninstall_action;
InfoAction info_action;
ConfigAction config_action;
@@ -454,13 +451,10 @@ namespace test_cases
InstallAction install_action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), vdb_repo)
);
- UninstallAction uninstall_action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false)
- );
+ UninstallAction uninstall_action;
InfoAction info_action;
ConfigAction config_action;
@@ -571,13 +565,10 @@ namespace test_cases
InstallAction install_action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), vdb_repo)
);
- UninstallAction uninstall_action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false)
- );
+ UninstallAction uninstall_action;
{
std::vector<FSEntry> cache_contents;
@@ -933,13 +924,10 @@ namespace test_cases
InstallAction install_action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), vdb_repo)
);
- UninstallAction uninstall_action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false)
- );
+ UninstallAction uninstall_action;
TEST_CHECK_EQUAL(read_file(provides_cache), "paludis-3\ninstalled\n");
@@ -1149,7 +1137,6 @@ namespace test_cases
InstallAction install_action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), vdb_repo)
);
diff --git a/paludis/repositories/e/vdb_repository_TEST_cleanup.sh b/paludis/repositories/e/vdb_repository_TEST_cleanup.sh
index e9f03a6..373e86d 100755
--- a/paludis/repositories/e/vdb_repository_TEST_cleanup.sh
+++ b/paludis/repositories/e/vdb_repository_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d vdb_repository_TEST_dir ] ; then
diff --git a/paludis/repositories/e/vdb_repository_TEST_setup.sh b/paludis/repositories/e/vdb_repository_TEST_setup.sh
index f6978d7..fc93fe6 100755
--- a/paludis/repositories/e/vdb_repository_TEST_setup.sh
+++ b/paludis/repositories/e/vdb_repository_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir -p vdb_repository_TEST_dir || exit 1
diff --git a/paludis/repositories/e/vdb_unmerger_TEST_cleanup.sh b/paludis/repositories/e/vdb_unmerger_TEST_cleanup.sh
index 16dea18..db09816 100755
--- a/paludis/repositories/e/vdb_unmerger_TEST_cleanup.sh
+++ b/paludis/repositories/e/vdb_unmerger_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d vdb_unmerger_TEST_dir ] ; then
diff --git a/paludis/repositories/e/vdb_unmerger_TEST_setup.sh b/paludis/repositories/e/vdb_unmerger_TEST_setup.sh
index 013441b..c9fba88 100755
--- a/paludis/repositories/e/vdb_unmerger_TEST_setup.sh
+++ b/paludis/repositories/e/vdb_unmerger_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir vdb_unmerger_TEST_dir || exit 2
diff --git a/paludis/repositories/e/xml_things_TEST_cleanup.sh b/paludis/repositories/e/xml_things_TEST_cleanup.sh
index 5e0843f..dcb24d4 100755
--- a/paludis/repositories/e/xml_things_TEST_cleanup.sh
+++ b/paludis/repositories/e/xml_things_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d xml_things_TEST_dir ] ; then
diff --git a/paludis/repositories/e/xml_things_TEST_setup.sh b/paludis/repositories/e/xml_things_TEST_setup.sh
index 530af80..1360e4e 100755
--- a/paludis/repositories/e/xml_things_TEST_setup.sh
+++ b/paludis/repositories/e/xml_things_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir xml_things_TEST_dir || exit 1
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index e6abafb..019dda3 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -350,6 +350,32 @@ FakeUnacceptedMask::unaccepted_key() const
return _imp->unaccepted_key;
}
+FakeUnsupportedMask::FakeUnsupportedMask()
+{
+}
+
+FakeUnsupportedMask::~FakeUnsupportedMask()
+{
+}
+
+char
+FakeUnsupportedMask::key() const
+{
+ return 'E';
+}
+
+const std::string
+FakeUnsupportedMask::description() const
+{
+ return "Unsupported";
+}
+
+const std::string
+FakeUnsupportedMask::explanation() const
+{
+ return "Marked as unsupported";
+}
+
namespace paludis
{
using namespace std::tr1::placeholders;
@@ -384,6 +410,7 @@ namespace paludis
std::tr1::shared_ptr<FakeMetadataSpecTreeKey<FetchableURISpecTree> > src_uri;
std::tr1::shared_ptr<FakeMetadataSpecTreeKey<SimpleURISpecTree> > homepage;
+ std::tr1::shared_ptr<Mask> unsupported_mask;
mutable bool has_masks;
Implementation(const Environment * const e, const std::tr1::shared_ptr<const FakeRepositoryBase> & r,
@@ -637,18 +664,11 @@ FakePackageID::installed_time_key() const
return std::tr1::shared_ptr<const MetadataTimeKey>();
}
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-FakePackageID::source_origin_key() const
+const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
+FakePackageID::from_repositories_key() const
{
need_keys_added();
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
-}
-
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-FakePackageID::binary_origin_key() const
-{
- need_keys_added();
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
+ return std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >();
}
void
@@ -825,6 +845,9 @@ FakePackageID::need_masks_added() const
std::tr1::shared_ptr<const Mask> breaks_mask(_imp->env->mask_for_breakage(*this));
if (breaks_mask)
add_mask(breaks_mask);
+
+ if (_imp->unsupported_mask)
+ add_mask(_imp->unsupported_mask);
}
void
@@ -839,6 +862,13 @@ FakePackageID::invalidate_masks() const
PackageID::invalidate_masks();
}
+void
+FakePackageID::make_unsupported()
+{
+ invalidate_masks();
+ _imp->unsupported_mask.reset(new FakeUnsupportedMask);
+}
+
namespace
{
struct PerformAction :
diff --git a/paludis/repositories/fake/fake_package_id.hh b/paludis/repositories/fake/fake_package_id.hh
index 95d513e..b463986 100644
--- a/paludis/repositories/fake/fake_package_id.hh
+++ b/paludis/repositories/fake/fake_package_id.hh
@@ -177,6 +177,18 @@ namespace paludis
const std::tr1::shared_ptr<const MetadataKey> unaccepted_key() const;
};
+ class PALUDIS_VISIBLE FakeUnsupportedMask :
+ public UnsupportedMask
+ {
+ public:
+ FakeUnsupportedMask();
+ ~FakeUnsupportedMask();
+
+ char key() const;
+ const std::string description() const;
+ const std::string explanation() const;
+ };
+
/**
* A PackageID in a FakeRepository or a FakeInstalledRepository.
*
@@ -229,14 +241,13 @@ namespace paludis
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const Contents> > > contents_key() const;
virtual const std::tr1::shared_ptr<const MetadataTimeKey> installed_time_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > source_origin_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_origin_key() const;
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<PackageIDSequence> > contains_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const PackageID> > > contained_in_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > fs_location_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<long> > size_of_download_required_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<long> > size_of_all_distfiles_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<bool> > transient_key() const;
+ virtual const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const;
const std::tr1::shared_ptr<const MetadataSpecTreeKey<LicenseSpecTree> > license_key() const;
@@ -269,6 +280,8 @@ namespace paludis
virtual void invalidate_masks() const;
+ void make_unsupported();
+
};
}
diff --git a/paludis/repositories/gems/gem_specification.cc b/paludis/repositories/gems/gem_specification.cc
index d9645d8..a4ece8f 100644
--- a/paludis/repositories/gems/gem_specification.cc
+++ b/paludis/repositories/gems/gem_specification.cc
@@ -420,16 +420,10 @@ GemSpecification::installed_time_key() const
return std::tr1::shared_ptr<const MetadataTimeKey>();
}
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-GemSpecification::source_origin_key() const
-{
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
-}
-
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-GemSpecification::binary_origin_key() const
+const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
+GemSpecification::from_repositories_key() const
{
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
+ return std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >();
}
const std::tr1::shared_ptr<const MetadataCollectionKey<PackageIDSequence> >
diff --git a/paludis/repositories/gems/gem_specification.hh b/paludis/repositories/gems/gem_specification.hh
index 83458bb..b243059 100644
--- a/paludis/repositories/gems/gem_specification.hh
+++ b/paludis/repositories/gems/gem_specification.hh
@@ -108,8 +108,7 @@ namespace paludis
virtual const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > fs_location_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const Contents> > > contents_key() const;
virtual const std::tr1::shared_ptr<const MetadataTimeKey> installed_time_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > source_origin_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_origin_key() const;
+ virtual const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<bool> > transient_key() const;
diff --git a/paludis/repositories/gems/gems.bash b/paludis/repositories/gems/gems.bash
index 302241a..51d18b3 100755
--- a/paludis/repositories/gems/gems.bash
+++ b/paludis/repositories/gems/gems.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
# Copyright (c) 2007 Ciaran McCreesh
diff --git a/paludis/repositories/gems/gems_repository_TEST_cleanup.sh b/paludis/repositories/gems/gems_repository_TEST_cleanup.sh
index 5d20e5c..925666c 100755
--- a/paludis/repositories/gems/gems_repository_TEST_cleanup.sh
+++ b/paludis/repositories/gems/gems_repository_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d gems_repository_TEST_dir ] ; then
diff --git a/paludis/repositories/gems/gems_repository_TEST_setup.sh b/paludis/repositories/gems/gems_repository_TEST_setup.sh
index bbe7b98..b309e87 100755
--- a/paludis/repositories/gems/gems_repository_TEST_setup.sh
+++ b/paludis/repositories/gems/gems_repository_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir gems_repository_TEST_dir || exit 1
diff --git a/paludis/repositories/gems/installed_gems_repository_TEST_cleanup.sh b/paludis/repositories/gems/installed_gems_repository_TEST_cleanup.sh
index 2d8baec..8b75900 100755
--- a/paludis/repositories/gems/installed_gems_repository_TEST_cleanup.sh
+++ b/paludis/repositories/gems/installed_gems_repository_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d installed_gems_repository_TEST_dir ] ; then
diff --git a/paludis/repositories/gems/installed_gems_repository_TEST_setup.sh b/paludis/repositories/gems/installed_gems_repository_TEST_setup.sh
index 4edf8ac..a99ca92 100755
--- a/paludis/repositories/gems/installed_gems_repository_TEST_setup.sh
+++ b/paludis/repositories/gems/installed_gems_repository_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir installed_gems_repository_TEST_dir || exit 1
diff --git a/paludis/repositories/gems/params.sr b/paludis/repositories/gems/params.sr
index f4c4ede..2967785 100644
--- a/paludis/repositories/gems/params.sr
+++ b/paludis/repositories/gems/params.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_RepositoryParams()
diff --git a/paludis/repositories/unavailable/unavailable_id.cc b/paludis/repositories/unavailable/unavailable_id.cc
index d9c3b5b..e93dbb3 100644
--- a/paludis/repositories/unavailable/unavailable_id.cc
+++ b/paludis/repositories/unavailable/unavailable_id.cc
@@ -294,16 +294,10 @@ UnavailableID::installed_time_key() const
return std::tr1::shared_ptr<const MetadataTimeKey>();
}
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-UnavailableID::source_origin_key() const
+const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
+UnavailableID::from_repositories_key() const
{
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
-}
-
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-UnavailableID::binary_origin_key() const
-{
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
+ return std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >();
}
template class PrivateImplementationPattern<UnavailableID>;
diff --git a/paludis/repositories/unavailable/unavailable_id.hh b/paludis/repositories/unavailable/unavailable_id.hh
index aec2ea1..6d7732a 100644
--- a/paludis/repositories/unavailable/unavailable_id.hh
+++ b/paludis/repositories/unavailable/unavailable_id.hh
@@ -84,10 +84,9 @@ namespace paludis
const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const Contents> > >
contents_key() const;
const std::tr1::shared_ptr<const MetadataTimeKey> installed_time_key() const;
- const std::tr1::shared_ptr<const MetadataValueKey<std::string> > source_origin_key() const;
- const std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_origin_key() const;
const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > fs_location_key() const;
const std::tr1::shared_ptr<const MetadataValueKey<bool> > transient_key() const;
+ const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const;
bool supports_action(const SupportsActionTestBase &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/unavailable/unavailable_repository_TEST_cleanup.sh b/paludis/repositories/unavailable/unavailable_repository_TEST_cleanup.sh
index 93760c0..506f9ac 100755
--- a/paludis/repositories/unavailable/unavailable_repository_TEST_cleanup.sh
+++ b/paludis/repositories/unavailable/unavailable_repository_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d unavailable_repository_TEST_dir ] ; then
diff --git a/paludis/repositories/unavailable/unavailable_repository_TEST_setup.sh b/paludis/repositories/unavailable/unavailable_repository_TEST_setup.sh
index ae6501d..ed18fa7 100755
--- a/paludis/repositories/unavailable/unavailable_repository_TEST_setup.sh
+++ b/paludis/repositories/unavailable/unavailable_repository_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir unavailable_repository_TEST_dir || exit 1
diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc
index 39ceed6..b4f7bd7 100644
--- a/paludis/repositories/unpackaged/installed_id.cc
+++ b/paludis/repositories/unpackaged/installed_id.cc
@@ -49,6 +49,11 @@ using namespace paludis::unpackaged_repositories;
namespace
{
+ std::string format_string(const std::string & i, const Formatter<std::string> & f)
+ {
+ return f.format(i, format::Plain());
+ }
+
class InstalledUnpackagedFSEntryKey :
public MetadataValueKey<FSEntry>
{
@@ -168,6 +173,54 @@ namespace
}
};
+ class InstalledUnpackagedStringSetKey :
+ public MetadataCollectionKey<Set<std::string> >
+ {
+ private:
+ mutable std::tr1::shared_ptr<Set<std::string> > _v;
+ mutable Mutex _mutex;
+ FSEntrySequence _f;
+
+ public:
+ InstalledUnpackagedStringSetKey(const std::string & r, const std::string & h, const MetadataKeyType t) :
+ MetadataCollectionKey<Set<std::string> > (r, h, t)
+ {
+ }
+
+ void add_source(const FSEntry & f)
+ {
+ _f.push_back(f);
+ }
+
+ const std::tr1::shared_ptr<const Set<std::string> > value() const
+ {
+ Lock l(_mutex);
+ if (_v)
+ return _v;
+
+ _v.reset(new Set<std::string>());
+ for (FSEntrySequence::ConstIterator a(_f.begin()), a_end(_f.end()) ;
+ a != a_end ; ++a)
+ {
+ std::ifstream f(stringify(*a).c_str());
+ if (! f)
+ {
+ Context context("When reading '" + stringify(*a) + "' as an InstalledUnpackagedStringKey:");
+ throw FSError("Couldn't open '" + stringify(*a) + "' for read");
+ }
+ _v->insert(strip_trailing(std::string((std::istreambuf_iterator<char>(f)),
+ std::istreambuf_iterator<char>()), "\n"));
+ }
+ return _v;
+ }
+
+ std::string pretty_print_flat(const Formatter<std::string> & f) const
+ {
+ using namespace std::tr1::placeholders;
+ return join(value()->begin(), value()->end(), " ", std::tr1::bind(&format_string, _1, f));
+ }
+ };
+
class InstalledUnpackagedDependencyKey :
public MetadataSpecTreeKey<DependencySpecTree>
{
@@ -248,8 +301,7 @@ namespace paludis
std::tr1::shared_ptr<InstalledUnpackagedFSEntryKey> fs_location_key;
std::tr1::shared_ptr<InstalledUnpackagedContentsKey> contents_key;
std::tr1::shared_ptr<InstalledUnpackagedTimeKey> installed_time_key;
- std::tr1::shared_ptr<InstalledUnpackagedStringKey> source_origin_key;
- std::tr1::shared_ptr<InstalledUnpackagedStringKey> binary_origin_key;
+ std::tr1::shared_ptr<InstalledUnpackagedStringSetKey> from_repositories_key;
std::tr1::shared_ptr<InstalledUnpackagedStringKey> description_key;
std::tr1::shared_ptr<InstalledUnpackagedDependencyKey> build_dependencies_key;
std::tr1::shared_ptr<InstalledUnpackagedDependencyKey> run_dependencies_key;
@@ -284,13 +336,12 @@ namespace paludis
installed_time_key.reset(new InstalledUnpackagedTimeKey(l / "contents"));
}
+ from_repositories_key.reset(new InstalledUnpackagedStringSetKey("source_repository",
+ "Source repository", mkt_normal));
if ((l / "source_repository").exists())
- source_origin_key.reset(new InstalledUnpackagedStringKey("source_repository", "Source repository", l / "source_repository",
- mkt_normal));
-
+ from_repositories_key->add_source(l / "source_repository");
if ((l / "binary_repository").exists())
- binary_origin_key.reset(new InstalledUnpackagedStringKey("binary_repository", "Binary repository", l / "binary_repository",
- mkt_normal));
+ from_repositories_key->add_source(l / "binary_repository");
if ((l / "description").exists())
description_key.reset(new InstalledUnpackagedStringKey("description", "Description", l / "description", mkt_significant));
@@ -319,10 +370,8 @@ InstalledUnpackagedID::InstalledUnpackagedID(const Environment * const e, const
add_metadata_key(_imp->contents_key);
if (_imp->installed_time_key)
add_metadata_key(_imp->installed_time_key);
- if (_imp->source_origin_key)
- add_metadata_key(_imp->source_origin_key);
- if (_imp->binary_origin_key)
- add_metadata_key(_imp->binary_origin_key);
+ if (_imp->from_repositories_key)
+ add_metadata_key(_imp->from_repositories_key);
if (_imp->description_key)
add_metadata_key(_imp->description_key);
if (_imp->build_dependencies_key)
@@ -488,16 +537,10 @@ InstalledUnpackagedID::installed_time_key() const
return _imp->installed_time_key;
}
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-InstalledUnpackagedID::source_origin_key() const
-{
- return _imp->source_origin_key;
-}
-
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-InstalledUnpackagedID::binary_origin_key() const
+const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
+InstalledUnpackagedID::from_repositories_key() const
{
- return _imp->binary_origin_key;
+ return _imp->from_repositories_key;
}
const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> >
@@ -633,9 +676,9 @@ namespace
{
}
- void visit(UninstallAction & a)
+ void visit(UninstallAction &)
{
- id->uninstall(a.options, false);
+ id->uninstall(false);
}
};
}
@@ -681,7 +724,7 @@ InstalledUnpackagedID::extra_hash_value() const
}
void
-InstalledUnpackagedID::uninstall(const UninstallActionOptions &, const bool replace) const
+InstalledUnpackagedID::uninstall(const bool replace) const
{
Context context("When uninstalling '" + stringify(*this) + "':");
diff --git a/paludis/repositories/unpackaged/installed_id.hh b/paludis/repositories/unpackaged/installed_id.hh
index 46823d5..d81a985 100644
--- a/paludis/repositories/unpackaged/installed_id.hh
+++ b/paludis/repositories/unpackaged/installed_id.hh
@@ -73,10 +73,9 @@ namespace paludis
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const Contents> > > contents_key() const;
virtual const std::tr1::shared_ptr<const MetadataTimeKey> installed_time_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > source_origin_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_origin_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > fs_location_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<bool> > transient_key() const;
+ virtual const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const;
virtual bool supports_action(const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual void perform_action(Action &) const;
@@ -88,7 +87,7 @@ namespace paludis
virtual std::size_t extra_hash_value() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- void uninstall(const UninstallActionOptions &, const bool replace) const;
+ void uninstall(const bool replace) const;
};
}
}
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 03fe9f7..acd6f33 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -367,9 +367,7 @@ InstalledUnpackagedRepository::merge(const MergeParams & m)
if (if_overwritten_id)
{
- std::tr1::static_pointer_cast<const InstalledUnpackagedID>(if_overwritten_id)->uninstall(UninstallActionOptions::named_create()
- (k::no_config_protect(), false),
- true);
+ std::tr1::static_pointer_cast<const InstalledUnpackagedID>(if_overwritten_id)->uninstall(true);
}
}
diff --git a/paludis/repositories/unpackaged/installed_repository.sr b/paludis/repositories/unpackaged/installed_repository.sr
index 246cecc..83ffdf7 100644
--- a/paludis/repositories/unpackaged/installed_repository.sr
+++ b/paludis/repositories/unpackaged/installed_repository.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_InstalledUnpackagedRepositoryParams()
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc
index 23479a8..bd01732 100644
--- a/paludis/repositories/unpackaged/installed_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc
@@ -255,9 +255,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::All())]->begin());
- UninstallAction action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false)
- );
+ UninstallAction action;
id->perform_action(action);
TEST_CHECK(! FSEntry("installed_repository_TEST_dir/root2/first").exists());
@@ -306,9 +304,7 @@ namespace test_cases
generator::Matches(parse_user_package_dep_spec("cat-one/foo:fred",
&env, UserPackageDepSpecOptions())))]->begin());
- UninstallAction action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false)
- );
+ UninstallAction action;
id->perform_action(action);
TEST_CHECK(FSEntry("installed_repository_TEST_dir/repo3/indices/categories/cat-one/foo").is_symbolic_link());
@@ -383,7 +379,7 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "), "");
}
@@ -391,10 +387,9 @@ namespace test_cases
InstallAction action(InstallActionOptions::named_create()
(k::destination(), repo)
- (k::no_config_protect(), false)
(k::checks(), iaco_default)
(k::debug_build(), iado_none));
- (*env[selection::RequireExactlyOne(generator::Repository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
+ (*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
TEST_CHECK(FSEntry("installed_repository_TEST_dir/root4/dir").is_directory());
TEST_CHECK(FSEntry("installed_repository_TEST_dir/root4/dir/4a").is_regular_file());
@@ -402,7 +397,7 @@ namespace test_cases
repo->invalidate();
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4a-1.0:foo::installed-unpackaged");
}
@@ -439,17 +434,16 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4a-1.0:foo::installed-unpackaged");
}
InstallAction action(InstallActionOptions::named_create()
(k::destination(), repo)
- (k::no_config_protect(), false)
(k::checks(), iaco_default)
(k::debug_build(), iado_none));
- (*env[selection::RequireExactlyOne(generator::Repository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
+ (*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
TEST_CHECK(FSEntry("installed_repository_TEST_dir/root4/dir").is_directory());
TEST_CHECK(FSEntry("installed_repository_TEST_dir/root4/dir/4a").is_regular_file());
@@ -460,7 +454,7 @@ namespace test_cases
repo->invalidate();
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4a-1.0:foo::installed-unpackaged cat/pkg4b-1.0:foo::installed-unpackaged");
}
@@ -497,17 +491,16 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4a-1.0:foo::installed-unpackaged cat/pkg4b-1.0:foo::installed-unpackaged");
}
InstallAction action(InstallActionOptions::named_create()
(k::destination(), repo)
- (k::no_config_protect(), false)
(k::checks(), iaco_default)
(k::debug_build(), iado_none));
- (*env[selection::RequireExactlyOne(generator::Repository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
+ (*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
TEST_CHECK(FSEntry("installed_repository_TEST_dir/root4/dir").is_directory());
TEST_CHECK(FSEntry("installed_repository_TEST_dir/root4/dir/4a").is_regular_file());
@@ -518,7 +511,7 @@ namespace test_cases
repo->invalidate();
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4a-1.0:foo::installed-unpackaged cat/pkg4b-1.0:foo::installed-unpackaged");
}
@@ -539,13 +532,12 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4a-1.0:foo::installed-unpackaged cat/pkg4b-1.0:foo::installed-unpackaged");
}
- UninstallAction action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false));
+ UninstallAction action;
(*env[selection::RequireExactlyOne(generator::Matches(
parse_user_package_dep_spec("cat/pkg4a",
&env, UserPackageDepSpecOptions())))]->begin())->perform_action(action);
@@ -559,7 +551,7 @@ namespace test_cases
repo->invalidate();
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(
- env[selection::RequireExactlyOne(generator::Repository(RepositoryName("installed-unpackaged")))]);
+ env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4b-1.0:foo::installed-unpackaged");
}
@@ -580,13 +572,12 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4b-1.0:foo::installed-unpackaged");
}
- UninstallAction action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false));
+ UninstallAction action;
(*env[selection::RequireExactlyOne(generator::Matches(
parse_user_package_dep_spec("cat/pkg4b",
&env, UserPackageDepSpecOptions())))]->begin())->perform_action(action);
@@ -596,7 +587,7 @@ namespace test_cases
repo->invalidate();
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"");
}
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST_cleanup.sh b/paludis/repositories/unpackaged/installed_repository_TEST_cleanup.sh
index 66e79f3..ed598a9 100755
--- a/paludis/repositories/unpackaged/installed_repository_TEST_cleanup.sh
+++ b/paludis/repositories/unpackaged/installed_repository_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d installed_repository_TEST_dir ] ; then
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST_setup.sh b/paludis/repositories/unpackaged/installed_repository_TEST_setup.sh
index 1c8c958..c526a5c 100755
--- a/paludis/repositories/unpackaged/installed_repository_TEST_setup.sh
+++ b/paludis/repositories/unpackaged/installed_repository_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir installed_repository_TEST_dir || exit 1
diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc
index 31be89c..fc132c8 100644
--- a/paludis/repositories/unpackaged/unpackaged_id.cc
+++ b/paludis/repositories/unpackaged/unpackaged_id.cc
@@ -259,16 +259,10 @@ UnpackagedID::installed_time_key() const
return std::tr1::shared_ptr<const MetadataTimeKey>();
}
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-UnpackagedID::source_origin_key() const
+const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
+UnpackagedID::from_repositories_key() const
{
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
-}
-
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-UnpackagedID::binary_origin_key() const
-{
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
+ return std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >();
}
const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> >
diff --git a/paludis/repositories/unpackaged/unpackaged_id.hh b/paludis/repositories/unpackaged/unpackaged_id.hh
index 1a9351e..a66a397 100644
--- a/paludis/repositories/unpackaged/unpackaged_id.hh
+++ b/paludis/repositories/unpackaged/unpackaged_id.hh
@@ -71,10 +71,9 @@ namespace paludis
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const Contents> > > contents_key() const;
virtual const std::tr1::shared_ptr<const MetadataTimeKey> installed_time_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > source_origin_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_origin_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > fs_location_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<bool> > transient_key() const;
+ virtual const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const;
virtual bool supports_action(const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual void perform_action(Action &) const;
diff --git a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
index 0a39157..90bf59e 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
@@ -218,7 +218,6 @@ namespace test_cases
*env[selection::RequireExactlyOne(generator::All())]->begin());
InstallAction action(InstallActionOptions::named_create()
- (k::no_config_protect(), false)
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
(k::destination(), installed_repo)
@@ -273,7 +272,6 @@ namespace test_cases
*env[selection::RequireExactlyOne(generator::All())]->begin());
InstallAction action(InstallActionOptions::named_create()
- (k::no_config_protect(), false)
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
(k::destination(), installed_repo)
diff --git a/paludis/repositories/unpackaged/unpackaged_repository_TEST_cleanup.sh b/paludis/repositories/unpackaged/unpackaged_repository_TEST_cleanup.sh
index b6991d9..f3ef898 100755
--- a/paludis/repositories/unpackaged/unpackaged_repository_TEST_cleanup.sh
+++ b/paludis/repositories/unpackaged/unpackaged_repository_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d unpackaged_repository_TEST_dir ] ; then
diff --git a/paludis/repositories/unpackaged/unpackaged_repository_TEST_setup.sh b/paludis/repositories/unpackaged/unpackaged_repository_TEST_setup.sh
index 0f29013..b42feb6 100755
--- a/paludis/repositories/unpackaged/unpackaged_repository_TEST_setup.sh
+++ b/paludis/repositories/unpackaged/unpackaged_repository_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir unpackaged_repository_TEST_dir || exit 1
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index bb598ad..d5d5339 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -65,7 +65,7 @@ namespace paludis
.package(v->name())
.version_requirement(VersionRequirement(vo_equal, v->version()))
.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(v->slot())))
- .repository(v->repository()->name()))))
+ .in_repository(v->repository()->name()))))
:
new TreeLeaf<DependencySpecTree, PackageDepSpec>(make_shared_ptr(new PackageDepSpec(
make_package_dep_spec()
@@ -318,16 +318,10 @@ VirtualsPackageID::installed_time_key() const
return std::tr1::shared_ptr<const MetadataTimeKey>();
}
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-VirtualsPackageID::source_origin_key() const
+const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
+VirtualsPackageID::from_repositories_key() const
{
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
-}
-
-const std::tr1::shared_ptr<const MetadataValueKey<std::string> >
-VirtualsPackageID::binary_origin_key() const
-{
- return std::tr1::shared_ptr<const MetadataValueKey<std::string> >();
+ return std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > >();
}
bool
diff --git a/paludis/repositories/virtuals/package_id.hh b/paludis/repositories/virtuals/package_id.hh
index 704fb22..d5b9104 100644
--- a/paludis/repositories/virtuals/package_id.hh
+++ b/paludis/repositories/virtuals/package_id.hh
@@ -97,12 +97,11 @@ namespace paludis
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const Contents> > > contents_key() const;
virtual const std::tr1::shared_ptr<const MetadataTimeKey> installed_time_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > source_origin_key() const;
- virtual const std::tr1::shared_ptr<const MetadataValueKey<std::string> > binary_origin_key() const;
virtual const std::tr1::shared_ptr<const MetadataCollectionKey<PackageIDSequence> > contains_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<std::tr1::shared_ptr<const PackageID> > > contained_in_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<FSEntry> > fs_location_key() const;
virtual const std::tr1::shared_ptr<const MetadataValueKey<bool> > transient_key() const;
+ virtual const std::tr1::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const;
virtual bool supports_action(const SupportsActionTestBase &) const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual void perform_action(Action &) const;
diff --git a/paludis/repository.hh b/paludis/repository.hh
index e128812..a16fa83 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -561,8 +561,6 @@ namespace paludis
virtual ~RepositoryDestinationInterface();
};
- class ERepositoryParams;
-
/**
* Interface for handling ERepository specific functionality.
*
@@ -580,8 +578,6 @@ namespace paludis
virtual std::string accept_keywords_variable() const = 0;
virtual std::string arch_variable() const = 0;
- virtual const ERepositoryParams & params() const = 0;
-
///\}
///\name Profile setting and querying functions
@@ -600,13 +596,6 @@ namespace paludis
///\}
- ///\name Layout helpers
- ///\{
-
- virtual FSEntry info_variables_file(const FSEntry &) const = 0;
-
- ///\}
-
virtual ~RepositoryEInterface();
};
diff --git a/paludis/repository_name_cache_TEST_cleanup.sh b/paludis/repository_name_cache_TEST_cleanup.sh
index e2bd542..ae27518 100755
--- a/paludis/repository_name_cache_TEST_cleanup.sh
+++ b/paludis/repository_name_cache_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d repository_name_cache_TEST_dir ] ; then
diff --git a/paludis/repository_name_cache_TEST_setup.sh b/paludis/repository_name_cache_TEST_setup.sh
index 6252764..1771239 100755
--- a/paludis/repository_name_cache_TEST_setup.sh
+++ b/paludis/repository_name_cache_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir repository_name_cache_TEST_dir || exit 1
diff --git a/paludis/set_file.se b/paludis/set_file.se
index 05da791..805b65a 100644
--- a/paludis/set_file.se
+++ b/paludis/set_file.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_SetFileType()
diff --git a/paludis/set_file_TEST_cleanup.sh b/paludis/set_file_TEST_cleanup.sh
index d43acb2..ae8f66a 100755
--- a/paludis/set_file_TEST_cleanup.sh
+++ b/paludis/set_file_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d set_file_TEST_dir ] ; then
diff --git a/paludis/set_file_TEST_setup.sh b/paludis/set_file_TEST_setup.sh
index 5f61f97..eb212f6 100755
--- a/paludis/set_file_TEST_setup.sh
+++ b/paludis/set_file_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir set_file_TEST_dir || exit 2
diff --git a/paludis/stage_options.sr b/paludis/stage_options.sr
index 7d49396..22d0f75 100644
--- a/paludis/stage_options.sr
+++ b/paludis/stage_options.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_StageOptions()
diff --git a/paludis/stripper_TEST_cleanup.sh b/paludis/stripper_TEST_cleanup.sh
index 7d22786..fa22278 100755
--- a/paludis/stripper_TEST_cleanup.sh
+++ b/paludis/stripper_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d stripper_TEST_dir ] ; then
diff --git a/paludis/stripper_TEST_setup.sh b/paludis/stripper_TEST_setup.sh
index f53e2f3..39bd118 100755
--- a/paludis/stripper_TEST_setup.sh
+++ b/paludis/stripper_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir stripper_TEST_dir || exit 2
diff --git a/paludis/syncers/dobzr.in b/paludis/syncers/dobzr.in
index 0872a90..5241ba1 100644
--- a/paludis/syncers/dobzr.in
+++ b/paludis/syncers/dobzr.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
diff --git a/paludis/syncers/docvs.in b/paludis/syncers/docvs.in
index 6b7c982..6a3a2a1 100644
--- a/paludis/syncers/docvs.in
+++ b/paludis/syncers/docvs.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
diff --git a/paludis/syncers/dodarcs.in b/paludis/syncers/dodarcs.in
index 64bde51..dd06b56 100644
--- a/paludis/syncers/dodarcs.in
+++ b/paludis/syncers/dodarcs.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
diff --git a/paludis/syncers/dodummy b/paludis/syncers/dodummy
index 602783f..257d62b 100644
--- a/paludis/syncers/dodummy
+++ b/paludis/syncers/dodummy
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
diff --git a/paludis/syncers/dogit.in b/paludis/syncers/dogit.in
index 239bed7..e42b52d 100644
--- a/paludis/syncers/dogit.in
+++ b/paludis/syncers/dogit.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
diff --git a/paludis/syncers/dorsync.in b/paludis/syncers/dorsync.in
index fb25832..36ca1a9 100644
--- a/paludis/syncers/dorsync.in
+++ b/paludis/syncers/dorsync.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
diff --git a/paludis/syncers/dosvn.in b/paludis/syncers/dosvn.in
index 9210e1c..c4e708b 100644
--- a/paludis/syncers/dosvn.in
+++ b/paludis/syncers/dosvn.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
diff --git a/paludis/syncers/dotar.in b/paludis/syncers/dotar.in
index 8c12b7b..45e6f4d 100644
--- a/paludis/syncers/dotar.in
+++ b/paludis/syncers/dotar.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source "${PALUDIS_EBUILD_DIR}/echo_functions.bash"
diff --git a/paludis/uninstall_list.se b/paludis/uninstall_list.se
index 2186e31..8736eaa 100644
--- a/paludis/uninstall_list.se
+++ b/paludis/uninstall_list.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_UninstallListEntryKind()
diff --git a/paludis/uninstall_list.sr b/paludis/uninstall_list.sr
index 00c25dc..78af011 100644
--- a/paludis/uninstall_list.sr
+++ b/paludis/uninstall_list.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_UninstallListOptions()
diff --git a/paludis/uninstall_list_TEST.cc b/paludis/uninstall_list_TEST.cc
index c8cf335..460a5f9 100644
--- a/paludis/uninstall_list_TEST.cc
+++ b/paludis/uninstall_list_TEST.cc
@@ -21,11 +21,11 @@
#include <paludis/repositories/fake/fake_repository.hh>
#include <paludis/repositories/fake/fake_installed_repository.hh>
#include <paludis/repositories/fake/fake_package_id.hh>
-#include <paludis/repositories/virtuals/virtuals_repository.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/visitor-impl.hh>
#include <paludis/util/options.hh>
#include <paludis/package_database.hh>
+#include <paludis/repository_maker.hh>
#include <paludis/user_dep_spec.hh>
#include <test/test_framework.hh>
#include <test/test_runner.hh>
@@ -33,6 +33,8 @@
#include <list>
#include <ostream>
+#include "config.h"
+
using namespace paludis;
using namespace test;
@@ -46,6 +48,16 @@ namespace paludis
}
}
+#ifdef ENABLE_VIRTUALS_REPOSITORY
+namespace
+{
+ std::string virtuals_repo_keys(const std::string &)
+ {
+ return "";
+ }
+}
+#endif
+
namespace test_cases
{
/**
@@ -58,7 +70,9 @@ namespace test_cases
protected:
TestEnvironment env;
std::tr1::shared_ptr<FakeInstalledRepository> installed_repo;
- std::tr1::shared_ptr<VirtualsRepository> virtuals_repo;
+#ifdef ENABLE_VIRTUALS_REPOSITORY
+ std::tr1::shared_ptr<Repository> virtuals_repo;
+#endif
std::tr1::shared_ptr<PackageIDSequence> targets;
std::list<std::string> expected;
bool done_populate;
@@ -71,13 +85,17 @@ namespace test_cases
TestCase("uninstall list " + s),
env(),
installed_repo(new FakeInstalledRepository(&env, RepositoryName("installed"))),
- virtuals_repo(new VirtualsRepository(&env)),
+#ifdef ENABLE_VIRTUALS_REPOSITORY
+ virtuals_repo((*(*RepositoryMaker::get_instance())["virtuals"])(&env, virtuals_repo_keys)),
+#endif
targets(new PackageIDSequence),
done_populate(false),
unused_target(false)
{
env.package_database()->add_repository(2, installed_repo);
+#ifdef ENABLE_VIRTUALS_REPOSITORY
env.package_database()->add_repository(1, virtuals_repo);
+#endif
}
/**
diff --git a/paludis/uninstall_task.cc b/paludis/uninstall_task.cc
index 0b81455..9a3b387 100644
--- a/paludis/uninstall_task.cc
+++ b/paludis/uninstall_task.cc
@@ -87,7 +87,6 @@ namespace paludis
struct Implementation<UninstallTask>
{
Environment * const env;
- UninstallActionOptions uninstall_options;
std::list<std::string> raw_targets;
std::list<std::tr1::shared_ptr<const PackageDepSpec> > targets;
@@ -105,7 +104,6 @@ namespace paludis
Implementation<UninstallTask>(Environment * const e) :
env(e),
- uninstall_options(false),
pretend(false),
preserve_world(false),
all_versions(false),
@@ -136,12 +134,6 @@ UninstallTask::set_pretend(const bool v)
}
void
-UninstallTask::set_no_config_protect(const bool v)
-{
- _imp->uninstall_options[k::no_config_protect()] = v;
-}
-
-void
UninstallTask::set_preserve_world(const bool v)
{
_imp->preserve_world = v;
@@ -161,15 +153,43 @@ UninstallTask::add_target(const std::string & target)
try
{
std::tr1::shared_ptr<PackageDepSpec> pds(new PackageDepSpec(parse_user_package_dep_spec(
- target, _imp->env, UserPackageDepSpecOptions() + updso_throw_if_set,
+ target, _imp->env, UserPackageDepSpecOptions() + updso_throw_if_set + updso_allow_wildcards,
filter::SupportsAction<UninstallAction>())));
if (_imp->had_set_targets)
throw HadBothPackageAndSetTargets();
_imp->had_package_targets = true;
- pds->set_tag(std::tr1::shared_ptr<const DepTag>(new TargetDepTag));
- _imp->targets.push_back(pds);
+ if (pds->package_ptr())
+ {
+ /* don't need to dewildcard */
+ pds->set_tag(std::tr1::shared_ptr<const DepTag>(new TargetDepTag));
+ _imp->targets.push_back(pds);
+ }
+ else
+ {
+ /* blech. wildcards. */
+ std::tr1::shared_ptr<const PackageIDSequence> names((*_imp->env)[selection::BestVersionOnly(
+ generator::Matches(*pds) | filter::SupportsAction<UninstallAction>())]);
+ if (names->empty())
+ {
+ /* no match. we'll get an error from this later anyway. */
+ pds->set_tag(std::tr1::shared_ptr<const DepTag>(new TargetDepTag));
+ _imp->targets.push_back(pds);
+ }
+ else
+ {
+ for (PackageIDSequence::ConstIterator i(names->begin()), i_end(names->end()) ;
+ i != i_end ; ++i)
+ {
+ PartiallyMadePackageDepSpec p(*pds);
+ p.package((*i)->name());
+ std::tr1::shared_ptr<PackageDepSpec> pdsn(new PackageDepSpec(p));
+ pdsn->set_tag(std::tr1::shared_ptr<const DepTag>(new TargetDepTag));
+ _imp->targets.push_back(pdsn);
+ }
+ }
+ }
}
catch (const GotASetNotAPackageDepSpec &)
{
@@ -339,7 +359,7 @@ UninstallTask::execute()
try
{
- UninstallAction uninstall_action(_imp->uninstall_options);
+ UninstallAction uninstall_action;
i->package_id->perform_action(uninstall_action);
}
catch (const UninstallActionError & e)
diff --git a/paludis/uninstall_task.hh b/paludis/uninstall_task.hh
index 5e0d586..52628a4 100644
--- a/paludis/uninstall_task.hh
+++ b/paludis/uninstall_task.hh
@@ -112,7 +112,6 @@ namespace paludis
///\name Behaviour options
///\{
- void set_no_config_protect(const bool value);
void set_pretend(const bool value);
void set_preserve_world(const bool value);
void set_all_versions(const bool value);
diff --git a/paludis/user_dep_spec.cc b/paludis/user_dep_spec.cc
index d2c1c49..78823b2 100644
--- a/paludis/user_dep_spec.cc
+++ b/paludis/user_dep_spec.cc
@@ -18,6 +18,7 @@
*/
#include <paludis/user_dep_spec.hh>
+#include <paludis/elike_package_dep_spec.hh>
#include <paludis/environment.hh>
#include <paludis/elike_use_requirement.hh>
#include <paludis/version_operator.hh>
@@ -36,65 +37,62 @@ using namespace paludis;
namespace
{
- void parse_package_bit(PartiallyMadePackageDepSpec & result, const std::string & ss, const std::string & t,
+ void user_add_package_requirement(const std::string & s, PartiallyMadePackageDepSpec & result,
const Environment * const env, const UserPackageDepSpecOptions & options,
const Filter & filter)
{
- if (t.length() >= 3 && (0 == t.compare(0, 2, "*/")))
+ if (s.length() >= 3 && (0 == s.compare(0, 2, "*/")))
{
if (! options[updso_allow_wildcards])
- throw PackageDepSpecError("Wildcard '*' not allowed in '" + stringify(ss) + "'");
+ throw PackageDepSpecError("Wildcard '*' not allowed");
- if (0 != t.compare(t.length() - 2, 2, "/*"))
- result.package_name_part(PackageNamePart(t.substr(2)));
+ if (0 != s.compare(s.length() - 2, 2, "/*"))
+ result.package_name_part(PackageNamePart(s.substr(2)));
}
- else if (t.length() >= 3 && (0 == t.compare(t.length() - 2, 2, "/*")))
+ else if (s.length() >= 3 && (0 == s.compare(s.length() - 2, 2, "/*")))
{
if (! options[updso_allow_wildcards])
- throw PackageDepSpecError("Wildcard '*' not allowed in '" + stringify(ss) + "'");
+ throw PackageDepSpecError("Wildcard '*' not allowed in '" + stringify(s) + "'");
- result.category_name_part(CategoryNamePart(t.substr(0, t.length() - 2)));
+ result.category_name_part(CategoryNamePart(s.substr(0, s.length() - 2)));
}
- else if (t == "*")
- throw PackageDepSpecError("Use '*/*' not '*' to match everything in '" + stringify(ss) + "'");
- else if (std::string::npos != t.find('/'))
- result.package(QualifiedPackageName(t));
+ else if (s == "*")
+ throw PackageDepSpecError("Use '*/*' not '*' to match everything");
+ else if (std::string::npos != s.find('/'))
+ result.package(QualifiedPackageName(s));
else
{
if (options[updso_no_disambiguation])
- throw PackageDepSpecError("Need an explicit category specified in '" + stringify(ss) + "'");
- result.package(env->package_database()->fetch_unique_qualified_package_name(PackageNamePart(t), filter));
+ throw PackageDepSpecError("Need an explicit category specified");
+ result.package(env->package_database()->fetch_unique_qualified_package_name(PackageNamePart(s), filter));
}
}
-}
-
-PackageDepSpec
-paludis::parse_user_package_dep_spec(const std::string & ss, const Environment * const env,
- const UserPackageDepSpecOptions & options, const Filter & filter)
-{
- Context context("When parsing package dep spec '" + ss + "':");
-
- if (ss.empty())
- throw PackageDepSpecError("Got empty dep spec");
-
- if (options[updso_throw_if_set] && std::string::npos == ss.find_first_of("/:[<>=~"))
- try
- {
- SetName sn(ss);
- if (options[updso_no_disambiguation] || env->set(sn))
- throw GotASetNotAPackageDepSpec(ss);
- }
- catch (const SetNameError &)
- {
- }
- std::string s(ss);
- PartiallyMadePackageDepSpec result;
- bool had_bracket_version_requirements(false);
+ void user_check_sanity(const std::string & s, const UserPackageDepSpecOptions & options,
+ const Environment * const env)
+ {
+ if (s.empty())
+ throw PackageDepSpecError("Got empty dep spec");
+
+ if (options[updso_throw_if_set] && std::string::npos == s.find_first_of("/:[<>=~"))
+ try
+ {
+ SetName sn(s);
+ if (options[updso_no_disambiguation] || env->set(sn))
+ throw GotASetNotAPackageDepSpec(s);
+ }
+ catch (const SetNameError &)
+ {
+ }
+ }
- std::string::size_type use_group_p;
- while (std::string::npos != ((use_group_p = s.rfind('['))))
+ bool user_remove_trailing_square_bracket_if_exists(std::string & s, PartiallyMadePackageDepSpec & result,
+ bool & had_bracket_version_requirements)
{
+ std::string::size_type use_group_p;
+ if (std::string::npos == ((use_group_p = s.rfind('['))))
+ return false;
+
if (s.at(s.length() - 1) != ']')
throw PackageDepSpecError("Mismatched []");
@@ -147,7 +145,7 @@ paludis::parse_user_package_dep_spec(const std::string & ss, const Environment *
else if (needed_mode != flag.at(opos))
throw PackageDepSpecError("Mixed & and | inside []");
- result.version_requirements_mode(flag.at(opos) == '|' ? vr_or : vr_and);
+ result.version_requirements_mode((flag.at(opos) == '|' ? vr_or : vr_and));
ver = flag.substr(0, opos++);
flag.erase(0, opos);
}
@@ -181,76 +179,73 @@ paludis::parse_user_package_dep_spec(const std::string & ss, const Environment *
};
s.erase(use_group_p);
- }
- std::string::size_type repo_p;
- if (std::string::npos != ((repo_p = s.rfind("::"))))
- {
- result.repository(RepositoryName(s.substr(repo_p + 2)));
- s.erase(repo_p);
+ return true;
}
- std::string::size_type slot_p;
- if (std::string::npos != ((slot_p = s.rfind(':'))))
+ void
+ user_remove_trailing_slot_if_exists(std::string & s, PartiallyMadePackageDepSpec & result)
{
- result.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(SlotName(s.substr(slot_p + 1)))));
- s.erase(slot_p);
+ std::string::size_type slot_p(s.rfind(':'));
+ if (std::string::npos != slot_p)
+ {
+ result.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(SlotName(s.substr(slot_p + 1)))));
+ s.erase(slot_p);
+ }
}
- if (std::string::npos != std::string("<>=~").find(s.at(0)))
+ void
+ user_remove_trailing_repo_if_exists(std::string & s, PartiallyMadePackageDepSpec & result)
{
- if (had_bracket_version_requirements)
- throw PackageDepSpecError("Cannot mix [] and traditional version specifications");
-
- std::string::size_type p(1);
- if (s.length() > 1 && std::string::npos != std::string("<>=~").find(s.at(1)))
- ++p;
- VersionOperator op(s.substr(0, p));
- std::string::size_type q(p);
+ std::string::size_type repo_p;
+ if (std::string::npos == ((repo_p = s.rfind("::"))))
+ return;
- while (true)
- {
- if (p >= s.length())
- throw PackageDepSpecError("Couldn't parse dep spec '" + ss + "'");
- q = s.find('-', q + 1);
- if ((std::string::npos == q) || (++q >= s.length()))
- throw PackageDepSpecError("Couldn't parse dep spec '" + ss + "'");
- if ((s.at(q) >= '0' && s.at(q) <= '9') || (0 == s.compare(q, 3, "scm")))
- break;
- }
+ std::string repo_name(s.substr(repo_p + 2));
+ s.erase(repo_p);
- std::string::size_type new_q(q);
- while (true)
+ std::string::size_type arrow_p(repo_name.find("->"));
+ if (std::string::npos == arrow_p)
+ result.in_repository(RepositoryName(repo_name));
+ else
{
- if (new_q >= s.length())
- break;
- new_q = s.find('-', new_q + 1);
- if ((std::string::npos == new_q) || (++new_q >= s.length()))
- break;
- if (s.at(new_q) >= '0' && s.at(new_q) <= '9')
- q = new_q;
- }
+ std::string from_repository(repo_name.substr(0, arrow_p));
+ std::string to_repository(repo_name.substr(arrow_p + 2));
- std::string t(s.substr(p, q - p - 1));
- parse_package_bit(result, ss, t, env, options, filter);
+ if (from_repository.empty() && to_repository.empty())
+ throw PackageDepSpecError("::-> requires either a from or a to repository");
- if ('*' == s.at(s.length() - 1))
- {
- if (op != vo_equal)
- Log::get_instance()->message("user_dep_spec.bad_operator", ll_qa, lc_context) <<
- "Package dep spec '" << ss << "' uses * "
- "with operator '" << op << "', pretending it uses the equals operator instead";
- op = vo_equal_star;
+ if (! to_repository.empty())
+ result.in_repository(RepositoryName(to_repository));
- result.version_requirement(VersionRequirement(op, VersionSpec(s.substr(q, s.length() - q - 1))));
+ if (! from_repository.empty())
+ result.from_repository(RepositoryName(from_repository));
}
- else
- result.version_requirement(VersionRequirement(op, VersionSpec(s.substr(q))));
}
- else
- parse_package_bit(result, ss, s, env, options, filter);
+}
+
+PackageDepSpec
+paludis::parse_user_package_dep_spec(const std::string & ss, const Environment * const env,
+ const UserPackageDepSpecOptions & options, const Filter & filter)
+{
+ using namespace std::tr1::placeholders;
- return result;
+ Context context("When parsing user package dep spec '" + ss + "':");
+
+ bool had_bracket_version_requirements(false);
+ return partial_parse_generic_elike_package_dep_spec(ss, GenericELikePackageDepSpecParseFunctions::named_create()
+ (k::check_sanity(), std::tr1::bind(&user_check_sanity, _1, options, env))
+ (k::remove_trailing_square_bracket_if_exists(), std::tr1::bind(&user_remove_trailing_square_bracket_if_exists,
+ _1, _2, std::tr1::ref(had_bracket_version_requirements)))
+ (k::remove_trailing_repo_if_exists(), std::tr1::bind(&user_remove_trailing_repo_if_exists, _1, _2))
+ (k::remove_trailing_slot_if_exists(), std::tr1::bind(&user_remove_trailing_slot_if_exists, _1, _2))
+ (k::has_version_operator(), std::tr1::bind(&elike_has_version_operator, _1, std::tr1::cref(had_bracket_version_requirements)))
+ (k::get_remove_version_operator(), std::tr1::bind(&elike_get_remove_version_operator, _1,
+ ELikePackageDepSpecOptions() + epdso_allow_tilde_greater_deps + epdso_strict_star_operator))
+ (k::get_remove_trailing_version(), std::tr1::bind(&elike_get_remove_trailing_version, _1))
+ (k::add_version_requirement(), std::tr1::bind(&elike_add_version_requirement, _1, _2, _3))
+ (k::add_package_requirement(), std::tr1::bind(&user_add_package_requirement, _1, _2, env, options, filter))
+ );
}
UserSlotExactRequirement::UserSlotExactRequirement(const SlotName & s) :
diff --git a/paludis/user_dep_spec.se b/paludis/user_dep_spec.se
index 965c917..a48f5ba 100644
--- a/paludis/user_dep_spec.se
+++ b/paludis/user_dep_spec.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_UserPackageDepSpecOption()
diff --git a/paludis/user_dep_spec_TEST.cc b/paludis/user_dep_spec_TEST.cc
index 5a06209..e0ee81d 100644
--- a/paludis/user_dep_spec_TEST.cc
+++ b/paludis/user_dep_spec_TEST.cc
@@ -112,7 +112,8 @@ namespace test_cases
TEST_CHECK_STRINGIFY_EQUAL(i, "foo/bar[-two][one]");
TEST_CHECK_STRINGIFY_EQUAL(*i.package_ptr(), "foo/bar");
TEST_CHECK(! i.version_requirements_ptr());
- TEST_CHECK(! i.repository_ptr());
+ TEST_CHECK(! i.in_repository_ptr());
+ TEST_CHECK(! i.from_repository_ptr());
TEST_CHECK(! i.slot_requirement_ptr());
TEST_CHECK(i.additional_requirements_ptr());
@@ -134,7 +135,8 @@ namespace test_cases
TEST_CHECK_STRINGIFY_EQUAL(l, "foo/bar[>=1.2&<2.0][-two][one]");
TEST_CHECK_STRINGIFY_EQUAL(*l.package_ptr(), "foo/bar");
TEST_CHECK(l.version_requirements_ptr());
- TEST_CHECK(! l.repository_ptr());
+ TEST_CHECK(! l.in_repository_ptr());
+ TEST_CHECK(! l.from_repository_ptr());
TEST_CHECK_STRINGIFY_EQUAL(l.version_requirements_ptr()->begin()->version_spec, "1.2");
TEST_CHECK_EQUAL(l.version_requirements_ptr()->begin()->version_operator, vo_greater_equal);
TEST_CHECK_STRINGIFY_EQUAL(next(l.version_requirements_ptr()->begin())->version_spec, "2.0");
@@ -145,7 +147,8 @@ namespace test_cases
TEST_CHECK_STRINGIFY_EQUAL(m, "foo/bar[=1.2|=1.3*|~1.4]");
TEST_CHECK_STRINGIFY_EQUAL(*m.package_ptr(), "foo/bar");
TEST_CHECK(m.version_requirements_ptr());
- TEST_CHECK(! m.repository_ptr());
+ TEST_CHECK(! m.in_repository_ptr());
+ TEST_CHECK(! m.from_repository_ptr());
TEST_CHECK_STRINGIFY_EQUAL(m.version_requirements_ptr()->begin()->version_spec, "1.2");
TEST_CHECK_EQUAL(m.version_requirements_ptr()->begin()->version_operator, vo_equal);
TEST_CHECK_STRINGIFY_EQUAL(next(m.version_requirements_ptr()->begin())->version_spec, "1.3");
@@ -153,6 +156,23 @@ namespace test_cases
TEST_CHECK_STRINGIFY_EQUAL(next(next(m.version_requirements_ptr()->begin()))->version_spec, "1.4");
TEST_CHECK_EQUAL(next(next(m.version_requirements_ptr()->begin()))->version_operator, vo_tilde);
TEST_CHECK(! m.slot_requirement_ptr());
+
+ PackageDepSpec n(parse_user_package_dep_spec("=foo/bar--1.2.3", &env, UserPackageDepSpecOptions()));
+ TEST_CHECK_STRINGIFY_EQUAL(n, "=foo/bar--1.2.3");
+ TEST_CHECK_STRINGIFY_EQUAL(*n.package_ptr(), "foo/bar-");
+ TEST_CHECK(n.version_requirements_ptr());
+ TEST_CHECK_STRINGIFY_EQUAL(n.version_requirements_ptr()->begin()->version_spec, "1.2.3");
+ TEST_CHECK_EQUAL(n.version_requirements_ptr()->begin()->version_operator, vo_equal);
+
+ TEST_CHECK_THROWS(parse_user_package_dep_spec("=foo/bar--", &env, UserPackageDepSpecOptions()), PackageDepSpecError);
+
+ PackageDepSpec o(parse_user_package_dep_spec("=foo/bar---1.2.3", &env, UserPackageDepSpecOptions()));
+ TEST_CHECK_STRINGIFY_EQUAL(o, "=foo/bar---1.2.3");
+ TEST_CHECK_STRINGIFY_EQUAL(*o.package_ptr(), "foo/bar--");
+ TEST_CHECK(o.version_requirements_ptr());
+ TEST_CHECK_STRINGIFY_EQUAL(o.version_requirements_ptr()->begin()->version_spec, "1.2.3");
+ TEST_CHECK_EQUAL(o.version_requirements_ptr()->begin()->version_operator, vo_equal);
+
}
} test_user_package_dep_spec;
@@ -206,6 +226,41 @@ namespace test_cases
}
} test_user_package_dep_spec_unspecific;
+ struct UserPackageDepSpecReposTest : TestCase
+ {
+ UserPackageDepSpecReposTest() : TestCase("user package dep spec repos") { }
+
+ void run()
+ {
+ TestEnvironment env;
+
+ PackageDepSpec a(parse_user_package_dep_spec("cat/pkg::repo",
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards));
+ TEST_CHECK(a.in_repository_ptr());
+ TEST_CHECK_STRINGIFY_EQUAL(*a.in_repository_ptr(), "repo");
+ TEST_CHECK(! a.from_repository_ptr());
+
+ PackageDepSpec b(parse_user_package_dep_spec("cat/pkg::->repo",
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards));
+ TEST_CHECK(b.in_repository_ptr());
+ TEST_CHECK_STRINGIFY_EQUAL(*b.in_repository_ptr(), "repo");
+ TEST_CHECK(! b.from_repository_ptr());
+
+ PackageDepSpec c(parse_user_package_dep_spec("cat/pkg::repo->",
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards));
+ TEST_CHECK(c.from_repository_ptr());
+ TEST_CHECK_STRINGIFY_EQUAL(*c.from_repository_ptr(), "repo");
+ TEST_CHECK(! c.in_repository_ptr());
+
+ PackageDepSpec d(parse_user_package_dep_spec("cat/pkg::r1->r2",
+ &env, UserPackageDepSpecOptions() + updso_allow_wildcards));
+ TEST_CHECK(d.in_repository_ptr());
+ TEST_CHECK_STRINGIFY_EQUAL(*d.in_repository_ptr(), "r2");
+ TEST_CHECK(d.from_repository_ptr());
+ TEST_CHECK_STRINGIFY_EQUAL(*d.from_repository_ptr(), "r1");
+ }
+ } test_user_package_dep_spec_repo;
+
struct UserPackageDepSpecDisambiguationTest : TestCase
{
UserPackageDepSpecDisambiguationTest() : TestCase("user package dep spec disambiguation") { }
diff --git a/paludis/util/config_file.cc b/paludis/util/config_file.cc
index a51517e..194ce2f 100644
--- a/paludis/util/config_file.cc
+++ b/paludis/util/config_file.cc
@@ -442,14 +442,19 @@ namespace
else if (parser.consume(+simple_parser::any_of(" \t") >> w))
{
if (k.options()[kvcfo_disallow_space_inside_unquoted_values])
- throw ConfigFileError(sr.filename(), "Not allowed space inside unquoted values at line "
- + stringify(parser.current_line_number()));
+ {
+ if (k.options()[kvcfo_allow_multiple_assigns_per_line])
+ break;
+ else
+ throw ConfigFileError(sr.filename(), "Not allowed space inside unquoted values at line "
+ + stringify(parser.current_line_number()));
+ }
else if (k.options()[kvcfo_preserve_whitespace])
result.append(w);
else
need_single_space_unless_eol = true;
}
- else if ((! k.options()[kvcfo_allow_inline_comments]) && parser.consume(simple_parser::exact("#")))
+ else if ((k.options()[kvcfo_allow_inline_comments]) && parser.consume(simple_parser::exact("#")))
{
if (! parser.consume(*simple_parser::any_except("\n")))
throw InternalError(PALUDIS_HERE, "failed to consume a zero width match");
@@ -586,7 +591,9 @@ KeyValueConfigFile::KeyValueConfigFile(
if (_imp->options[kvcfo_allow_inline_comments] && parser.consume(simple_parser::exact("#") &
*simple_parser::any_except("\n")))
- /* skippity skippity */ ;
+ {
+ /* skippity skippity */
+ }
if (! parser.consume(simple_parser::exact("\n")))
{
diff --git a/paludis/util/config_file.se b/paludis/util/config_file.se
index e2312ea..ca139db 100644
--- a/paludis/util/config_file.se
+++ b/paludis/util/config_file.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_LineConfigFileOption()
@@ -38,6 +38,7 @@ make_enum_KeyValueConfigFileOption()
key kvcfo_preserve_whitespace "Do not strip trailing whitespace from values"
key kvcfo_ignore_export "Accept and ignore the word export at the beginning of a line"
key kvcfo_allow_inline_comments "Allow inline comments. \since 0.28"
+ key kvcfo_allow_multiple_assigns_per_line "Allow A='b' B='c' (and unquoted if kvcfo_disallow_space_inside_unquoted_values). \since 0.28"
doxygen_comment << "END"
/**
diff --git a/paludis/util/config_file_TEST.cc b/paludis/util/config_file_TEST.cc
index 1bdfc18..f5a46c1 100644
--- a/paludis/util/config_file_TEST.cc
+++ b/paludis/util/config_file_TEST.cc
@@ -443,7 +443,7 @@ namespace test_cases
d_s << "three # bar" << std::endl;
d_s << "four = four # foo" << std::endl;
d_s << "five = five # moo" << std::endl;
- KeyValueConfigFile ff(d_s, KeyValueConfigFileOptions(),
+ KeyValueConfigFile ff(d_s, KeyValueConfigFileOptions() + kvcfo_allow_inline_comments,
&KeyValueConfigFile::no_defaults, &KeyValueConfigFile::no_transformation);
TEST_CHECK_EQUAL(std::distance(ff.begin(), ff.end()), 5);
@@ -454,5 +454,30 @@ namespace test_cases
TEST_CHECK_EQUAL(ff.get("five"), "five");
}
} test_key_value_config_file_inline_comments;
+
+ struct KeyValueConfigFileMultipleAssignsTest : TestCase
+ {
+ KeyValueConfigFileMultipleAssignsTest() : TestCase("key value config multiple assigns") { }
+
+ void run()
+ {
+ std::stringstream d_s;
+ d_s << "one=\"one\" two=two" << std::endl;
+ d_s << "three = \\" << std::endl;
+ d_s << "three four = \\" << std::endl;
+ d_s << "\"four\" # one=three" << std::endl;
+ d_s << "five=five # six=six" << std::endl;
+ KeyValueConfigFile ff(d_s, KeyValueConfigFileOptions() + kvcfo_allow_inline_comments + kvcfo_allow_multiple_assigns_per_line
+ + kvcfo_disallow_space_inside_unquoted_values,
+ &KeyValueConfigFile::no_defaults, &KeyValueConfigFile::no_transformation);
+
+ TEST_CHECK_EQUAL(std::distance(ff.begin(), ff.end()), 5);
+ TEST_CHECK_EQUAL(ff.get("one"), "one");
+ TEST_CHECK_EQUAL(ff.get("two"), "two");
+ TEST_CHECK_EQUAL(ff.get("three"), "three");
+ TEST_CHECK_EQUAL(ff.get("four"), "four");
+ TEST_CHECK_EQUAL(ff.get("five"), "five");
+ }
+ } test_key_value_config_file_multiple_assigns;
}
diff --git a/paludis/util/config_file_TEST_cleanup.sh b/paludis/util/config_file_TEST_cleanup.sh
index b4ed3db..8747b76 100755
--- a/paludis/util/config_file_TEST_cleanup.sh
+++ b/paludis/util/config_file_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d config_file_TEST_dir ] ; then
diff --git a/paludis/util/config_file_TEST_setup.sh b/paludis/util/config_file_TEST_setup.sh
index fd0bb10..22b6ec7 100755
--- a/paludis/util/config_file_TEST_setup.sh
+++ b/paludis/util/config_file_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir config_file_TEST_dir || exit 2
diff --git a/paludis/util/dir_iterator.se b/paludis/util/dir_iterator.se
index 00b2246..2d0088a 100644
--- a/paludis/util/dir_iterator.se
+++ b/paludis/util/dir_iterator.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_DirIteratorOption()
diff --git a/paludis/util/dir_iterator_TEST_cleanup.sh b/paludis/util/dir_iterator_TEST_cleanup.sh
index 17378f3..aeb0909 100755
--- a/paludis/util/dir_iterator_TEST_cleanup.sh
+++ b/paludis/util/dir_iterator_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d dir_iterator_TEST_dir ] ; then
diff --git a/paludis/util/dir_iterator_TEST_setup.sh b/paludis/util/dir_iterator_TEST_setup.sh
index f741a97..15a4641 100755
--- a/paludis/util/dir_iterator_TEST_setup.sh
+++ b/paludis/util/dir_iterator_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir dir_iterator_TEST_dir || exit 2
diff --git a/paludis/util/echo_functions.bash.in b/paludis/util/echo_functions.bash.in
index 24fbba0..ba22e16 100644
--- a/paludis/util/echo_functions.bash.in
+++ b/paludis/util/echo_functions.bash.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
@GENERATED_FILE@
diff --git a/paludis/util/fs_entry_TEST_cleanup.sh b/paludis/util/fs_entry_TEST_cleanup.sh
index 662b2bb..ed04a55 100755
--- a/paludis/util/fs_entry_TEST_cleanup.sh
+++ b/paludis/util/fs_entry_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d fs_entry_TEST_dir ] ; then
diff --git a/paludis/util/fs_entry_TEST_setup.sh b/paludis/util/fs_entry_TEST_setup.sh
index 26661dd..a8efc9a 100755
--- a/paludis/util/fs_entry_TEST_setup.sh
+++ b/paludis/util/fs_entry_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir fs_entry_TEST_dir || exit 2
diff --git a/paludis/util/is_file_with_extension.se b/paludis/util/is_file_with_extension.se
index 31f59b1..0489716 100644
--- a/paludis/util/is_file_with_extension.se
+++ b/paludis/util/is_file_with_extension.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_IsFileWithOption()
diff --git a/paludis/util/is_file_with_extension_TEST_cleanup.sh b/paludis/util/is_file_with_extension_TEST_cleanup.sh
index 986933a..af3ad01 100755
--- a/paludis/util/is_file_with_extension_TEST_cleanup.sh
+++ b/paludis/util/is_file_with_extension_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -f "is_file_with_extension_TEST_file.goat" ] ; then
diff --git a/paludis/util/is_file_with_extension_TEST_setup.sh b/paludis/util/is_file_with_extension_TEST_setup.sh
index bdfacbf..22e27b6 100755
--- a/paludis/util/is_file_with_extension_TEST_setup.sh
+++ b/paludis/util/is_file_with_extension_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
touch is_file_with_extension_TEST_file.goat || exit 2
diff --git a/paludis/util/keys.hh b/paludis/util/keys.hh
index ab8a9c8..4375c79 100644
--- a/paludis/util/keys.hh
+++ b/paludis/util/keys.hh
@@ -28,7 +28,6 @@ namespace paludis
{
typedef kc::Key<1> fetch_unneeded;
typedef kc::Key<2> safe_resume;
- typedef kc::Key<3> no_config_protect;
typedef kc::Key<4> debug_build;
typedef kc::Key<5> checks;
typedef kc::Key<6> destination;
@@ -131,7 +130,6 @@ namespace paludis
typedef kc::Key<102> tools_options;
typedef kc::Key<103> rewrite_virtuals;
typedef kc::Key<104> no_slot_or_repo;
- typedef kc::Key<105> disable_cfgpro;
typedef kc::Key<106> slot;
typedef kc::Key<107> loadsaveenv_dir;
typedef kc::Key<108> unmerge_only;
@@ -188,6 +186,15 @@ namespace paludis
typedef kc::Key<159> importance;
typedef kc::Key<160> keys;
typedef kc::Key<161> format;
+ typedef kc::Key<162> remove_trailing_square_bracket_if_exists;
+ typedef kc::Key<163> remove_trailing_slot_if_exists;
+ typedef kc::Key<164> has_version_operator;
+ typedef kc::Key<165> get_remove_version_operator;
+ typedef kc::Key<166> get_remove_trailing_version;
+ typedef kc::Key<167> add_version_requirement;
+ typedef kc::Key<168> add_package_requirement;
+ typedef kc::Key<169> check_sanity;
+ typedef kc::Key<170> remove_trailing_repo_if_exists;
}
}
diff --git a/paludis/util/log.se b/paludis/util/log.se
index 9cf3039..038d8c1 100644
--- a/paludis/util/log.se
+++ b/paludis/util/log.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_LogContext()
diff --git a/paludis/util/output_wrapper_TEST_cleanup.sh b/paludis/util/output_wrapper_TEST_cleanup.sh
index 48e4dce..6110d5c 100755
--- a/paludis/util/output_wrapper_TEST_cleanup.sh
+++ b/paludis/util/output_wrapper_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d output_wrapper_TEST_dir ] ; then
diff --git a/paludis/util/output_wrapper_TEST_setup.sh b/paludis/util/output_wrapper_TEST_setup.sh
index 229a74d..e7211c3 100755
--- a/paludis/util/output_wrapper_TEST_setup.sh
+++ b/paludis/util/output_wrapper_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir output_wrapper_TEST_dir || exit 2
diff --git a/paludis/util/system_TEST_cleanup.sh b/paludis/util/system_TEST_cleanup.sh
index 1dca3c3..4317415 100755
--- a/paludis/util/system_TEST_cleanup.sh
+++ b/paludis/util/system_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d system_TEST_dir ] ; then
diff --git a/paludis/util/system_TEST_setup.sh b/paludis/util/system_TEST_setup.sh
index 13ba3f6..5bdc42a 100755
--- a/paludis/util/system_TEST_setup.sh
+++ b/paludis/util/system_TEST_setup.sh
@@ -1,11 +1,11 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir system_TEST_dir || exit 2
cd system_TEST_dir || exit 3
cat <<'END' > pipe_test.bash
-#!/bin/bash
+#!/usr/bin/env bash
echo "$1" | tr "\n" "\0" 1>&$PALUDIS_PIPE_COMMAND_WRITE_FD
response1=
@@ -27,7 +27,7 @@ exit $response1$response2
END
cat <<'END' > captured_pipe_test.bash
-#!/bin/bash
+#!/usr/bin/env bash
echo "$1" | tr "\n" "\0" 1>&$PALUDIS_PIPE_COMMAND_WRITE_FD
response1=
diff --git a/paludis/version_operator.se b/paludis/version_operator.se
index 78448db..1ba7250 100644
--- a/paludis/version_operator.se
+++ b/paludis/version_operator.se
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
make_enum_VersionOperatorValue()
diff --git a/paludis/version_requirements.sr b/paludis/version_requirements.sr
index 91a80a2..7c9df2c 100644
--- a/paludis/version_requirements.sr
+++ b/paludis/version_requirements.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_VersionRequirement()
diff --git a/python/Makefile.am b/python/Makefile.am
index 1e91b52..dd3201a 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -102,6 +102,12 @@ EXTRA_DIST = $(IF_PYTHON_TESTS) $(IF_PYTHON_SOURCES) \
repository_TEST_setup.sh repository_TEST_cleanup.sh \
paludis_output_wrapper.py
+if ENABLE_VIRTUALS_REPOSITORY
+PALUDIS_ENABLE_VIRTUALS_REPOSITORY_VALUE=yes
+else
+PALUDIS_ENABLE_VIRTUALS_REPOSITORY_VALUE=no
+endif
+
TESTS_ENVIRONMENT = env \
TEST_OUTPUT_WRAPPER="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/outputwrapper`" \
PALUDIS_OUTPUTWRAPPER_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/`" \
@@ -117,6 +123,7 @@ TESTS_ENVIRONMENT = env \
PALUDIS_QA_DATA_DIR="$(top_srcdir)/paludis/repositories/e/qa/" \
PALUDIS_REPOSITORY_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories`" \
PALUDIS_ENVIRONMENT_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments`" \
+ PALUDIS_ENABLE_VIRTUALS_REPOSITORY="$(PALUDIS_ENABLE_VIRTUALS_REPOSITORY_VALUE)" \
SYSCONFDIR="$(sysconfdir)" \
LD_LIBRARY_PATH=`echo "\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/.libs\`: \
diff --git a/python/action.cc b/python/action.cc
index a80ec18..c0d5d27 100644
--- a/python/action.cc
+++ b/python/action.cc
@@ -91,17 +91,11 @@ void expose_action()
(
"InstallActionOptions",
"Options for InstallAction.",
- bp::init<const bool &, const InstallActionDebugOption &, const InstallActionChecksOption &,
+ bp::init<const InstallActionDebugOption &, const InstallActionChecksOption &,
const std::tr1::shared_ptr<paludis::Repository> &>(
- "__init__(no_config_protect_bool, InstallActionDebugOption,\n"
- "InstallActionChecksOption, Repository)"
+ "__init__(InstallActionDebugOption, InstallActionChecksOption, Repository)"
)
)
- .add_property("no_config_protect",
- &kc_getter<InstallActionOptions, bool, k::no_config_protect>,
- &kc_setter<InstallActionOptions, bool, k::no_config_protect>,
- "[rw] bool"
- )
.add_property("debug_build",
&kc_getter<InstallActionOptions, InstallActionDebugOption, k::debug_build>,
@@ -144,22 +138,6 @@ void expose_action()
)
;
- /**
- * UninstallActionOptions
- */
- bp::class_<UninstallActionOptions>
- (
- "UninstallActionOptions",
- "Options for UninstallAction.",
- bp::init<const bool &>("__init__(no_config_protect_bool)")
- )
- .add_property("no_config_protect",
- &kc_getter<UninstallActionOptions, bool, k::no_config_protect>,
- &kc_setter<UninstallActionOptions, bool, k::no_config_protect>,
- "[rw] bool"
- )
- ;
-
/**
* Action
*/
@@ -200,7 +178,7 @@ void expose_action()
(
"UninstallAction",
"An UninstallAction is used by UninstallTask to uninstall a PackageID.",
- bp::init<const UninstallActionOptions &>("__init__(UninstallActionOptions)")
+ bp::init<>("__init__()")
);
/**
diff --git a/python/action_TEST.py b/python/action_TEST.py
index 95e999e..3becb96 100755
--- a/python/action_TEST.py
+++ b/python/action_TEST.py
@@ -31,13 +31,12 @@ class TestCase_01_InstallActionOptions(unittest.TestCase):
repo2 = FakeRepository(env, "2")
def test_01_create(self):
- InstallActionOptions(True, InstallActionDebugOption.values[0], InstallActionChecksOption.values[0], repo1)
+ InstallActionOptions(InstallActionDebugOption.values[0], InstallActionChecksOption.values[0], repo1)
def test_02_data_members(self):
- iao = InstallActionOptions(True, InstallActionDebugOption.values[0],
+ iao = InstallActionOptions(InstallActionDebugOption.values[0],
InstallActionChecksOption.values[0], repo1)
- self.assertEquals(iao.no_config_protect, True)
self.assertEquals(iao.debug_build, InstallActionDebugOption.values[0])
self.assertEquals(iao.checks, InstallActionChecksOption.values[0])
self.assertEquals(str(iao.destination.name), "1")
@@ -68,23 +67,11 @@ class TestCase_02_FetchActionOptions(unittest.TestCase):
self.assertEquals(fao.fetch_unneeded, False)
self.assertEquals(fao.safe_resume, False)
-class TestCase_03_UninstallActionOptions(unittest.TestCase):
- def test_01_create(self):
- UninstallActionOptions(True)
-
- def test_02_data_members(self):
- uao = UninstallActionOptions(True)
-
- self.assertEquals(uao.no_config_protect, True)
- uao.no_config_protect = False
- self.assertEquals(uao.no_config_protect, False)
-
-
class TestCase_04_InstallAction(unittest.TestCase):
def test_01_create(self):
env = TestEnvironment()
repo1 = FakeRepository(env, "1")
- iao = InstallActionOptions(True, InstallActionDebugOption.values[0],
+ iao = InstallActionOptions(InstallActionDebugOption.values[0],
InstallActionChecksOption.values[0], repo1)
InstallAction(iao)
@@ -94,7 +81,7 @@ class TestCase_05_FetchAction(unittest.TestCase):
class TestCase_06_UninstallAction(unittest.TestCase):
def test_01_create(self):
- UninstallAction(UninstallActionOptions(True))
+ UninstallAction()
class TestCase_07_InstalledAction(unittest.TestCase):
def test_01_create(self):
diff --git a/python/dep_list_TEST_cleanup.sh b/python/dep_list_TEST_cleanup.sh
index 4896ed4..781c821 100755
--- a/python/dep_list_TEST_cleanup.sh
+++ b/python/dep_list_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d dep_list_TEST_dir ] ; then
diff --git a/python/dep_list_TEST_setup.sh b/python/dep_list_TEST_setup.sh
index f54929d..5a59941 100755
--- a/python/dep_list_TEST_setup.sh
+++ b/python/dep_list_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir dep_list_TEST_dir || exit 1
diff --git a/python/dep_spec.cc b/python/dep_spec.cc
index 3992cc8..bc381fa 100644
--- a/python/dep_spec.cc
+++ b/python/dep_spec.cc
@@ -112,7 +112,8 @@ namespace paludis
std::tr1::shared_ptr<VersionRequirements> version_requirements;
VersionRequirementsMode version_requirements_mode;
std::tr1::shared_ptr<const SlotRequirement> slot;
- std::tr1::shared_ptr<const RepositoryName> repository;
+ std::tr1::shared_ptr<const RepositoryName> in_repository;
+ std::tr1::shared_ptr<const RepositoryName> from_repository;
std::tr1::shared_ptr<const AdditionalPackageDepSpecRequirements> additional_requirements;
std::tr1::shared_ptr<const DepTag> tag;
const std::string str;
@@ -124,7 +125,8 @@ namespace paludis
const std::tr1::shared_ptr<VersionRequirements> & v,
const VersionRequirementsMode m,
const std::tr1::shared_ptr<const SlotRequirement> & s,
- const std::tr1::shared_ptr<const RepositoryName> & r,
+ const std::tr1::shared_ptr<const RepositoryName> & ri,
+ const std::tr1::shared_ptr<const RepositoryName> & rf,
const std::tr1::shared_ptr<const AdditionalPackageDepSpecRequirements> & u,
const std::tr1::shared_ptr<const DepTag> & t,
const std::string & st) :
@@ -134,7 +136,8 @@ namespace paludis
version_requirements(v),
version_requirements_mode(m),
slot(s),
- repository(r),
+ in_repository(ri),
+ from_repository(rf),
additional_requirements(u),
tag(t),
str(st)
@@ -260,7 +263,8 @@ PythonPackageDepSpec::PythonPackageDepSpec(const PackageDepSpec & p) :
make_shared_ptr(new VersionRequirements),
p.version_requirements_mode(),
p.slot_requirement_ptr(),
- deep_copy(p.repository_ptr()),
+ deep_copy(p.in_repository_ptr()),
+ deep_copy(p.from_repository_ptr()),
p.additional_requirements_ptr(),
p.tag(),
stringify(p)))
@@ -281,7 +285,8 @@ PythonPackageDepSpec::PythonPackageDepSpec(const PythonPackageDepSpec & p) :
make_shared_ptr(new VersionRequirements),
p.version_requirements_mode(),
p.slot_requirement_ptr(),
- deep_copy(p.repository_ptr()),
+ deep_copy(p.in_repository_ptr()),
+ deep_copy(p.from_repository_ptr()),
p.additional_requirements_ptr(),
p.tag(),
p.py_str()))
@@ -312,8 +317,11 @@ PythonPackageDepSpec::operator PackageDepSpec() const
if (slot_requirement_ptr())
p.slot_requirement(slot_requirement_ptr());
- if (repository_ptr())
- p.repository(*repository_ptr());
+ if (in_repository_ptr())
+ p.in_repository(*in_repository_ptr());
+
+ if (from_repository_ptr())
+ p.from_repository(*from_repository_ptr());
if (additional_requirements_ptr())
{
@@ -395,9 +403,15 @@ PythonPackageDepSpec::slot_requirement_ptr() const
}
std::tr1::shared_ptr<const RepositoryName>
-PythonPackageDepSpec::repository_ptr() const
+PythonPackageDepSpec::in_repository_ptr() const
+{
+ return _imp->in_repository;
+}
+
+std::tr1::shared_ptr<const RepositoryName>
+PythonPackageDepSpec::from_repository_ptr() const
{
- return _imp->repository;
+ return _imp->from_repository;
}
std::tr1::shared_ptr<const AdditionalPackageDepSpecRequirements>
@@ -1236,9 +1250,15 @@ void expose_dep_spec()
)
#endif
- .add_property("repository", &PythonPackageDepSpec::repository_ptr,
+ .add_property("in_repository", &PythonPackageDepSpec::in_repository_ptr,
+ "[ro] RepositoryName\n"
+ "In repository name (may be None)."
+
+ )
+
+ .add_property("from_repository", &PythonPackageDepSpec::from_repository_ptr,
"[ro] RepositoryName\n"
- "Repository name (may be None)."
+ "From repository name (may be None)."
)
#if 0
diff --git a/python/dep_spec.hh b/python/dep_spec.hh
index a2c64d3..cdad863 100644
--- a/python/dep_spec.hh
+++ b/python/dep_spec.hh
@@ -175,7 +175,8 @@ namespace paludis
VersionRequirementsMode version_requirements_mode() const;
void set_version_requirements_mode(const VersionRequirementsMode m);
std::tr1::shared_ptr<const SlotRequirement> slot_requirement_ptr() const;
- std::tr1::shared_ptr<const RepositoryName> repository_ptr() const;
+ std::tr1::shared_ptr<const RepositoryName> in_repository_ptr() const;
+ std::tr1::shared_ptr<const RepositoryName> from_repository_ptr() const;
std::tr1::shared_ptr<const AdditionalPackageDepSpecRequirements> additional_requirements_ptr() const;
std::tr1::shared_ptr<const DepTag> tag() const;
void set_tag(const std::tr1::shared_ptr<const DepTag> & s);
diff --git a/python/dep_spec_TEST.py b/python/dep_spec_TEST.py
index b675464..eb867cd 100755
--- a/python/dep_spec_TEST.py
+++ b/python/dep_spec_TEST.py
@@ -66,9 +66,10 @@ class TestCase_1_DepSpecs(unittest.TestCase):
self.get_depspecs()
self.assertEqual(str(self.pds.package), "foo/bar")
- def test_06_repository(self):
+ def test_06_in_from_repository(self):
self.get_depspecs()
- self.assertEqual(str(self.pds.repository), "testrepo")
+ self.assertEqual(str(self.pds.in_repository), "testrepo")
+ self.assertEqual(self.pds.from_repository, None)
def test_07_version_requirements(self):
self.get_depspecs()
diff --git a/python/environment_TEST_cleanup.sh b/python/environment_TEST_cleanup.sh
index 06ff0de..12015f9 100755
--- a/python/environment_TEST_cleanup.sh
+++ b/python/environment_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d environment_TEST_dir ] ; then
diff --git a/python/environment_TEST_setup.sh b/python/environment_TEST_setup.sh
index e3c2314..0dfd47d 100755
--- a/python/environment_TEST_setup.sh
+++ b/python/environment_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir environment_TEST_dir || exit 1
diff --git a/python/generator.cc b/python/generator.cc
index cf44783..4b7d330 100644
--- a/python/generator.cc
+++ b/python/generator.cc
@@ -83,10 +83,16 @@ void expose_generator()
bp::init<const CategoryNamePart &>("__init__(category)")
);
- bp::class_<generator::Repository, bp::bases<Generator> > generator_repository(
+ bp::class_<generator::InRepository, bp::bases<Generator> > generator_in_repository(
"Repository",
"Generate all packages in a given repository.",
bp::init<const RepositoryName &>("__init__(repository)")
);
+
+ bp::class_<generator::FromRepository, bp::bases<Generator> > generator_from_repository(
+ "Repository",
+ "Generate all packages originally from a given repository.",
+ bp::init<const RepositoryName &>("__init__(repository)")
+ );
}
diff --git a/python/mask_TEST.py b/python/mask_TEST.py
index 93be950..ae228f7 100755
--- a/python/mask_TEST.py
+++ b/python/mask_TEST.py
@@ -89,17 +89,20 @@ class TestCase_01_Masks(unittest.TestCase):
self.assertEquals(m.explanation(), "Unsupported EAPI 'unsupported'")
def test_05_association_mask(self):
- q = Selection.RequireExactlyOne(Generator.Matches(
- parse_user_package_dep_spec("=virtual/association-1.0", self.e, [])))
- pid = iter(self.e[q]).next()
- m = iter(pid.masks).next()
-
- self.assert_(isinstance(m, Mask))
- self.assert_(isinstance(m, AssociationMask))
-
- self.assertEquals(m.key(), "A")
- self.assertEquals(m.description(), "by association")
- self.assertEquals(m.associated_package().name, "masked/repo")
+ if os.environ.get("PALUDIS_ENABLE_VIRTUALS_REPOSITORY") == "yes":
+ q = Selection.RequireExactlyOne(Generator.Matches(
+ parse_user_package_dep_spec("=virtual/association-1.0", self.e, [])))
+ pid = iter(self.e[q]).next()
+ m = iter(pid.masks).next()
+
+ self.assert_(isinstance(m, Mask))
+ self.assert_(isinstance(m, AssociationMask))
+
+ self.assertEquals(m.key(), "A")
+ self.assertEquals(m.description(), "by association")
+ self.assertEquals(m.associated_package().name, "masked/repo")
+ elif os.environ.get("PALUDIS_ENABLE_VIRTUALS_REPOSITORY") != "no":
+ raise "oops"
class TestCase_02_Masks_subclassing(unittest.TestCase):
def test_01_user_mask(self):
diff --git a/python/mask_TEST_cleanup.sh b/python/mask_TEST_cleanup.sh
index 067462f..1301bd0 100755
--- a/python/mask_TEST_cleanup.sh
+++ b/python/mask_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d mask_TEST_dir ] ; then
diff --git a/python/mask_TEST_setup.sh b/python/mask_TEST_setup.sh
index 66f050f..4bbc4d1 100755
--- a/python/mask_TEST_setup.sh
+++ b/python/mask_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir mask_TEST_dir || exit 1
diff --git a/python/metadata_key_TEST.py b/python/metadata_key_TEST.py
index a7a86af..62bc388 100755
--- a/python/metadata_key_TEST.py
+++ b/python/metadata_key_TEST.py
@@ -46,8 +46,8 @@ class TestCase_01_MetadataKeys(unittest.TestCase):
self.assert_(isinstance(self.ipid.find_metadata("INSTALLED_TIME"), MetadataTimeKey))
def test_03_repository(self):
- self.assertEquals(self.pid.find_metadata("REPOSITORY"), None)
- self.assert_(isinstance(self.ipid.find_metadata("REPOSITORY"), MetadataStringKey))
+ self.assertEquals(self.pid.find_metadata("REPOSITORIES"), None)
+ self.assert_(isinstance(self.ipid.find_metadata("REPOSITORIES"), MetadataStringIterableKey))
def test_04_keywords(self):
self.assert_(isinstance(self.pid.find_metadata("KEYWORDS"), MetadataKeywordNameIterableKey))
diff --git a/python/metadata_key_TEST_cleanup.sh b/python/metadata_key_TEST_cleanup.sh
index a176b6b..32adba6 100755
--- a/python/metadata_key_TEST_cleanup.sh
+++ b/python/metadata_key_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d metadata_key_TEST_dir ] ; then
diff --git a/python/metadata_key_TEST_setup.sh b/python/metadata_key_TEST_setup.sh
index e5fafad..8616e49 100755
--- a/python/metadata_key_TEST_setup.sh
+++ b/python/metadata_key_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir metadata_key_TEST_dir || exit 1
diff --git a/python/nice_names.nn b/python/nice_names.nn
index 4d35d29..0018857 100644
--- a/python/nice_names.nn
+++ b/python/nice_names.nn
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
include_hh << END
diff --git a/python/package_database_TEST.py b/python/package_database_TEST.py
index 933805e..b3dfa12 100755
--- a/python/package_database_TEST.py
+++ b/python/package_database_TEST.py
@@ -53,12 +53,13 @@ class TestCase_PackageDatabase(unittest.TestCase):
Filter.SupportsUninstallAction())
def test_6_repositories(self):
- self.get_db()
- self.assert_(self.db.more_important_than("testrepo", "virtuals"))
- self.assert_(not self.db.more_important_than("virtuals", "testrepo"))
- self.assertRaises(NoSuchRepositoryError, self.db.fetch_repository, "blah")
+ if os.environ.get("PALUDIS_ENABLE_VIRTUALS_REPOSITORY") == "yes":
+ self.get_db()
+ self.assert_(self.db.more_important_than("testrepo", "virtuals"))
+ self.assert_(not self.db.more_important_than("virtuals", "testrepo"))
+ self.assertRaises(NoSuchRepositoryError, self.db.fetch_repository, "blah")
- self.assertEqual(len(list(self.db.repositories)), 3)
+ self.assertEqual(len(list(self.db.repositories)), 3)
if __name__ == "__main__":
unittest.main()
diff --git a/python/package_database_TEST_cleanup.sh b/python/package_database_TEST_cleanup.sh
index 73ec3fe..761b885 100755
--- a/python/package_database_TEST_cleanup.sh
+++ b/python/package_database_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d package_database_TEST_dir ] ; then
diff --git a/python/package_database_TEST_setup.sh b/python/package_database_TEST_setup.sh
index 4abeb7b..4782121 100755
--- a/python/package_database_TEST_setup.sh
+++ b/python/package_database_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir package_database_TEST_dir || exit 1
diff --git a/python/package_id.cc b/python/package_id.cc
index 29ddbb6..f55aa02 100644
--- a/python/package_id.cc
+++ b/python/package_id.cc
@@ -197,14 +197,9 @@ void expose_package_id()
"using dl_reinstall_scm_daily or dl_reinstall_scm_weekly."
)
- .def("source_origin_key", &PackageID::source_origin_key,
- "The source_origin_key, if not None, contains a string describing\n"
- "the source repository whence a package originated."
- )
-
- .def("binary_origin_key", &PackageID::binary_origin_key,
- "The binary_origin_key, if not None, contains a string describing\n"
- "the binary repository whence a package originated."
+ .def("from_repositories_key", &PackageID::from_repositories_key,
+ "The from_repositories_key, if not None, contains strings describing\n"
+ "the repositories whence a package originated."
)
.def("fs_location_key", &PackageID::fs_location_key,
diff --git a/python/package_id_TEST.py b/python/package_id_TEST.py
index aee738b..16f73c9 100755
--- a/python/package_id_TEST.py
+++ b/python/package_id_TEST.py
@@ -33,7 +33,8 @@ class TestCase_01_PackageID(unittest.TestCase):
self.e = NoConfigEnvironment(repo_path, "/var/empty")
self.ie = NoConfigEnvironment(irepo_path)
self.pid = iter(self.e.package_database.fetch_repository("testrepo").package_ids("foo/bar")).next()
- self.vpid = iter(self.e.package_database.fetch_repository("virtuals").package_ids("virtual/bar")).next()
+ if os.environ.get("PALUDIS_ENABLE_VIRTUALS_REPOSITORY") == "yes":
+ self.vpid = iter(self.e.package_database.fetch_repository("virtuals").package_ids("virtual/bar")).next()
self.ipid = iter(self.ie.package_database.fetch_repository("installed").package_ids("cat-one/pkg-one")).next()
self.mpid = iter(self.e.package_database.fetch_repository("testrepo").package_ids("cat/masked")).next()
@@ -113,9 +114,10 @@ class TestCase_01_PackageID(unittest.TestCase):
self.assert_(isinstance(mask, UnacceptedMask))
def test_14_virtual_for_key(self):
- self.assertEquals(self.vpid.virtual_for_key().value(), self.pid)
- self.assertEquals(self.pid.virtual_for_key(), None)
- self.assertEquals(self.ipid.virtual_for_key(), None)
+ if os.environ.get("PALUDIS_ENABLE_VIRTUALS_REPOSITORY") == "yes":
+ self.assertEquals(self.vpid.virtual_for_key().value(), self.pid)
+ self.assertEquals(self.pid.virtual_for_key(), None)
+ self.assertEquals(self.ipid.virtual_for_key(), None)
def test_15_provide_key(self):
self.assert_(isinstance(self.pid.provide_key(), MetadataProvideSpecTreeKey))
@@ -169,13 +171,9 @@ class TestCase_01_PackageID(unittest.TestCase):
self.assertEquals(self.pid.installed_time_key(), None)
self.assert_(isinstance(self.ipid.installed_time_key(), MetadataTimeKey))
- def test_28_source_origin_key(self):
- self.assertEquals(self.pid.source_origin_key(), None)
- self.assertEquals(self.ipid.source_origin_key().value(), "origin_test")
-
- def test_29_binary_origin_key(self):
- self.assertEquals(self.pid.binary_origin_key(), None)
- self.assertEquals(self.ipid.binary_origin_key(), None)
+ def test_28_from_repositories_key(self):
+ self.assertEquals(self.pid.from_repositories_key(), None)
+ self.assertEquals(iter(self.ipid.from_repositories_key().value()).next(), "origin_test")
def test_30_fs_location_key(self):
self.assert_(isinstance(self.ipid.fs_location_key(), MetadataFSEntryKey))
diff --git a/python/package_id_TEST_cleanup.sh b/python/package_id_TEST_cleanup.sh
index 2b07ea8..67999c4 100755
--- a/python/package_id_TEST_cleanup.sh
+++ b/python/package_id_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d package_id_TEST_dir ] ; then
diff --git a/python/package_id_TEST_setup.sh b/python/package_id_TEST_setup.sh
index a8286d5..be84627 100755
--- a/python/package_id_TEST_setup.sh
+++ b/python/package_id_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir package_id_TEST_dir || exit 1
diff --git a/python/repository_TEST_cleanup.sh b/python/repository_TEST_cleanup.sh
index d9bbfa9..70d7ca7 100755
--- a/python/repository_TEST_cleanup.sh
+++ b/python/repository_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d repository_TEST_dir ] ; then
diff --git a/python/repository_TEST_setup.sh b/python/repository_TEST_setup.sh
index d79d029..54e31c9 100755
--- a/python/repository_TEST_setup.sh
+++ b/python/repository_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir repository_TEST_dir || exit 1
diff --git a/ruby/Makefile.am b/ruby/Makefile.am
index 5a08bc2..89639c0 100644
--- a/ruby/Makefile.am
+++ b/ruby/Makefile.am
@@ -86,6 +86,12 @@ EXTRA_DIST = $(IF_RUBY_TESTS) $(IF_RUBY_SOURCES) \
repository_TEST_setup.sh repository_TEST_cleanup.sh \
action_TEST_setup.sh action_TEST_cleanup.sh
+if ENABLE_VIRTUALS_REPOSITORY
+PALUDIS_ENABLE_VIRTUALS_REPOSITORY_VALUE=yes
+else
+PALUDIS_ENABLE_VIRTUALS_REPOSITORY_VALUE=no
+endif
+
TESTS_ENVIRONMENT = env \
TEST_OUTPUT_WRAPPER="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/outputwrapper`" \
PALUDIS_OUTPUTWRAPPER_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/`" \
@@ -101,6 +107,7 @@ TESTS_ENVIRONMENT = env \
PALUDIS_DISTRIBUTION="gentoo" \
PALUDIS_REPOSITORY_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories`" \
PALUDIS_ENVIRONMENT_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments`" \
+ PALUDIS_ENABLE_VIRTUALS_REPOSITORY="$(PALUDIS_ENABLE_VIRTUALS_REPOSITORY_VALUE)" \
SYSCONFDIR="$(sysconfdir)" \
LD_LIBRARY_PATH=`echo "\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/.libs\`: \
\`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/util/.libs\`: \
diff --git a/ruby/action.cc b/ruby/action.cc
index fee69b2..ee854d9 100644
--- a/ruby/action.cc
+++ b/ruby/action.cc
@@ -47,7 +47,6 @@ namespace
static VALUE c_install_action_checks_option;
static VALUE c_install_action;
- static VALUE c_uninstall_action_options;
static VALUE c_uninstall_action;
static VALUE c_installed_action;
@@ -130,36 +129,6 @@ namespace
}
}
- const UninstallActionOptions
- value_to_uninstall_action_options(VALUE v)
- {
- if (rb_obj_is_kind_of(v, c_uninstall_action_options))
- {
- UninstallActionOptions * v_ptr;
- Data_Get_Struct(v, UninstallActionOptions, v_ptr);
- return *v_ptr;
- }
- else
- {
- rb_raise(rb_eTypeError, "Can't convert %s into UninstallActionOptions", rb_obj_classname(v));
- }
- }
-
- VALUE
- uninstall_action_options_to_value(const UninstallActionOptions & m)
- {
- UninstallActionOptions * m_ptr(new UninstallActionOptions(m));
- try
- {
- return Data_Wrap_Struct(c_uninstall_action_options, 0, &Common<UninstallActionOptions>::free, m_ptr);
- }
- catch (const std::exception & e)
- {
- delete m_ptr;
- exception_to_ruby_exception(e);
- }
- }
-
const FetchActionFailure
value_to_fetch_action_failure(VALUE v)
{
@@ -419,14 +388,6 @@ namespace
*
* Did we fail automatic fetching?
*/
- /*
- * Document-method: no_config_protect?
- *
- * call-seq:
- * no_config_protect? -> true or false
- *
- * Do we ignore config protection.
- */
template <typename T_, typename K_, typename R_>
struct KCFetch;
@@ -522,7 +483,7 @@ namespace
/*
* call-seq:
- * InstallActionOptions.new(no_config_protect, debug_build, checks, destination) -> InstallActionOptions
+ * InstallActionOptions.new(debug_build, checks, destination) -> InstallActionOptions
* InstallActionOptions.new(Hash) -> InstallActionOptions
*
* InstallActionOptions.new can either be called with all parameters in order, or with one hash
@@ -541,8 +502,6 @@ namespace
if (1 == argc && rb_obj_is_kind_of(argv[0], rb_cHash))
{
- if (Qnil == rb_hash_aref(argv[0], ID2SYM(rb_intern("no_config_protect"))))
- rb_raise(rb_eArgError, "Missing Parameter: no_config_protect");
if (Qnil == rb_hash_aref(argv[0], ID2SYM(rb_intern("debug_build"))))
rb_raise(rb_eArgError, "Missing Parameter: debug_build");
if (Qnil == rb_hash_aref(argv[0], ID2SYM(rb_intern("checks"))))
@@ -559,20 +518,18 @@ namespace
));
v_destination = value_to_repository(rb_hash_aref(argv[0], ID2SYM(rb_intern("destination"))));
}
- else if (4 == argc)
+ else if (3 == argc)
{
- v_no_config_protect = value_to_bool(argv[0]);
- v_debug_build = static_cast<InstallActionDebugOption>(NUM2INT(argv[1]));
- v_checks = static_cast<InstallActionChecksOption>(NUM2INT(argv[2]));
- v_destination = value_to_repository(argv[3]);
+ v_debug_build = static_cast<InstallActionDebugOption>(NUM2INT(argv[0]));
+ v_checks = static_cast<InstallActionChecksOption>(NUM2INT(argv[1]));
+ v_destination = value_to_repository(argv[2]);
}
else
{
- rb_raise(rb_eArgError, "InstallActionOptions expects one or four arguments, but got %d",argc);
+ rb_raise(rb_eArgError, "InstallActionOptions expects one or three arguments, but got %d",argc);
}
ptr = new InstallActionOptions(InstallActionOptions::named_create()
- (k::no_config_protect(), v_no_config_protect)
(k::debug_build(), v_debug_build)
(k::checks(), v_checks)
(k::destination(), v_destination)
@@ -638,61 +595,13 @@ namespace
/*
* call-seq:
- * UninstallActionOptions.new(no_config_protect) -> UninstallActionOptions
- * UninstallActionOptions.new(Hash) -> UninstallActionOptions
- *
- * UninstallActionOptions.new can either be called with all parameters in order, or with one hash
- * parameter, where the hash keys are symbols with the names above.
- */
- VALUE
- uninstall_action_options_new(int argc, VALUE *argv, VALUE self)
- {
- UninstallActionOptions * ptr(0);
- try
- {
- bool v_no_config_protect;
-
- if (1 == argc && rb_obj_is_kind_of(argv[0], rb_cHash))
- {
- if (Qnil == rb_hash_aref(argv[0], ID2SYM(rb_intern("no_config_protect"))))
- rb_raise(rb_eArgError, "Missing Parameter: no_config_protect");
- v_no_config_protect =
- value_to_bool(rb_hash_aref(argv[0], ID2SYM(rb_intern("no_config_protect"))));
- }
- else if (1 == argc)
- {
- v_no_config_protect = value_to_bool(argv[0]);
- }
- else
- {
- rb_raise(rb_eArgError, "UninstallActionOptions expects one argument, but got %d",argc);
- }
-
- ptr = new UninstallActionOptions(UninstallActionOptions::named_create()
- (k::no_config_protect(), v_no_config_protect)
- );
-
- VALUE tdata(Data_Wrap_Struct(self, 0, &Common<UninstallActionOptions>::free, ptr));
- rb_obj_call_init(tdata, argc, argv);
- return tdata;
- }
- catch (const std::exception & e)
- {
- delete ptr;
- exception_to_ruby_exception(e);
- }
- }
-
- /*
- * call-seq:
* UninstallAction.new -> UninstallAction
*/
VALUE
- uninstall_action_new(VALUE self, VALUE opts)
+ uninstall_action_new(VALUE self)
{
- const UninstallActionOptions opts_ptr(value_to_uninstall_action_options(opts));
std::tr1::shared_ptr<Action> * a(
- new std::tr1::shared_ptr<Action>(new UninstallAction(opts_ptr)));
+ new std::tr1::shared_ptr<Action>(new UninstallAction));
VALUE tdata(Data_Wrap_Struct(self, 0, &Common<std::tr1::shared_ptr<Action> >::free, a));
rb_obj_call_init(tdata, 1, &self);
return tdata;
@@ -700,20 +609,6 @@ namespace
/*
* call-seq:
- * options -> UninstallActionOptions
- *
- * Our UninstallActionOptions.
- */
- VALUE
- uninstall_action_options(VALUE self)
- {
- std::tr1::shared_ptr<Action> * p;
- Data_Get_Struct(self, std::tr1::shared_ptr<Action>, p);
- return uninstall_action_options_to_value(std::tr1::static_pointer_cast<UninstallAction>(*p)->options);
- }
-
- /*
- * call-seq:
* failed? -> true or false
*
* Did our pretend phase fail?
@@ -855,8 +750,6 @@ namespace
c_install_action_options = rb_define_class_under(paludis_module(), "InstallActionOptions", rb_cObject);
rb_define_singleton_method(c_install_action_options, "new", RUBY_FUNC_CAST(&install_action_options_new), -1);
rb_define_method(c_install_action_options, "initialize", RUBY_FUNC_CAST(&empty_init), -1);
- rb_define_method(c_install_action_options, "no_config_protect?",
- RUBY_FUNC_CAST((&KCFetch<InstallActionOptions, k::no_config_protect, bool>::fetch)), 0);
rb_define_method(c_install_action_options, "debug_build",
RUBY_FUNC_CAST((&KCFetchEnum<InstallActionOptions, k::debug_build>::fetch)), 0);
rb_define_method(c_install_action_options, "checks",
@@ -874,25 +767,13 @@ namespace
rb_define_method(c_install_action, "options", RUBY_FUNC_CAST(&install_action_options), 0);
/*
- * Document-class: Paludis::UninstallActionOptions
- *
- * Options for Paludis::UninstallAction.
- */
- c_uninstall_action_options = rb_define_class_under(paludis_module(), "UninstallActionOptions", rb_cObject);
- rb_define_singleton_method(c_uninstall_action_options, "new", RUBY_FUNC_CAST(&uninstall_action_options_new), -1);
- rb_define_method(c_uninstall_action_options, "initialize", RUBY_FUNC_CAST(&empty_init), -1);
- rb_define_method(c_uninstall_action_options, "no_config_protect?",
- RUBY_FUNC_CAST((&KCFetch<UninstallActionOptions, k::no_config_protect, bool>::fetch)), 0);
-
- /*
* Document-class: Paludis::UninstallAction
*
* An UninstallAction is used by UninstallTask to uninstall a PackageID.
*/
c_uninstall_action = rb_define_class_under(paludis_module(), "UninstallAction", c_action);
- rb_define_singleton_method(c_uninstall_action, "new", RUBY_FUNC_CAST(&uninstall_action_new), 1);
+ rb_define_singleton_method(c_uninstall_action, "new", RUBY_FUNC_CAST(&uninstall_action_new), 0);
rb_define_method(c_uninstall_action, "initialize", RUBY_FUNC_CAST(&empty_init), -1);
- rb_define_method(c_uninstall_action, "options", RUBY_FUNC_CAST(&uninstall_action_options), 0);
/*
* Document-class: Paludis::InstalledAction
diff --git a/ruby/action_TEST.rb b/ruby/action_TEST.rb
index c3ca9e3..c51b353 100644
--- a/ruby/action_TEST.rb
+++ b/ruby/action_TEST.rb
@@ -30,13 +30,13 @@ module Paludis
def hash_args
InstallActionOptions.new(
- {:no_config_protect => true, :debug_build => InstallActionDebugOption::Internal,
+ {:debug_build => InstallActionDebugOption::Internal,
:checks => InstallActionChecksOption::Always, :destination => destination}
)
end
def long_args
- InstallActionOptions.new(false, InstallActionDebugOption::Split,
+ InstallActionOptions.new(InstallActionDebugOption::Split,
InstallActionChecksOption::Default, destination)
end
@@ -105,7 +105,6 @@ module Paludis
def test_methods_hash_args
opts = hash_args
- assert opts.no_config_protect?
assert_equal InstallActionDebugOption::Internal, opts.debug_build
assert_equal InstallActionChecksOption::Always, opts.checks
assert_equal destination.name, opts.destination.name
@@ -113,29 +112,12 @@ module Paludis
def test_methods_long_args
opts = long_args
- assert !opts.no_config_protect?
assert_equal InstallActionDebugOption::Split, opts.debug_build
assert_equal InstallActionChecksOption::Default, opts.checks
assert_equal destination.name, opts.destination.name
end
end
- class TestCase_UninstallActionOptions < Test::Unit::TestCase
- def test_create
- assert_kind_of UninstallActionOptions, UninstallActionOptions.new(true)
- assert_kind_of UninstallActionOptions, UninstallActionOptions.new(
- {:no_config_protect => false})
- end
-
- def test_methods
- uao = UninstallActionOptions.new(true)
- assert uao.no_config_protect?
-
- uao = UninstallActionOptions.new({:no_config_protect => false})
- assert !uao.no_config_protect?
- end
- end
-
class TestCase_FetchActionFailure < Test::Unit::TestCase
def test_create
assert_kind_of FetchActionFailure, FetchActionFailure.new('target_file', false, false, 'fic')
@@ -250,7 +232,6 @@ module Paludis
def test_options_hash_args
action = InstallAction.new(hash_args)
assert_kind_of InstallActionOptions, action.options
- assert action.options.no_config_protect?
assert_equal InstallActionDebugOption::Internal, action.options.debug_build
assert_equal InstallActionChecksOption::Always, action.options.checks
assert_equal destination.name, action.options.destination.name
@@ -259,14 +240,12 @@ module Paludis
class TestCase_UninstallAction < Test::Unit::TestCase
def test_create
- assert_kind_of UninstallAction, UninstallAction.new(UninstallActionOptions.new(true))
- assert_kind_of Action, UninstallAction.new(UninstallActionOptions.new(true))
-
- assert_kind_of UninstallAction, UninstallAction.new(UninstallActionOptions.new({:no_config_protect => false}))
+ assert_kind_of UninstallAction, UninstallAction.new
+ assert_kind_of Action, UninstallAction.new
end
def test_bad_create
- assert_raise TypeError do
+ assert_raise ArgumentError do
UninstallAction.new("foo")
end
@@ -274,12 +253,6 @@ module Paludis
InstallAction.new(InstallActionOptions.new({:monkey => false}))
end
end
-
- def test_options_hash_args
- action = UninstallAction.new(UninstallActionOptions.new(false))
- assert_kind_of UninstallActionOptions, action.options
- assert !action.options.no_config_protect?
- end
end
class TestCase_PretendAction < Test::Unit::TestCase
diff --git a/ruby/action_TEST_cleanup.sh b/ruby/action_TEST_cleanup.sh
index 2d6ea37..a85253b 100755
--- a/ruby/action_TEST_cleanup.sh
+++ b/ruby/action_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d action_TEST_dir ] ; then
diff --git a/ruby/action_TEST_setup.sh b/ruby/action_TEST_setup.sh
index 2a2fc91..d851303 100755
--- a/ruby/action_TEST_setup.sh
+++ b/ruby/action_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir action_TEST_dir || exit 1
diff --git a/ruby/dep_list_TEST_cleanup.sh b/ruby/dep_list_TEST_cleanup.sh
index ee4aa20..f51e43b 100755
--- a/ruby/dep_list_TEST_cleanup.sh
+++ b/ruby/dep_list_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d dep_list_TEST_dir ] ; then
diff --git a/ruby/dep_list_TEST_setup.sh b/ruby/dep_list_TEST_setup.sh
index c2c1689..54aa34d 100755
--- a/ruby/dep_list_TEST_setup.sh
+++ b/ruby/dep_list_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir dep_list_TEST_dir || exit 1
diff --git a/ruby/dep_spec.cc b/ruby/dep_spec.cc
index 19496f9..1262a89 100644
--- a/ruby/dep_spec.cc
+++ b/ruby/dep_spec.cc
@@ -665,18 +665,34 @@ namespace
/*
* call-seq:
- * repository -> String or Nil
+ * in_repository -> String or Nil
*
- * Fetch the repository name.
+ * Fetch the in-repository name.
*/
VALUE
- package_dep_spec_repository_ptr(VALUE self)
+ package_dep_spec_in_repository_ptr(VALUE self)
{
std::tr1::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::tr1::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::tr1::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->repository_ptr())
+ if (0 == std::tr1::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->in_repository_ptr())
return Qnil;
- return rb_str_new2(stringify((*std::tr1::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->repository_ptr())).c_str());
+ return rb_str_new2(stringify((*std::tr1::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->in_repository_ptr())).c_str());
+ }
+
+ /*
+ * call-seq:
+ * from_repository -> String or Nil
+ *
+ * Fetch the from-repository name.
+ */
+ VALUE
+ package_dep_spec_from_repository_ptr(VALUE self)
+ {
+ std::tr1::shared_ptr<WrappedSpecBase> * ptr;
+ Data_Get_Struct(self, std::tr1::shared_ptr<WrappedSpecBase>, ptr);
+ if (0 == std::tr1::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->from_repository_ptr())
+ return Qnil;
+ return rb_str_new2(stringify((*std::tr1::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->from_repository_ptr())).c_str());
}
/*
@@ -1085,7 +1101,8 @@ namespace
#ifdef CIARANM_REMOVED_THIS
rb_define_method(c_package_dep_spec, "slot", RUBY_FUNC_CAST(&package_dep_spec_slot_ptr), 0);
#endif
- rb_define_method(c_package_dep_spec, "repository", RUBY_FUNC_CAST(&package_dep_spec_repository_ptr), 0);
+ rb_define_method(c_package_dep_spec, "in_repository", RUBY_FUNC_CAST(&package_dep_spec_in_repository_ptr), 0);
+ rb_define_method(c_package_dep_spec, "from_repository", RUBY_FUNC_CAST(&package_dep_spec_from_repository_ptr), 0);
rb_define_method(c_package_dep_spec, "version_requirements", RUBY_FUNC_CAST(&package_dep_spec_version_requirements_ptr), 0);
rb_define_method(c_package_dep_spec, "version_requirements_mode", RUBY_FUNC_CAST(&package_dep_spec_version_requirements_mode), 0);
#ifdef CIARANM_REMOVED_THIS
diff --git a/ruby/dep_spec_TEST.rb b/ruby/dep_spec_TEST.rb
index c9ee229..177645c 100644
--- a/ruby/dep_spec_TEST.rb
+++ b/ruby/dep_spec_TEST.rb
@@ -118,9 +118,14 @@ module Paludis
assert_nil pdb.package
end
- def test_repository
- assert_equal "testrepo", pda.repository
- assert_nil pdb.repository
+ def test_from_repository
+ assert_nil pda.from_repository
+ assert_nil pdb.from_repository
+ end
+
+ def test_in_repository
+ assert_equal "testrepo", pda.in_repository
+ assert_nil pdb.in_repository
end
def test_package_name_part
diff --git a/ruby/dep_spec_TEST_cleanup.sh b/ruby/dep_spec_TEST_cleanup.sh
index 7710f1c..e44bf3d 100755
--- a/ruby/dep_spec_TEST_cleanup.sh
+++ b/ruby/dep_spec_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d dep_spec_TEST_dir ] ; then
diff --git a/ruby/dep_spec_TEST_setup.sh b/ruby/dep_spec_TEST_setup.sh
index 4eac2ae..df21af5 100755
--- a/ruby/dep_spec_TEST_setup.sh
+++ b/ruby/dep_spec_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir dep_spec_TEST_dir || exit 1
diff --git a/ruby/dep_tag_TEST_cleanup.sh b/ruby/dep_tag_TEST_cleanup.sh
index 28e3591..2cccc91 100755
--- a/ruby/dep_tag_TEST_cleanup.sh
+++ b/ruby/dep_tag_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d dep_tag_TEST_dir ] ; then
diff --git a/ruby/dep_tag_TEST_setup.sh b/ruby/dep_tag_TEST_setup.sh
index 738fd96..8d13453 100755
--- a/ruby/dep_tag_TEST_setup.sh
+++ b/ruby/dep_tag_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir dep_tag_TEST_dir || exit 1
diff --git a/ruby/environment_TEST_cleanup.sh b/ruby/environment_TEST_cleanup.sh
index 2efc8a2..462fbf4 100755
--- a/ruby/environment_TEST_cleanup.sh
+++ b/ruby/environment_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d environment_TEST_dir ] ; then
diff --git a/ruby/environment_TEST_setup.sh b/ruby/environment_TEST_setup.sh
index ed968f9..e7b0497 100755
--- a/ruby/environment_TEST_setup.sh
+++ b/ruby/environment_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir environment_TEST_dir || exit 1
diff --git a/ruby/find_unused_packages_task_TEST_cleanup.sh b/ruby/find_unused_packages_task_TEST_cleanup.sh
index 64e75c8..63faeb5 100755
--- a/ruby/find_unused_packages_task_TEST_cleanup.sh
+++ b/ruby/find_unused_packages_task_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d find_unused_packages_task_TEST_dir ] ; then
diff --git a/ruby/find_unused_packages_task_TEST_setup.sh b/ruby/find_unused_packages_task_TEST_setup.sh
index 0aa5c1d..b37d2c8 100755
--- a/ruby/find_unused_packages_task_TEST_setup.sh
+++ b/ruby/find_unused_packages_task_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir find_unused_packages_task_TEST_dir || exit 1
diff --git a/ruby/generator.cc b/ruby/generator.cc
index a3ae830..1c8f7ee 100644
--- a/ruby/generator.cc
+++ b/ruby/generator.cc
@@ -31,7 +31,8 @@ namespace
static VALUE c_generator_all;
static VALUE c_generator_matches;
static VALUE c_generator_package;
- static VALUE c_generator_repository;
+ static VALUE c_generator_in_repository;
+ static VALUE c_generator_from_repository;
static VALUE c_generator_category;
static VALUE c_generator_intersection;
@@ -167,13 +168,32 @@ namespace
}
VALUE
- generator_repository_new(VALUE self, VALUE name_v)
+ generator_in_repository_new(VALUE self, VALUE name_v)
{
Generator * ptr(0);
try
{
RepositoryName name(StringValuePtr(name_v));
- ptr = new generator::Repository(name);
+ ptr = new generator::InRepository(name);
+ VALUE data(Data_Wrap_Struct(self, 0, &Common<Generator>::free, ptr));
+ rb_obj_call_init(data, 1, &name_v);
+ return data;
+ }
+ catch (const std::exception & e)
+ {
+ delete ptr;
+ exception_to_ruby_exception(e);
+ }
+ }
+
+ VALUE
+ generator_from_repository_new(VALUE self, VALUE name_v)
+ {
+ Generator * ptr(0);
+ try
+ {
+ RepositoryName name(StringValuePtr(name_v));
+ ptr = new generator::FromRepository(name);
VALUE data(Data_Wrap_Struct(self, 0, &Common<Generator>::free, ptr));
rb_obj_call_init(data, 1, &name_v);
return data;
@@ -268,12 +288,20 @@ namespace
rb_define_singleton_method(c_generator_category, "new", RUBY_FUNC_CAST(&generator_category_new), 1);
/*
- * Document-class: Paludis::Generator::Repository
+ * Document-class: Paludis::Generator::InRepository
*
* Generate all packages in a given repository.
*/
- c_generator_repository = rb_define_class_under(c_generator_module, "Repository", c_generator);
- rb_define_singleton_method(c_generator_repository, "new", RUBY_FUNC_CAST(&generator_repository_new), 1);
+ c_generator_in_repository = rb_define_class_under(c_generator_module, "InRepository", c_generator);
+ rb_define_singleton_method(c_generator_in_repository, "new", RUBY_FUNC_CAST(&generator_in_repository_new), 1);
+
+ /*
+ * Document-class: Paludis::Generator::FromRepository
+ *
+ * Generate all packages originally from a given repository.
+ */
+ c_generator_from_repository = rb_define_class_under(c_generator_module, "FromRepository", c_generator);
+ rb_define_singleton_method(c_generator_from_repository, "new", RUBY_FUNC_CAST(&generator_from_repository_new), 1);
}
}
diff --git a/ruby/generator_TEST.rb b/ruby/generator_TEST.rb
index 9f1e994..c82984d 100644
--- a/ruby/generator_TEST.rb
+++ b/ruby/generator_TEST.rb
@@ -76,12 +76,12 @@ module Paludis
class TestCase_GeneratorRepository < Test::Unit::TestCase
def test_create
assert_nothing_raised do
- Generator::Repository.new("repo")
+ Generator::InRepository.new("repo")
end
end
def test_to_s
- assert_equal Generator::Repository.new("repo").to_s, "packages with repository repo"
+ assert_equal Generator::InRepository.new("repo").to_s, "packages with repository repo"
end
end
@@ -100,12 +100,12 @@ module Paludis
class TestCase_GeneratorIntersection < Test::Unit::TestCase
def test_create
assert_nothing_raised do
- Generator::Intersection.new(Generator::All.new, Generator::Repository.new("arbor"))
+ Generator::Intersection.new(Generator::All.new, Generator::InRepository.new("arbor"))
end
end
def test_to_s
- assert_equal Generator::Intersection.new(Generator::All.new, Generator::Repository.new("arbor")).to_s,
+ assert_equal Generator::Intersection.new(Generator::All.new, Generator::InRepository.new("arbor")).to_s,
"all packages intersected with packages with repository arbor"
end
end
@@ -113,14 +113,14 @@ module Paludis
class TestCase_GeneratorAmpersand < Test::Unit::TestCase
def test_create
g1 = Generator::All.new
- g2 = Generator::Repository.new("arbor")
+ g2 = Generator::InRepository.new("arbor")
assert_nothing_raised do
g1 & g2
end
end
def test_to_s
- assert_equal (Generator::All.new & Generator::Repository.new("arbor")).to_s,
+ assert_equal (Generator::All.new & Generator::InRepository.new("arbor")).to_s,
"all packages intersected with packages with repository arbor"
end
end
diff --git a/ruby/generator_TEST_cleanup.sh b/ruby/generator_TEST_cleanup.sh
index edfb61c..7a9c2ec 100755
--- a/ruby/generator_TEST_cleanup.sh
+++ b/ruby/generator_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d generator_TEST_dir ] ; then
diff --git a/ruby/generator_TEST_setup.sh b/ruby/generator_TEST_setup.sh
index 9b720e9..dea3f71 100755
--- a/ruby/generator_TEST_setup.sh
+++ b/ruby/generator_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir generator_TEST_dir || exit 1
diff --git a/ruby/nice_names.nn b/ruby/nice_names.nn
index ee852fc..0c2d54c 100644
--- a/ruby/nice_names.nn
+++ b/ruby/nice_names.nn
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :
include_hh << END
diff --git a/ruby/package_database_TEST.rb b/ruby/package_database_TEST.rb
index e79f1f2..4935b3e 100644
--- a/ruby/package_database_TEST.rb
+++ b/ruby/package_database_TEST.rb
@@ -97,7 +97,11 @@ module Paludis
end
def test_repositories
- assert_equal 3, db.repositories.length
+ if ENV["PALUDIS_ENABLE_VIRTUALS_REPOSITORY"] == "yes" then
+ assert_equal 3, db.repositories.length
+ else
+ assert_equal 1, db.repositories.length
+ end
a = db.repositories.find_all do | repo |
repo.name == "testrepo"
@@ -121,13 +125,22 @@ module Paludis
end
def test_more_important_than
- assert db.more_important_than('testrepo', 'virtuals')
- assert ! db.more_important_than('virtuals', 'testrepo')
+ if ENV["PALUDIS_ENABLE_VIRTUALS_REPOSITORY"] == "yes" then
+ assert db.more_important_than('testrepo', 'virtuals')
+ assert ! db.more_important_than('virtuals', 'testrepo')
+ elsif ENV["PALUDIS_ENABLE_VIRTUALS_REPOSITORY"] == "no" then
+ else
+ throw "oops"
+ end
end
def test_has_repository_named?
assert db.has_repository_named?('testrepo')
- assert db.has_repository_named?('virtuals')
+ if ENV["PALUDIS_ENABLE_VIRTUALS_REPOSITORY"] == "yes" then
+ assert db.has_repository_named?('virtuals')
+ else
+ assert ! db.has_repository_named?('virtuals')
+ end
assert ! db.has_repository_named?('foobarbaz')
end
end
diff --git a/ruby/package_database_TEST_cleanup.sh b/ruby/package_database_TEST_cleanup.sh
index 959cd7e..c34eeb7 100755
--- a/ruby/package_database_TEST_cleanup.sh
+++ b/ruby/package_database_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d package_database_TEST_dir ] ; then
diff --git a/ruby/package_database_TEST_setup.sh b/ruby/package_database_TEST_setup.sh
index 5cc400a..c9e9f4e 100755
--- a/ruby/package_database_TEST_setup.sh
+++ b/ruby/package_database_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir package_database_TEST_dir || exit 1
diff --git a/ruby/package_id.cc b/ruby/package_id.cc
index a33c7b4..0dd35e2 100644
--- a/ruby/package_id.cc
+++ b/ruby/package_id.cc
@@ -328,22 +328,14 @@ namespace
* Our installed time
*/
/*
- * Document-method: source_origin_key
+ * Document-method: from_repositories_key
*
* call-seq:
- * source_origin_key -> MetadataStringKey
+ * from_repositories_key -> MetadataCollectionKey
*
* Our source origin repository
*/
/*
- * Document-method: binary_origin_key
- *
- * call-seq:
- * binary_origin_key -> MetadataStringKey
- *
- * Our binary origin repository
- */
- /*
* Document-method: virtual_for_key
*
* call-seq:
@@ -467,10 +459,8 @@ namespace
rb_define_method(c_package_id, "contents_key", RUBY_FUNC_CAST((&KeyValue<MetadataValueKey<std::tr1::shared_ptr<const Contents> >,
&PackageID::contents_key>::fetch)), 0);
rb_define_method(c_package_id, "installed_time_key", RUBY_FUNC_CAST((&KeyValue<MetadataTimeKey,&PackageID::installed_time_key>::fetch)), 0);
- rb_define_method(c_package_id, "source_origin_key", RUBY_FUNC_CAST((&KeyValue<MetadataValueKey<std::string>,
- &PackageID::source_origin_key>::fetch)), 0);
- rb_define_method(c_package_id, "binary_origin_key", RUBY_FUNC_CAST((&KeyValue<MetadataValueKey<std::string>,
- &PackageID::binary_origin_key>::fetch)), 0);
+ rb_define_method(c_package_id, "from_repositories_key", RUBY_FUNC_CAST((&KeyValue<MetadataCollectionKey<Set<std::string> >,
+ &PackageID::from_repositories_key>::fetch)), 0);
rb_define_method(c_package_id, "fs_location_key", RUBY_FUNC_CAST((
&KeyValue<MetadataValueKey<FSEntry>, &PackageID::fs_location_key>::fetch)), 0);
rb_define_method(c_package_id, "fetches_key", RUBY_FUNC_CAST((
diff --git a/ruby/package_id_TEST.rb b/ruby/package_id_TEST.rb
index 24486fa..437758f 100644
--- a/ruby/package_id_TEST.rb
+++ b/ruby/package_id_TEST.rb
@@ -113,8 +113,7 @@ module Paludis
:keywords_key => MetadataKeywordNameSetKey, :iuse_key => MetadataIUseFlagSetKey,
:short_description_key => MetadataStringKey, :long_description_key => MetadataStringKey,
:contents_key => MetadataContentsKey, :installed_time_key => MetadataTimeKey,
- :source_origin_key => MetadataStringKey, :binary_origin_key => MetadataStringKey,
- :masks => Array
+ :from_repositories_key => Array, :masks => Array
}.each_pair do | method, type |
assert_respond_to pid_testrepo, method
@@ -237,14 +236,6 @@ module Paludis
assert_nil pid_testrepo.installed_time_key
end
- def test_source_origin_key
- assert_nil pid_testrepo.source_origin_key
- end
-
- def test_binary_origin_key
- assert_nil pid_testrepo.binary_origin_key
- end
-
def test_keywords_key
assert_kind_of MetadataKeywordNameSetKey, pid_testrepo.keywords_key
assert_kind_of Array, pid_testrepo.keywords_key.value
@@ -331,13 +322,9 @@ module Paludis
assert_kind_of Time, pid_installed.installed_time_key.value
end
- def test_source_origin_key
- assert_kind_of MetadataStringKey, pid_installed.source_origin_key
- assert_equal 'origin_test', pid_installed.source_origin_key.value
- end
-
- def test_binary_origin_key
- assert_nil pid_installed.binary_origin_key
+ def test_from_repositories_key
+ assert_kind_of MetadataStringSetKey, pid_installed.from_repositories_key
+ assert_equal ['origin_test'], pid_installed.from_repositories_key.value
end
def test_keywords_key
diff --git a/ruby/package_id_TEST_cleanup.sh b/ruby/package_id_TEST_cleanup.sh
index 67392cd..cd8847e 100755
--- a/ruby/package_id_TEST_cleanup.sh
+++ b/ruby/package_id_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d package_id_TEST_dir ] ; then
diff --git a/ruby/package_id_TEST_setup.sh b/ruby/package_id_TEST_setup.sh
index 45de07c..6b2b969 100755
--- a/ruby/package_id_TEST_setup.sh
+++ b/ruby/package_id_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir package_id_TEST_dir || exit 1
diff --git a/ruby/paludis_ruby_TEST_cleanup.sh b/ruby/paludis_ruby_TEST_cleanup.sh
index cda2562..199ed03 100755
--- a/ruby/paludis_ruby_TEST_cleanup.sh
+++ b/ruby/paludis_ruby_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d paludis_ruby_TEST_dir ] ; then
diff --git a/ruby/paludis_ruby_TEST_setup.sh b/ruby/paludis_ruby_TEST_setup.sh
index 13b07dd..e089ce1 100755
--- a/ruby/paludis_ruby_TEST_setup.sh
+++ b/ruby/paludis_ruby_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir paludis_ruby_TEST_dir || exit 1
diff --git a/ruby/repository_TEST_cleanup.sh b/ruby/repository_TEST_cleanup.sh
index 4ba9e47..15910a0 100755
--- a/ruby/repository_TEST_cleanup.sh
+++ b/ruby/repository_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d repository_TEST_dir ] ; then
diff --git a/ruby/repository_TEST_setup.sh b/ruby/repository_TEST_setup.sh
index bf71211..7b34901 100755
--- a/ruby/repository_TEST_setup.sh
+++ b/ruby/repository_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir repository_TEST_dir || exit 1
diff --git a/src/clients/accerso/accerso.cc b/src/clients/accerso/accerso.cc
index b083283..163f913 100644
--- a/src/clients/accerso/accerso.cc
+++ b/src/clients/accerso/accerso.cc
@@ -115,7 +115,7 @@ main(int argc, char *argv[])
.master_repository_dir(FSEntry(CommandLine::get_instance()->a_master_repository_dir.argument())));
std::tr1::shared_ptr<const PackageIDSequence> ids(env[selection::AllVersionsSorted(
- generator::Repository(env.main_repository()->name()))]);
+ generator::InRepository(env.main_repository()->name()))]);
std::multimap<std::tr1::shared_ptr<const PackageID>, std::string, PackageIDComparator> results(
PackageIDComparator(env.package_database().get()));
unsigned success(0), total(0);
diff --git a/src/clients/accerso/help_TEST b/src/clients/accerso/help_TEST
index 324e7b8..980b96f 100755
--- a/src/clients/accerso/help_TEST
+++ b/src/clients/accerso/help_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
./accerso --help
diff --git a/src/clients/accerso/version_TEST b/src/clients/accerso/version_TEST
index 8b7fdd8..0047c0d 100755
--- a/src/clients/accerso/version_TEST
+++ b/src/clients/accerso/version_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
./accerso --version
diff --git a/src/clients/adjutrix/args_from_environment_TEST b/src/clients/adjutrix/args_from_environment_TEST
index 00b0489..263392f 100755
--- a/src/clients/adjutrix/args_from_environment_TEST
+++ b/src/clients/adjutrix/args_from_environment_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
ADJUTRIX_OPTIONS=--help ./adjutrix
diff --git a/src/clients/adjutrix/downgrade_check.sr b/src/clients/adjutrix/downgrade_check.sr
index b93145a..b50a029 100644
--- a/src/clients/adjutrix/downgrade_check.sr
+++ b/src/clients/adjutrix/downgrade_check.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_QPNS()
diff --git a/src/clients/adjutrix/find_dropped_keywords.sr b/src/clients/adjutrix/find_dropped_keywords.sr
index b197b2a..4ad2707 100644
--- a/src/clients/adjutrix/find_dropped_keywords.sr
+++ b/src/clients/adjutrix/find_dropped_keywords.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_VersionsEntry()
diff --git a/src/clients/adjutrix/find_stable_candidates.sr b/src/clients/adjutrix/find_stable_candidates.sr
index 9172a89..c460b50 100644
--- a/src/clients/adjutrix/find_stable_candidates.sr
+++ b/src/clients/adjutrix/find_stable_candidates.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_SlotsEntry()
diff --git a/src/clients/adjutrix/find_stable_candidates_TEST b/src/clients/adjutrix/find_stable_candidates_TEST
index 9ae9850..5532408 100755
--- a/src/clients/adjutrix/find_stable_candidates_TEST
+++ b/src/clients/adjutrix/find_stable_candidates_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
./adjutrix --find-stable-candidates -D find_stable_candidates_TEST_dir/ best | \
tee find_stable_candidates_TEST_dir/out1.txt
diff --git a/src/clients/adjutrix/find_stable_candidates_TEST_cleanup.sh b/src/clients/adjutrix/find_stable_candidates_TEST_cleanup.sh
index 1bdc7c1..7ef9b03 100755
--- a/src/clients/adjutrix/find_stable_candidates_TEST_cleanup.sh
+++ b/src/clients/adjutrix/find_stable_candidates_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d find_stable_candidates_TEST_dir ] ; then
diff --git a/src/clients/adjutrix/find_stable_candidates_TEST_setup.sh b/src/clients/adjutrix/find_stable_candidates_TEST_setup.sh
index 2e4855f..386a255 100755
--- a/src/clients/adjutrix/find_stable_candidates_TEST_setup.sh
+++ b/src/clients/adjutrix/find_stable_candidates_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir find_stable_candidates_TEST_dir || exit 1
diff --git a/src/clients/adjutrix/help_TEST b/src/clients/adjutrix/help_TEST
index 7694394..59bb1dd 100755
--- a/src/clients/adjutrix/help_TEST
+++ b/src/clients/adjutrix/help_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
./adjutrix --help
diff --git a/src/clients/adjutrix/keywords_graph.cc b/src/clients/adjutrix/keywords_graph.cc
index 77c8f1b..5e0a41d 100644
--- a/src/clients/adjutrix/keywords_graph.cc
+++ b/src/clients/adjutrix/keywords_graph.cc
@@ -75,7 +75,7 @@ namespace
std::tr1::shared_ptr<const PackageIDSequence> packages(e[selection::AllVersionsGroupedBySlot(
generator::Matches(make_package_dep_spec()
.package(package)
- .repository(repo.name())))]);
+ .in_repository(repo.name())))]);
std::tr1::shared_ptr<const PackageIDSequence> unused(task.execute(package));
if (packages->empty())
diff --git a/src/clients/adjutrix/version_TEST b/src/clients/adjutrix/version_TEST
index 7d5c45e..28b623a 100755
--- a/src/clients/adjutrix/version_TEST
+++ b/src/clients/adjutrix/version_TEST
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
./adjutrix --version
diff --git a/src/clients/contrarius/contrarius_stage_options.sr b/src/clients/contrarius/contrarius_stage_options.sr
index 7e35d7e..c998afd 100644
--- a/src/clients/contrarius/contrarius_stage_options.sr
+++ b/src/clients/contrarius/contrarius_stage_options.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_ContrariusStageOptions()
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc
index 13a6312..833c4de 100644
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc
+++ b/src/clients/gtkpaludis/libgtkpaludis/packages_list_model.cc
@@ -140,18 +140,22 @@ namespace
std::string status;
std::tr1::shared_ptr<const PackageIDSequence> ci(
(*environment)[selection::AllVersionsSorted(
- generator::Matches(pds) &
- generator::Matches(make_package_dep_spec()
- .package(id->name())
- .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(id->slot())))) |
+ (
+ generator::Matches(pds) &
+ generator::Matches(make_package_dep_spec()
+ .package(id->name())
+ .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(id->slot()))))
+ ) |
filter::InstalledAtRoot(environment->root()))]);
std::tr1::shared_ptr<const PackageIDSequence> av(
(*environment)[selection::AllVersionsSorted(
- generator::Matches(pds) &
- generator::Matches(make_package_dep_spec()
- .package(id->name())
- .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(id->slot())))) |
+ (
+ generator::Matches(pds) &
+ generator::Matches(make_package_dep_spec()
+ .package(id->name())
+ .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(id->slot()))))
+ ) |
filter::SupportsAction<InstallAction>() |
filter::NotMasked())]);
@@ -178,10 +182,12 @@ namespace
{
std::tr1::shared_ptr<const PackageIDSequence> av(
(*environment)[selection::AllVersionsSorted(
- generator::Matches(pds) &
- generator::Matches(make_package_dep_spec()
- .package(id->name())
- .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(id->slot())))) |
+ (
+ generator::Matches(pds) &
+ generator::Matches(make_package_dep_spec()
+ .package(id->name())
+ .slot_requirement(make_shared_ptr(new UserSlotExactRequirement(id->slot()))))
+ ) |
filter::SupportsAction<InstallAction>() |
filter::NotMasked())]);
if (av->empty())
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc
index 4bcf957..e3a5769 100644
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc
+++ b/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc
@@ -93,7 +93,7 @@ PackagesRepositoryFilterModel::populate_in_gui_thread(std::tr1::shared_ptr<const
iterator r(append(repositories->children()));
(*r)[_imp->columns.col_text] = stringify(*n);
(*r)[_imp->columns.col_sensitive] = true;
- (*r)[_imp->columns.col_generator] = std::tr1::shared_ptr<Generator>(new generator::Repository(*n));
+ (*r)[_imp->columns.col_generator] = std::tr1::shared_ptr<Generator>(new generator::InRepository(*n));
}
}
diff --git a/src/clients/gtkpaludis/vtemm/defs/Makefile.am b/src/clients/gtkpaludis/vtemm/defs/Makefile.am
index f073bbd..983adb0 100644
--- a/src/clients/gtkpaludis/vtemm/defs/Makefile.am
+++ b/src/clients/gtkpaludis/vtemm/defs/Makefile.am
@@ -25,7 +25,7 @@ CLEANFILES = *~ force_automake_to_include_cxxcompile.cc generate_defs_vte
MAINTAINERCLEANFILES = Makefile.in $(vte_defs)
vte_methods.defs :
- if ! python `pkg-config --variable=datadir pygtk-2.0`/pygtk/2.0/codegen/h2def.py \
+ if ! python `pkg-config --variable=codegendir pygtk-2.0`/h2def.py \
`pkg-config --variable=includedir vte`/vte/*.h \
> $@ ; then rm $@ ; false ; fi
diff --git a/src/clients/inquisitio/help_TEST b/src/clients/inquisitio/help_TEST
index a71a515..576dbb4 100755
--- a/src/clients/inquisitio/help_TEST
+++ b/src/clients/inquisitio/help_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
PALUDIS_SKIP_CONFIG=yes ./inquisitio --help
diff --git a/src/clients/inquisitio/version_TEST b/src/clients/inquisitio/version_TEST
index 5b7c634..e869872 100755
--- a/src/clients/inquisitio/version_TEST
+++ b/src/clients/inquisitio/version_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
PALUDIS_SKIP_CONFIG=yes ./inquisitio --version
diff --git a/src/clients/instruo/help_TEST b/src/clients/instruo/help_TEST
index 8329f80..e424c72 100755
--- a/src/clients/instruo/help_TEST
+++ b/src/clients/instruo/help_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
./instruo --help
diff --git a/src/clients/instruo/instruo.cc b/src/clients/instruo/instruo.cc
index d3d7bf5..db269de 100644
--- a/src/clients/instruo/instruo.cc
+++ b/src/clients/instruo/instruo.cc
@@ -236,7 +236,7 @@ main(int argc, char *argv[])
.master_repository_dir(FSEntry(CommandLine::get_instance()->a_master_repository_dir.argument())));
std::tr1::shared_ptr<const PackageIDSequence> ids(env[selection::AllVersionsSorted(
- generator::Repository(env.main_repository()->name()))]);
+ generator::InRepository(env.main_repository()->name()))]);
std::multimap<std::tr1::shared_ptr<const PackageID>, std::string, PackageIDComparator> results(env.package_database().get());
unsigned success(0), total(0);
diff --git a/src/clients/instruo/version_TEST b/src/clients/instruo/version_TEST
index a207175..3eecdb7 100755
--- a/src/clients/instruo/version_TEST
+++ b/src/clients/instruo/version_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
./instruo --version
diff --git a/src/clients/paludis/args_from_environment_TEST b/src/clients/paludis/args_from_environment_TEST
index e700e88..5ec6fec 100755
--- a/src/clients/paludis/args_from_environment_TEST
+++ b/src/clients/paludis/args_from_environment_TEST
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
PALUDIS_SKIP_CONFIG=yes PALUDIS_OPTIONS=--version ./paludis
diff --git a/src/clients/paludis/continue_on_failure_TEST b/src/clients/paludis/continue_on_failure_TEST
index 46e61d2..5f95d13 100755
--- a/src/clients/paludis/continue_on_failure_TEST
+++ b/src/clients/paludis/continue_on_failure_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
export PALUDIS_HOME=`pwd`/continue_on_failure_TEST_dir/config/
diff --git a/src/clients/paludis/continue_on_failure_TEST_cleanup.sh b/src/clients/paludis/continue_on_failure_TEST_cleanup.sh
index 895190f..5304541 100755
--- a/src/clients/paludis/continue_on_failure_TEST_cleanup.sh
+++ b/src/clients/paludis/continue_on_failure_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d continue_on_failure_TEST_dir ] ; then
diff --git a/src/clients/paludis/continue_on_failure_TEST_setup.sh b/src/clients/paludis/continue_on_failure_TEST_setup.sh
index 6efbd0f..b1003de 100755
--- a/src/clients/paludis/continue_on_failure_TEST_setup.sh
+++ b/src/clients/paludis/continue_on_failure_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir continue_on_failure_TEST_dir || exit 1
diff --git a/src/clients/paludis/exception_TEST b/src/clients/paludis/exception_TEST
index 7f5315b..c3334ec 100755
--- a/src/clients/paludis/exception_TEST
+++ b/src/clients/paludis/exception_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
PALUDIS_HOME=./ \
./paludis --config-suffix paludis-build-test -pi asdf 2>&1 \
diff --git a/src/clients/paludis/help_TEST b/src/clients/paludis/help_TEST
index 3a0f5fb..ece503f 100755
--- a/src/clients/paludis/help_TEST
+++ b/src/clients/paludis/help_TEST
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
PALUDIS_SKIP_CONFIG=yes ./paludis --help
diff --git a/src/clients/paludis/info.cc b/src/clients/paludis/info.cc
index ae1c3d5..343c35d 100644
--- a/src/clients/paludis/info.cc
+++ b/src/clients/paludis/info.cc
@@ -76,9 +76,13 @@ namespace
{
cout << endl;
cout << indent << colour(cl_heading, k.human_name() + ":") << endl;
- std::set<std::tr1::shared_ptr<const MetadataKey>, MetadataKeyComparator > keys(k.begin_metadata(), k.end_metadata());
+ std::set<std::tr1::shared_ptr<const MetadataKey>, MetadataKeyComparator > keys(
+ k.begin_metadata(), k.end_metadata());
InfoDisplayer i(indent + " ");
- std::for_each(indirect_iterator(keys.begin()), indirect_iterator(keys.end()), accept_visitor(i));
+ for (std::set<std::tr1::shared_ptr<const MetadataKey>, MetadataKeyComparator>::const_iterator
+ e(keys.begin()), e_end(keys.end()) ; e != e_end ; ++e)
+ if ((*e)->type() != mkt_internal)
+ accept_visitor(i)(**e);
}
void visit(const MetadataValueKey<std::string> & k)
@@ -315,7 +319,10 @@ do_info(const std::tr1::shared_ptr<const Environment> & env)
std::set<std::tr1::shared_ptr<const MetadataKey>, MetadataKeyComparator> keys(
env->begin_metadata(), env->end_metadata());
InfoDisplayer i(" ");
- std::for_each(indirect_iterator(keys.begin()), indirect_iterator(keys.end()), accept_visitor(i));
+ for (std::set<std::tr1::shared_ptr<const MetadataKey>, MetadataKeyComparator>::const_iterator
+ k(keys.begin()), k_end(keys.end()) ; k != k_end ; ++k)
+ if ((*k)->type() != mkt_internal)
+ accept_visitor(i)(**k);
cout << endl;
}
@@ -326,7 +333,10 @@ do_info(const std::tr1::shared_ptr<const Environment> & env)
cout << "Repository " << colour(cl_repository_name, r->name()) << ":" << endl;
std::set<std::tr1::shared_ptr<const MetadataKey>, MetadataKeyComparator> keys(r->begin_metadata(), r->end_metadata());
InfoDisplayer i(" ");
- std::for_each(indirect_iterator(keys.begin()), indirect_iterator(keys.end()), accept_visitor(i));
+ for (std::set<std::tr1::shared_ptr<const MetadataKey>, MetadataKeyComparator>::const_iterator
+ k(keys.begin()), k_end(keys.end()) ; k != k_end ; ++k)
+ if ((*k)->type() != mkt_internal)
+ accept_visitor(i)(**k);
cout << endl;
}
diff --git a/src/clients/paludis/install_TEST b/src/clients/paludis/install_TEST
index 20a0b26..62ffb98 100755
--- a/src/clients/paludis/install_TEST
+++ b/src/clients/paludis/install_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
for c in vdb_config exndbam_config ; do
diff --git a/src/clients/paludis/install_TEST_cleanup.sh b/src/clients/paludis/install_TEST_cleanup.sh
index 92bb92a..6440b50 100755
--- a/src/clients/paludis/install_TEST_cleanup.sh
+++ b/src/clients/paludis/install_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d install_TEST_dir ] ; then
diff --git a/src/clients/paludis/install_TEST_setup.sh b/src/clients/paludis/install_TEST_setup.sh
index 7750221..07c975e 100755
--- a/src/clients/paludis/install_TEST_setup.sh
+++ b/src/clients/paludis/install_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir install_TEST_dir || exit 1
@@ -75,7 +75,7 @@ mkdir -p repo1/{eclass,distfiles,profiles/{testprofile,anothertestprofile},test-
mkdir -p src/target-2
cat <<"END" > src/target-2/testbin
-#!/bin/bash
+#!/usr/bin/env bash
echo "Test was a success"
END
chmod +x src/target-2/testbin
diff --git a/src/clients/paludis/list_dep_tag_categories_TEST b/src/clients/paludis/list_dep_tag_categories_TEST
index 40fa15c..680f706 100755
--- a/src/clients/paludis/list_dep_tag_categories_TEST
+++ b/src/clients/paludis/list_dep_tag_categories_TEST
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
PALUDIS_SKIP_CONFIG=yes ./paludis --list-dep-tag-categories
diff --git a/src/clients/paludis/list_repository_formats_TEST b/src/clients/paludis/list_repository_formats_TEST
index 487513c..9a0e9ad 100755
--- a/src/clients/paludis/list_repository_formats_TEST
+++ b/src/clients/paludis/list_repository_formats_TEST
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
PALUDIS_SKIP_CONFIG=yes ./paludis --list-repository-formats
diff --git a/src/clients/paludis/pretend_TEST b/src/clients/paludis/pretend_TEST
index d646547..ab8efd9 100755
--- a/src/clients/paludis/pretend_TEST
+++ b/src/clients/paludis/pretend_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
PALUDIS_HOME=./pretend_TEST_dir/config/ ./paludis --environment :pretend-test \
--list-packages || exit 12
diff --git a/src/clients/paludis/pretend_TEST_cleanup.sh b/src/clients/paludis/pretend_TEST_cleanup.sh
index 9f78057..56f3bfa 100755
--- a/src/clients/paludis/pretend_TEST_cleanup.sh
+++ b/src/clients/paludis/pretend_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d pretend_TEST_dir ] ; then
diff --git a/src/clients/paludis/pretend_TEST_setup.sh b/src/clients/paludis/pretend_TEST_setup.sh
index 7fd72cb..e623b68 100755
--- a/src/clients/paludis/pretend_TEST_setup.sh
+++ b/src/clients/paludis/pretend_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir pretend_TEST_dir || exit 1
diff --git a/src/clients/paludis/query.cc b/src/clients/paludis/query.cc
index 39e8b63..d8caf96 100644
--- a/src/clients/paludis/query.cc
+++ b/src/clients/paludis/query.cc
@@ -131,7 +131,7 @@ void do_one_query(
try
{
do_one_package_query(env, masks_to_explain, make_shared_ptr(new PackageDepSpec(
- parse_user_package_dep_spec(q, env.get(), UserPackageDepSpecOptions() + updso_throw_if_set))));
+ parse_user_package_dep_spec(q, env.get(), UserPackageDepSpecOptions() + updso_throw_if_set + updso_allow_wildcards))));
}
catch (const GotASetNotAPackageDepSpec &)
{
@@ -186,16 +186,23 @@ int do_query(std::tr1::shared_ptr<Environment> env)
{
cerr << " Looking for suggestions:" << endl;
- FuzzyCandidatesFinder f(*env, e.name(), filter::All());
-
- if (f.begin() == f.end())
- cerr << "No suggestions found." << endl;
- else
- cerr << "Suggestions:" << endl;
-
- for (FuzzyCandidatesFinder::CandidatesConstIterator c(f.begin()),
- c_end(f.end()) ; c != c_end ; ++c)
- cerr << " * " << colour(cl_package_name, *c) << endl;
+ try
+ {
+ FuzzyCandidatesFinder f(*env, e.name(), filter::All());
+
+ if (f.begin() == f.end())
+ cerr << "No suggestions found." << endl;
+ else
+ cerr << "Suggestions:" << endl;
+
+ for (FuzzyCandidatesFinder::CandidatesConstIterator c(f.begin()),
+ c_end(f.end()) ; c != c_end ; ++c)
+ cerr << " * " << colour(cl_package_name, *c) << endl;
+ }
+ catch (const PackageDepSpecError &)
+ {
+ cerr << "Query too complicated or confusing to make suggestions." << endl;
+ }
}
cerr << endl;
diff --git a/src/clients/paludis/report.cc b/src/clients/paludis/report.cc
index ae7c607..a4b0d87 100644
--- a/src/clients/paludis/report.cc
+++ b/src/clients/paludis/report.cc
@@ -24,7 +24,9 @@
#include <paludis/mask.hh>
#include <paludis/dep_tag.hh>
#include <paludis/package_id.hh>
+#include <paludis/metadata_key.hh>
#include <paludis/util/visitor-impl.hh>
+#include <paludis/util/join.hh>
#include <iostream>
/** \file
@@ -58,11 +60,11 @@ namespace
virtual void on_report_check_package_pre(const QualifiedPackageName & p);
virtual void on_report_package_success(const std::tr1::shared_ptr<const PackageID> & id);
virtual void on_report_package_failure_pre(const std::tr1::shared_ptr<const PackageID> & id);
- virtual void on_report_package_is_masked(const std::tr1::shared_ptr<const PackageID> & id, const std::tr1::shared_ptr<const PackageID> & origin);
+ virtual void on_report_package_is_masked(const std::tr1::shared_ptr<const PackageID> & id, const std::tr1::shared_ptr<const PackageIDSequence> & origin);
virtual void on_report_package_is_vulnerable_pre(const std::tr1::shared_ptr<const PackageID> & id);
virtual void on_report_package_is_vulnerable(const std::tr1::shared_ptr<const PackageID> & id, const GLSADepTag & glsa_tag);
virtual void on_report_package_is_vulnerable_post(const std::tr1::shared_ptr<const PackageID> & id);
- virtual void on_report_package_is_missing(const std::tr1::shared_ptr<const PackageID> & id, const RepositoryName & repo_name);
+ virtual void on_report_package_is_missing(const std::tr1::shared_ptr<const PackageID> & id);
virtual void on_report_package_is_unused(const std::tr1::shared_ptr<const PackageID> & id);
virtual void on_report_package_failure_post(const std::tr1::shared_ptr<const PackageID> & id);
virtual void on_report_check_package_post(const QualifiedPackageName & p);
@@ -98,24 +100,33 @@ namespace
void
OurReportTask::on_report_package_is_masked(const std::tr1::shared_ptr<const PackageID> & id,
- const std::tr1::shared_ptr<const PackageID> & origin)
+ const std::tr1::shared_ptr<const PackageIDSequence> & origins)
{
cout << endl << " Masked by: ";
- bool comma(false);
- for (PackageID::MasksConstIterator m(origin->begin_masks()), m_end(origin->end_masks()) ;
- m != m_end ; ++m)
+ bool outer_comma(false);
+ for (PackageIDSequence::ConstIterator o(origins->begin()), o_end(origins->end()) ;
+ o != o_end ; ++o)
{
- if (comma)
- cout << ", ";
+ if (outer_comma)
+ cout << "; ";
- MaskDisplayer d(env, id, true);
- (*m)->accept(d);
- cout << d.result();
+ bool comma(false);
+ for (PackageID::MasksConstIterator m((*o)->begin_masks()), m_end((*o)->end_masks()) ;
+ m != m_end ; ++m)
+ {
+ if (comma)
+ cout << ", ";
+
+ MaskDisplayer d(env, id, true);
+ (*m)->accept(d);
+ cout << d.result();
- comma = true;
+ comma = true;
+ }
+ cout << " in '" << (*o)->repository()->name() << "'";
+ outer_comma = true;
}
- cout << " in its original repository '" << origin->repository()->name() << "'";
++_n_errors;
}
@@ -139,10 +150,11 @@ namespace
}
void
- OurReportTask::on_report_package_is_missing(const std::tr1::shared_ptr<const PackageID> &,
- const RepositoryName & repo_name)
+ OurReportTask::on_report_package_is_missing(const std::tr1::shared_ptr<const PackageID> & id)
{
- cout << endl << " No longer exists in its original repository '" << repo_name << "'";
+ cout << endl << " No longer exists in original repositories '" <<
+ join(id->from_repositories_key()->value()->begin(), id->from_repositories_key()->value()->end(),
+ "', '") << "'";
++_n_errors;
}
diff --git a/src/clients/paludis/uninstall.cc b/src/clients/paludis/uninstall.cc
index 9287594..c3505e6 100644
--- a/src/clients/paludis/uninstall.cc
+++ b/src/clients/paludis/uninstall.cc
@@ -227,7 +227,6 @@ namespace
OurUninstallTask task(env);
task.set_pretend(CommandLine::get_instance()->install_args.a_pretend.specified());
- task.set_no_config_protect(CommandLine::get_instance()->install_args.a_no_config_protection.specified());
task.set_preserve_world(CommandLine::get_instance()->install_args.a_preserve_world.specified());
task.set_with_unused_dependencies(CommandLine::get_instance()->a_with_unused_dependencies.specified());
task.set_with_dependencies(CommandLine::get_instance()->a_with_dependencies.specified());
@@ -302,16 +301,23 @@ namespace
{
cerr << " Looking for suggestions:" << endl;
- FuzzyCandidatesFinder f(*env, e.name(), filter::InstalledAtRoot(env->root()));
+ try
+ {
+ FuzzyCandidatesFinder f(*env, e.name(), filter::InstalledAtRoot(env->root()));
- if (f.begin() == f.end())
- cerr << "No suggestions found." << endl;
- else
- cerr << "Suggestions:" << endl;
+ if (f.begin() == f.end())
+ cerr << "No suggestions found." << endl;
+ else
+ cerr << "Suggestions:" << endl;
- for (FuzzyCandidatesFinder::CandidatesConstIterator c(f.begin()),
- c_end(f.end()) ; c != c_end ; ++c)
- cerr << " * " << colour(cl_package_name, *c) << endl;
+ for (FuzzyCandidatesFinder::CandidatesConstIterator c(f.begin()),
+ c_end(f.end()) ; c != c_end ; ++c)
+ cerr << " * " << colour(cl_package_name, *c) << endl;
+ }
+ catch (const PackageDepSpecError &)
+ {
+ cerr << "Query too complicated or confusing to make suggestions." << endl;
+ }
}
cerr << endl;
diff --git a/src/clients/paludis/upgrade_TEST b/src/clients/paludis/upgrade_TEST
index 54d3ddb..9054cf3 100755
--- a/src/clients/paludis/upgrade_TEST
+++ b/src/clients/paludis/upgrade_TEST
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
for c in vdb_config exndbam_config ; do
diff --git a/src/clients/paludis/upgrade_TEST_cleanup.sh b/src/clients/paludis/upgrade_TEST_cleanup.sh
index bc42e78..10ff0ab 100755
--- a/src/clients/paludis/upgrade_TEST_cleanup.sh
+++ b/src/clients/paludis/upgrade_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d upgrade_TEST_dir ] ; then
diff --git a/src/clients/paludis/upgrade_TEST_setup.sh b/src/clients/paludis/upgrade_TEST_setup.sh
index fb1a739..866175a 100755
--- a/src/clients/paludis/upgrade_TEST_setup.sh
+++ b/src/clients/paludis/upgrade_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir upgrade_TEST_dir || exit 1
@@ -72,12 +72,12 @@ mkdir -p repo1/{eclass,distfiles,profiles/testprofile,test-category/target/files
mkdir -p src/target-1
cat <<"END" > src/target-1/testbin
-#!/bin/bash
+#!/usr/bin/env bash
echo "This is testbin-1"
END
chmod +x src/target-1/testbin
cat <<"END" > src/target-1/testbin1
-#!/bin/bash
+#!/usr/bin/env bash
echo "This is testbin1"
END
chmod +x src/target-1/testbin1
@@ -89,12 +89,12 @@ rm -fr src
mkdir -p src/target-2
cat <<"END" > src/target-2/testbin
-#!/bin/bash
+#!/usr/bin/env bash
echo "This is testbin-2"
END
chmod +x src/target-2/testbin
cat <<"END" > src/target-2/testbin2
-#!/bin/bash
+#!/usr/bin/env bash
echo "This is testbin2"
END
chmod +x src/target-2/testbin2
diff --git a/src/clients/paludis/version_TEST b/src/clients/paludis/version_TEST
index 02513f0..f792c99 100755
--- a/src/clients/paludis/version_TEST
+++ b/src/clients/paludis/version_TEST
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
PALUDIS_SKIP_CONFIG=yes ./paludis --version
diff --git a/src/clients/reconcilio/broken_linkage_finder/configuration_TEST_cleanup.sh b/src/clients/reconcilio/broken_linkage_finder/configuration_TEST_cleanup.sh
index 34e752d..e241fc5 100755
--- a/src/clients/reconcilio/broken_linkage_finder/configuration_TEST_cleanup.sh
+++ b/src/clients/reconcilio/broken_linkage_finder/configuration_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d configuration_TEST_dir ] ; then
diff --git a/src/clients/reconcilio/broken_linkage_finder/configuration_TEST_setup.sh b/src/clients/reconcilio/broken_linkage_finder/configuration_TEST_setup.sh
index af01f32..59a952b 100755
--- a/src/clients/reconcilio/broken_linkage_finder/configuration_TEST_setup.sh
+++ b/src/clients/reconcilio/broken_linkage_finder/configuration_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir configuration_TEST_dir || exit 1
diff --git a/src/clients/reconcilio/util/realpath_TEST_cleanup.sh b/src/clients/reconcilio/util/realpath_TEST_cleanup.sh
index 1a9922f..609b955 100755
--- a/src/clients/reconcilio/util/realpath_TEST_cleanup.sh
+++ b/src/clients/reconcilio/util/realpath_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d realpath_TEST_dir ] ; then
diff --git a/src/clients/reconcilio/util/realpath_TEST_setup.sh b/src/clients/reconcilio/util/realpath_TEST_setup.sh
index 1e22b10..b1fbfad 100755
--- a/src/clients/reconcilio/util/realpath_TEST_setup.sh
+++ b/src/clients/reconcilio/util/realpath_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir realpath_TEST_dir || exit 1
diff --git a/src/clients/reconcilio/util/wildcard_expander_TEST_cleanup.sh b/src/clients/reconcilio/util/wildcard_expander_TEST_cleanup.sh
index 39d9364..7ab9c36 100755
--- a/src/clients/reconcilio/util/wildcard_expander_TEST_cleanup.sh
+++ b/src/clients/reconcilio/util/wildcard_expander_TEST_cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
if [ -d wildcard_expander_TEST_dir ] ; then
diff --git a/src/clients/reconcilio/util/wildcard_expander_TEST_setup.sh b/src/clients/reconcilio/util/wildcard_expander_TEST_setup.sh
index a62b04d..1ff139d 100755
--- a/src/clients/reconcilio/util/wildcard_expander_TEST_setup.sh
+++ b/src/clients/reconcilio/util/wildcard_expander_TEST_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set ft=sh sw=4 sts=4 et :
mkdir wildcard_expander_TEST_dir || exit 1
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index 2b2b232..8c26a5a 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -364,7 +364,7 @@ ConsoleInstallTask::on_display_merge_list_entry(const DepListEntry & d)
std::tr1::shared_ptr<const PackageIDSequence> existing_repo((*environment())[selection::AllVersionsSorted(
generator::Matches(repo ?
- make_package_dep_spec().package(d.package_id->name()).repository(*repo) :
+ make_package_dep_spec().package(d.package_id->name()).in_repository(*repo) :
make_package_dep_spec().package(d.package_id->name())))]);
std::tr1::shared_ptr<const PackageIDSequence> existing_slot_repo((*environment())[selection::AllVersionsSorted(
@@ -372,7 +372,7 @@ ConsoleInstallTask::on_display_merge_list_entry(const DepListEntry & d)
make_package_dep_spec()
.package(d.package_id->name())
.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(d.package_id->slot())))
- .repository(*repo) :
+ .in_repository(*repo) :
make_package_dep_spec()
.package(d.package_id->name())
.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(d.package_id->slot())))
@@ -987,14 +987,16 @@ ConsoleInstallTask::display_merge_list_entry_repository(const DepListEntry & d,
.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(d.package_id->slot())))) |
filter::InstalledAtRoot(environment()->root()))]);
bool changed(normal_entry == m &&
- ! inst->empty() && (*inst->begin())->source_origin_key() &&
- (*inst->begin())->source_origin_key()->value() !=
- stringify(d.package_id->repository()->name()));
+ ! inst->empty() && (*inst->begin())->from_repositories_key() &&
+ (*inst->begin())->from_repositories_key()->value()->end() ==
+ (*inst->begin())->from_repositories_key()->value()->find(
+ stringify(d.package_id->repository()->name())));
if (changed || environment()->package_database()->favourite_repository() != d.package_id->repository()->name())
output_no_endl("::" + stringify(d.package_id->repository()->name()));
if (changed)
- output_no_endl(" (previously ::" + (*inst->begin())->source_origin_key()->value() + ")");
+ output_no_endl(" (previously ::" + join((*inst->begin())->from_repositories_key()->value()->begin(),
+ (*inst->begin())->from_repositories_key()->value()->end(), ", ::") + ")");
}
void
@@ -1637,16 +1639,23 @@ ConsoleInstallTask::on_all_masked_error(const AllMaskedError & e)
{
output_stream() << " Looking for suggestions:" << endl;
- FuzzyCandidatesFinder f(*environment(), stringify(e.query()), filter::SupportsAction<InstallAction>());
+ try
+ {
+ FuzzyCandidatesFinder f(*environment(), stringify(e.query()), filter::SupportsAction<InstallAction>());
- if (f.begin() == f.end())
- output_stream() << "No suggestions found." << endl;
- else
- output_stream() << "Suggestions:" << endl;
+ if (f.begin() == f.end())
+ output_stream() << "No suggestions found." << endl;
+ else
+ output_stream() << "Suggestions:" << endl;
- for (FuzzyCandidatesFinder::CandidatesConstIterator c(f.begin()), c_end(f.end())
- ; c != c_end ; ++c)
- output_stream() << " * " << colour(cl_package_name, *c) << endl;
+ for (FuzzyCandidatesFinder::CandidatesConstIterator c(f.begin()), c_end(f.end())
+ ; c != c_end ; ++c)
+ output_stream() << " * " << colour(cl_package_name, *c) << endl;
+ }
+ catch (const PackageDepSpecError &)
+ {
+ output_stream() << "Query too complicated or confusing to make suggestions." << endl;
+ }
}
}
else
diff --git a/src/output/console_install_task.sr b/src/output/console_install_task.sr
index 0b4615a..401cc60 100644
--- a/src/output/console_install_task.sr
+++ b/src/output/console_install_task.sr
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
make_class_UseDescription()
diff --git a/src/output/console_query_task.cc b/src/output/console_query_task.cc
index b50968b..37c3e0b 100644
--- a/src/output/console_query_task.cc
+++ b/src/output/console_query_task.cc
@@ -73,6 +73,29 @@ ConsoleQueryTask::~ConsoleQueryTask()
void
ConsoleQueryTask::show(const PackageDepSpec & a, std::tr1::shared_ptr<const PackageID> display_entry) const
{
+ /* we might be wildcarded. */
+ if (! a.package_ptr())
+ {
+ std::tr1::shared_ptr<const PackageIDSequence> entries(
+ (*_imp->env)[selection::BestVersionOnly(generator::Matches(a))]);
+ if (entries->empty())
+ throw NoSuchPackageError(stringify(a));
+