diff options
author | 2012-09-09 16:17:14 +0100 | |
---|---|---|
committer | 2012-09-09 16:17:14 +0100 | |
commit | 2f0c98385684988519b9fb163448f5816c7fc3d2 (patch) | |
tree | f24faef66b4a3b0bc4784a25c8c83e1197df37bd /paludis | |
parent | 973da69b343a263d44d45ff1a7831d42d32c22a8 (diff) | |
download | paludis-2f0c98385684988519b9fb163448f5816c7fc3d2.tar.gz paludis-2f0c98385684988519b9fb163448f5816c7fc3d2.tar.xz |
new* can use stdin in EAPI 5
Diffstat (limited to 'paludis')
22 files changed, 262 insertions, 13 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_4.cc b/paludis/repositories/e/e_repository_TEST_4.cc index 5bdfd99ff..c9fdfe286 100644 --- a/paludis/repositories/e/e_repository_TEST_4.cc +++ b/paludis/repositories/e/e_repository_TEST_4.cc @@ -266,7 +266,7 @@ TEST(ERepository, EAPI4MergeType) v_keys->insert("location", stringify(FSPath::cwd() / "e_repository_TEST_4_dir" / "vdb")); v_keys->insert("root", stringify(root)); std::shared_ptr<Repository> v_repo(VDBRepository::repository_factory_create(&env, - std::bind(from_keys, keys, std::placeholders::_1))); + std::bind(from_keys, v_keys, std::placeholders::_1))); env.add_repository(1, v_repo); { @@ -336,7 +336,7 @@ TEST(ERepository, EAPI4MergeTypeBin) v_keys->insert("location", stringify(FSPath::cwd() / "e_repository_TEST_4_dir" / "vdb")); v_keys->insert("root", stringify(root)); std::shared_ptr<Repository> v_repo(VDBRepository::repository_factory_create(&env, - std::bind(from_keys, keys, std::placeholders::_1))); + std::bind(from_keys, v_keys, std::placeholders::_1))); env.add_repository(1, v_repo); { @@ -598,3 +598,50 @@ TEST(ERepository, NoUseX) } } +TEST(ERepository, NoNewStdin) +{ + FSPath root(FSPath::cwd() / "e_repository_TEST_4_dir" / "root"); + + TestEnvironment env; + std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>()); + keys->insert("format", "e"); + keys->insert("names_cache", "/var/empty"); + keys->insert("location", stringify(FSPath::cwd() / "e_repository_TEST_4_dir" / "repo")); + keys->insert("profiles", stringify(FSPath::cwd() / "e_repository_TEST_4_dir" / "repo/profiles/profile")); + keys->insert("layout", "traditional"); + keys->insert("eapi_when_unknown", "0"); + keys->insert("eapi_when_unspecified", "0"); + keys->insert("profile_eapi", "0"); + keys->insert("distdir", stringify(FSPath::cwd() / "e_repository_TEST_4_dir" / "distdir")); + keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_4_dir" / "build")); + std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env, + std::bind(from_keys, keys, std::placeholders::_1))); + env.add_repository(1, repo); + + std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>()); + v_keys->insert("format", "vdb"); + v_keys->insert("names_cache", "/var/empty"); + v_keys->insert("location", stringify(FSPath::cwd() / "e_repository_TEST_4_dir" / "vdb")); + v_keys->insert("root", stringify(root)); + std::shared_ptr<Repository> v_repo(VDBRepository::repository_factory_create(&env, + std::bind(from_keys, v_keys, std::placeholders::_1))); + env.add_repository(1, v_repo); + + { + InstallAction action(make_named_values<InstallActionOptions>( + n::destination() = v_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = std::make_shared<PackageIDSequence>(), + n::want_phase() = &want_all_phases + )); + + const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( + PackageDepSpec(parse_user_package_dep_spec("=cat/no-new-stdin-4::test-repo", + &env, { })), make_null_shared_ptr(), { }))]->last()); + ASSERT_TRUE(bool(id)); + EXPECT_EQ("4", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); + id->perform_action(action); + } +} + diff --git a/paludis/repositories/e/e_repository_TEST_4_setup.sh b/paludis/repositories/e/e_repository_TEST_4_setup.sh index 4fd6f6094..2375aeb6b 100755 --- a/paludis/repositories/e/e_repository_TEST_4_setup.sh +++ b/paludis/repositories/e/e_repository_TEST_4_setup.sh @@ -1210,6 +1210,28 @@ pkg_pretend() { [[ -z $(type -t usex) ]] || die } END +mkdir -p "cat/no-new-stdin" +cat <<'END' > cat/no-new-stdin/no-new-stdin-4.ebuild || exit 1 +EAPI="4" +DESCRIPTION="The Description" +HOMEPAGE="http://example.com/" +SRC_URI="" +SLOT="0" +IUSE="spork" +LICENSE="GPL-2" +KEYWORDS="test" +S=${WORKDIR} + +src_install() { + echo foo >- + insinto /usr/share/test + echo zap | newins - foo + [[ $(<"${D}"/usr/share/test/foo) == foo ]] || die + + rm ./- + echo zap | nonfatal newins - bar && die +} +END cd .. cd .. diff --git a/paludis/repositories/e/e_repository_TEST_5.cc b/paludis/repositories/e/e_repository_TEST_5.cc index 739597fbf..f0e255884 100644 --- a/paludis/repositories/e/e_repository_TEST_5.cc +++ b/paludis/repositories/e/e_repository_TEST_5.cc @@ -264,3 +264,50 @@ TEST(ERepository, UseX) } } +TEST(ERepository, NewStdin) +{ + FSPath root(FSPath::cwd() / "e_repository_TEST_5_dir" / "root"); + + TestEnvironment env; + std::shared_ptr<Map<std::string, std::string> > keys(std::make_shared<Map<std::string, std::string>>()); + keys->insert("format", "e"); + keys->insert("names_cache", "/var/empty"); + keys->insert("location", stringify(FSPath::cwd() / "e_repository_TEST_5_dir" / "repo")); + keys->insert("profiles", stringify(FSPath::cwd() / "e_repository_TEST_5_dir" / "repo/profiles/profile")); + keys->insert("layout", "traditional"); + keys->insert("eapi_when_unknown", "0"); + keys->insert("eapi_when_unspecified", "0"); + keys->insert("profile_eapi", "0"); + keys->insert("distdir", stringify(FSPath::cwd() / "e_repository_TEST_5_dir" / "distdir")); + keys->insert("builddir", stringify(FSPath::cwd() / "e_repository_TEST_5_dir" / "build")); + std::shared_ptr<Repository> repo(ERepository::repository_factory_create(&env, + std::bind(from_keys, keys, std::placeholders::_1))); + env.add_repository(1, repo); + + std::shared_ptr<Map<std::string, std::string> > v_keys(std::make_shared<Map<std::string, std::string>>()); + v_keys->insert("format", "vdb"); + v_keys->insert("names_cache", "/var/empty"); + v_keys->insert("location", stringify(FSPath::cwd() / "e_repository_TEST_5_dir" / "vdb")); + v_keys->insert("root", stringify(root)); + std::shared_ptr<Repository> v_repo(VDBRepository::repository_factory_create(&env, + std::bind(from_keys, v_keys, std::placeholders::_1))); + env.add_repository(1, v_repo); + + { + InstallAction action(make_named_values<InstallActionOptions>( + n::destination() = v_repo, + n::make_output_manager() = &make_standard_output_manager, + n::perform_uninstall() = &cannot_uninstall, + n::replacing() = std::make_shared<PackageIDSequence>(), + n::want_phase() = &want_all_phases + )); + + const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches( + PackageDepSpec(parse_user_package_dep_spec("=cat/new-stdin-5::test-repo", + &env, { })), make_null_shared_ptr(), { }))]->last()); + ASSERT_TRUE(bool(id)); + EXPECT_EQ("5", visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->parse_value()); + id->perform_action(action); + } +} + diff --git a/paludis/repositories/e/e_repository_TEST_5_setup.sh b/paludis/repositories/e/e_repository_TEST_5_setup.sh index 65c782034..50439a9e8 100755 --- a/paludis/repositories/e/e_repository_TEST_5_setup.sh +++ b/paludis/repositories/e/e_repository_TEST_5_setup.sh @@ -169,5 +169,52 @@ EOF } END +mkdir -p "cat/new-stdin" || exit 1 +cat << 'END' > cat/new-stdin/new-stdin-5.ebuild || exit 1 +EAPI="5" +DESCRIPTION="The Description" +HOMEPAGE="http://example.com/" +SRC_URI="" +SLOT="0" +IUSE="" +LICENSE="GPL-2" +KEYWORDS="test" + +S="${WORKDIR}" + +src_install() { + echo testbin | newbin - testbin + echo testconfd | newconfd - testconfd + echo testdoc | newdoc - testdoc + echo testenvd | newenvd - testenvd + exeinto /usr/libexec + echo testexe | newexe - testexe + echo testinitd | newinitd - testinitd + insinto /usr/share/test + echo testins | newins - testins + echo testlib.a | newlib.a - testlib.a + echo testlib.so | newlib.so - testlib.so + echo testman.1 | newman - testman.1 + echo testsbin | newsbin - testsbin + + cat "${D}"/{usr/bin/testbin,etc/conf.d/testconfd,usr/share/doc/${PF}/testdoc,etc/env.d/testenvd,usr/libexec/testexe,etc/init.d/testinitd,usr/share/test/testins,usr/lib*/testlib.a,usr/lib*/testlib.so,usr/share/man/man1/testman.1,usr/sbin/testsbin} > "${T}"/new.out + cat >"${T}"/new.expected <<EOF +testbin +testconfd +testdoc +testenvd +testexe +testinitd +testins +testlib.a +testlib.so +testman.1 +testsbin +EOF + + diff "${T}"/new.{expected,out} || die +} +END + cd .. cd .. diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc index 09587430f..f149e08b6 100644 --- a/paludis/repositories/e/eapi.cc +++ b/paludis/repositories/e/eapi.cc @@ -248,6 +248,7 @@ namespace n::econf_extra_options() = k.get("econf_extra_options"), n::econf_extra_options_help_dependent() = k.get("econf_extra_options_help_dependent"), n::failure_is_fatal() = destringify_key<bool>(k, "failure_is_fatal"), + n::new_stdin() = destringify_key<bool>(k, "new_stdin"), n::unpack_fix_permissions() = destringify_key<bool>(k, "unpack_fix_permissions"), n::unpack_suffixes() = k.get("unpack_suffixes"), n::unpack_unrecognised_is_fatal() = destringify_key<bool>(k, "unpack_unrecognised_is_fatal"), diff --git a/paludis/repositories/e/eapi.hh b/paludis/repositories/e/eapi.hh index 8a87d3285..b5aad4f75 100644 --- a/paludis/repositories/e/eapi.hh +++ b/paludis/repositories/e/eapi.hh @@ -169,6 +169,7 @@ namespace paludis typedef Name<struct name_must_not_change_variables> must_not_change_variables; typedef Name<struct name_must_not_set_vars_starting_with> must_not_set_vars_starting_with; typedef Name<struct name_name> name; + typedef Name<struct name_new_stdin> new_stdin; typedef Name<struct name_no_s_workdir_fallback> no_s_workdir_fallback; typedef Name<struct name_no_slot_or_repo> no_slot_or_repo; typedef Name<struct name_non_empty_variables> non_empty_variables; @@ -480,6 +481,7 @@ namespace paludis NamedValue<n::econf_extra_options, std::string> econf_extra_options; NamedValue<n::econf_extra_options_help_dependent, std::string> econf_extra_options_help_dependent; NamedValue<n::failure_is_fatal, bool> failure_is_fatal; + NamedValue<n::new_stdin, bool> new_stdin; NamedValue<n::unpack_fix_permissions, bool> unpack_fix_permissions; NamedValue<n::unpack_suffixes, std::string> unpack_suffixes; NamedValue<n::unpack_unrecognised_is_fatal, bool> unpack_unrecognised_is_fatal; diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf index 7394b8aa4..4d601511b 100644 --- a/paludis/repositories/e/eapis/0.conf +++ b/paludis/repositories/e/eapis/0.conf @@ -281,6 +281,7 @@ failure_is_fatal = false no_s_workdir_fallback = false use_with_enable_empty_third_argument = false best_has_version_host_root = false +new_stdin = false unpack_suffixes = tar tar.gz,tgz,tar.Z tar.bz2,tbz2,tbz zip,ZIP,jar gz,Z,z bz2 rar,RAR lha,LHa,LHA,lzh a,deb tar.lzma lzma 7z,7Z diff --git a/paludis/repositories/e/eapis/5.conf b/paludis/repositories/e/eapis/5.conf index d0fc84a45..42ea9bc8e 100644 --- a/paludis/repositories/e/eapis/5.conf +++ b/paludis/repositories/e/eapis/5.conf @@ -17,4 +17,5 @@ use_stable_mask_force = true best_has_version_host_root = true econf_extra_options_help_dependent = ${econf_extra_options_help_dependent} disable-silent-rules::--disable-silent-rules +new_stdin = true diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf index 3a5b6068e..2d8d4ce2e 100644 --- a/paludis/repositories/e/eapis/exheres-0.conf +++ b/paludis/repositories/e/eapis/exheres-0.conf @@ -356,6 +356,7 @@ use_with_enable_empty_third_argument = true fix_mtimes = true shell_options = extglob globstar best_has_version_host_root = false +new_stdin = false unpack_suffixes = tar tar.gz,tgz,tar.Z tar.bz2,tbz2,tbz zip,ZIP,jar gz,Z,z bz2 rar,RAR lha,LHa,LHA,lzh a,deb tar.lzma lzma 7z,7Z tar.xz xz diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf index 7182cbaa0..0c44f5211 100644 --- a/paludis/repositories/e/eapis/paludis-1.conf +++ b/paludis/repositories/e/eapis/paludis-1.conf @@ -278,6 +278,7 @@ doins_symlink = false use_with_enable_empty_third_argument = true failure_is_fatal = false best_has_version_host_root = false +new_stdin = false unpack_suffixes = tar tar.gz,tgz,tar.Z tar.bz2,tbz2,tbz zip,ZIP,jar gz,Z,z bz2 rar,RAR lha,LHa,LHA,lzh a,deb tar.lzma lzma 7z,7Z tar.xz xz diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc index bb819b94e..c1651f3f4 100644 --- a/paludis/repositories/e/ebuild.cc +++ b/paludis/repositories/e/ebuild.cc @@ -251,6 +251,8 @@ EbuildCommand::operator() () params.package_id()->eapi()->supported()->tools_options()->doman_lang_filenames_overrides() ? "yes" : "") .setenv("PALUDIS_DOSYM_NO_MKDIR", params.package_id()->eapi()->supported()->tools_options()->dosym_mkdir() ? "" : "yes") + .setenv("PALUDIS_NEW_STDIN", + params.package_id()->eapi()->supported()->tools_options()->new_stdin() ? "yes" : "") .setenv("PALUDIS_USE_WITH_ENABLE_EMPTY_THIRD_ARGUMENT", params.package_id()->eapi()->supported()->tools_options()->use_with_enable_empty_third_argument() ? "yes" : "") .setenv("PALUDIS_FAILURE_IS_FATAL", diff --git a/paludis/repositories/e/ebuild/utils/newbin b/paludis/repositories/e/ebuild/utils/newbin index 19f0caa1a..8e839fa02 100755 --- a/paludis/repositories/e/ebuild/utils/newbin +++ b/paludis/repositories/e/ebuild/utils/newbin @@ -32,5 +32,12 @@ if [[ ${#} -ne 2 ]]; then fi rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}" -cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" + +if [[ ${1} == - && -n ${PALUDIS_NEW_STDIN} ]]; then + [[ -t 0 ]] && paludis_die_or_error "requires stdin input" + cat > "${!PALUDIS_TEMP_DIR_VAR}/${2}" +else + cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" +fi + dobin "${!PALUDIS_TEMP_DIR_VAR}/${2}" diff --git a/paludis/repositories/e/ebuild/utils/newconfd b/paludis/repositories/e/ebuild/utils/newconfd index 917141e95..00047fda2 100755 --- a/paludis/repositories/e/ebuild/utils/newconfd +++ b/paludis/repositories/e/ebuild/utils/newconfd @@ -32,5 +32,12 @@ if [[ ${#} -ne 2 ]]; then fi rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}" -cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" + +if [[ ${1} == - && -n ${PALUDIS_NEW_STDIN} ]]; then + [[ -t 0 ]] && paludis_die_or_error "requires stdin input" + cat > "${!PALUDIS_TEMP_DIR_VAR}/${2}" +else + cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" +fi + doconfd "${!PALUDIS_TEMP_DIR_VAR}/${2}" diff --git a/paludis/repositories/e/ebuild/utils/newdoc b/paludis/repositories/e/ebuild/utils/newdoc index 70c7ee82c..d0eb53f8a 100755 --- a/paludis/repositories/e/ebuild/utils/newdoc +++ b/paludis/repositories/e/ebuild/utils/newdoc @@ -32,5 +32,12 @@ if [[ ${#} -ne 2 ]]; then fi rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}" -cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" + +if [[ ${1} == - && -n ${PALUDIS_NEW_STDIN} ]]; then + [[ -t 0 ]] && paludis_die_or_error "requires stdin input" + cat > "${!PALUDIS_TEMP_DIR_VAR}/${2}" +else + cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" +fi + dodoc "${!PALUDIS_TEMP_DIR_VAR}/${2}" diff --git a/paludis/repositories/e/ebuild/utils/newenvd b/paludis/repositories/e/ebuild/utils/newenvd index 3836c396d..27f7f2584 100755 --- a/paludis/repositories/e/ebuild/utils/newenvd +++ b/paludis/repositories/e/ebuild/utils/newenvd @@ -32,5 +32,12 @@ if [[ ${#} -ne 2 ]]; then fi rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}" -cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" + +if [[ ${1} == - && -n ${PALUDIS_NEW_STDIN} ]]; then + [[ -t 0 ]] && paludis_die_or_error "requires stdin input" + cat > "${!PALUDIS_TEMP_DIR_VAR}/${2}" +else + cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" +fi + doenvd "${!PALUDIS_TEMP_DIR_VAR}/${2}" diff --git a/paludis/repositories/e/ebuild/utils/newexe b/paludis/repositories/e/ebuild/utils/newexe index 236b48d87..40873858d 100755 --- a/paludis/repositories/e/ebuild/utils/newexe +++ b/paludis/repositories/e/ebuild/utils/newexe @@ -32,5 +32,12 @@ if [[ ${#} -ne 2 ]]; then fi rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}" -cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" + +if [[ ${1} == - && -n ${PALUDIS_NEW_STDIN} ]]; then + [[ -t 0 ]] && paludis_die_or_error "requires stdin input" + cat > "${!PALUDIS_TEMP_DIR_VAR}/${2}" +else + cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" +fi + doexe "${!PALUDIS_TEMP_DIR_VAR}/${2}" diff --git a/paludis/repositories/e/ebuild/utils/newinitd b/paludis/repositories/e/ebuild/utils/newinitd index a4b34a6f2..a97230fb2 100755 --- a/paludis/repositories/e/ebuild/utils/newinitd +++ b/paludis/repositories/e/ebuild/utils/newinitd @@ -32,5 +32,12 @@ if [[ ${#} -ne 2 ]]; then fi rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}" -cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" + +if [[ ${1} == - && -n ${PALUDIS_NEW_STDIN} ]]; then + [[ -t 0 ]] && paludis_die_or_error "requires stdin input" + cat > "${!PALUDIS_TEMP_DIR_VAR}/${2}" +else + cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" +fi + doinitd "${!PALUDIS_TEMP_DIR_VAR}/${2}" diff --git a/paludis/repositories/e/ebuild/utils/newins b/paludis/repositories/e/ebuild/utils/newins index cfa3b6ce8..6dca5784d 100755 --- a/paludis/repositories/e/ebuild/utils/newins +++ b/paludis/repositories/e/ebuild/utils/newins @@ -32,5 +32,12 @@ if [[ ${#} -ne 2 ]]; then fi rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}" -cp -P "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" + +if [[ ${1} == - && -n ${PALUDIS_NEW_STDIN} ]]; then + [[ -t 0 ]] && paludis_die_or_error "requires stdin input" + cat > "${!PALUDIS_TEMP_DIR_VAR}/${2}" +else + cp -P "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" +fi + doins "${!PALUDIS_TEMP_DIR_VAR}/${2}" diff --git a/paludis/repositories/e/ebuild/utils/newlib.a b/paludis/repositories/e/ebuild/utils/newlib.a index cb06edda9..e130000ae 100755 --- a/paludis/repositories/e/ebuild/utils/newlib.a +++ b/paludis/repositories/e/ebuild/utils/newlib.a @@ -32,5 +32,12 @@ if [[ ${#} -ne 2 ]]; then fi rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}" -cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" + +if [[ ${1} == - && -n ${PALUDIS_NEW_STDIN} ]]; then + [[ -t 0 ]] && paludis_die_or_error "requires stdin input" + cat > "${!PALUDIS_TEMP_DIR_VAR}/${2}" +else + cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" +fi + dolib.a "${!PALUDIS_TEMP_DIR_VAR}/${2}" diff --git a/paludis/repositories/e/ebuild/utils/newlib.so b/paludis/repositories/e/ebuild/utils/newlib.so index e01bc4ac4..03adba145 100755 --- a/paludis/repositories/e/ebuild/utils/newlib.so +++ b/paludis/repositories/e/ebuild/utils/newlib.so @@ -32,5 +32,12 @@ if [[ ${#} -ne 2 ]]; then fi rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}" -cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" + +if [[ ${1} == - && -n ${PALUDIS_NEW_STDIN} ]]; then + [[ -t 0 ]] && paludis_die_or_error "requires stdin input" + cat > "${!PALUDIS_TEMP_DIR_VAR}/${2}" +else + cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" +fi + dolib.so "${!PALUDIS_TEMP_DIR_VAR}/${2}" diff --git a/paludis/repositories/e/ebuild/utils/newman b/paludis/repositories/e/ebuild/utils/newman index 9318eee87..f9bc9bb6e 100755 --- a/paludis/repositories/e/ebuild/utils/newman +++ b/paludis/repositories/e/ebuild/utils/newman @@ -32,5 +32,12 @@ if [[ ${#} -ne 2 ]]; then fi rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}" -cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" + +if [[ ${1} == - && -n ${PALUDIS_NEW_STDIN} ]]; then + [[ -t 0 ]] && paludis_die_or_error "requires stdin input" + cat > "${!PALUDIS_TEMP_DIR_VAR}/${2}" +else + cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" +fi + doman "${!PALUDIS_TEMP_DIR_VAR}/${2}" diff --git a/paludis/repositories/e/ebuild/utils/newsbin b/paludis/repositories/e/ebuild/utils/newsbin index afa00441e..abf9ac148 100755 --- a/paludis/repositories/e/ebuild/utils/newsbin +++ b/paludis/repositories/e/ebuild/utils/newsbin @@ -32,5 +32,12 @@ if [[ ${#} -ne 2 ]]; then fi rm -rf "${!PALUDIS_TEMP_DIR_VAR}/${2}" -cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" + +if [[ ${1} == - && -n ${PALUDIS_NEW_STDIN} ]]; then + [[ -t 0 ]] && paludis_die_or_error "requires stdin input" + cat > "${!PALUDIS_TEMP_DIR_VAR}/${2}" +else + cp "${1}" "${!PALUDIS_TEMP_DIR_VAR}/${2}" +fi + dosbin "${!PALUDIS_TEMP_DIR_VAR}/${2}" |