aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Bo Ørsted Andresen <bo.andresen@zlin.dk> 2008-06-10 17:48:16 +0000
committerAvatar Bo Ørsted Andresen <bo.andresen@zlin.dk> 2008-06-10 17:48:16 +0000
commit52a5d9b789b0998cdd2009c08f0ff24710887be0 (patch)
treeb4a438535eb9f1b45e1874be91e80f0e9c5072d4
parent97a2f024cee04b28694739c276492c5fdf15d456 (diff)
downloadpaludis-52a5d9b789b0998cdd2009c08f0ff24710887be0.tar.gz
paludis-52a5d9b789b0998cdd2009c08f0ff24710887be0.tar.xz
Make failure in do* fatal and implement nonfatal in exheres-0.
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc324
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_setup.sh542
-rw-r--r--paludis/repositories/e/eapi.cc2
-rw-r--r--paludis/repositories/e/eapi.sr1
-rw-r--r--paludis/repositories/e/eapis/0.conf1
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf1
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf1
-rw-r--r--paludis/repositories/e/ebuild.cc2
-rw-r--r--paludis/repositories/e/ebuild/die_functions.bash35
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash3
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/build_functions.bash20
-rw-r--r--paludis/repositories/e/ebuild/install_functions.bash4
-rw-r--r--paludis/repositories/e/ebuild/utils/Makefile.am1
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dobin11
-rw-r--r--paludis/repositories/e/ebuild/utils/dobin_TEST.bash70
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doconfd6
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dodir6
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dodoc12
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doenvd4
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doexe16
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doinfo13
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doinitd5
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doins13
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dolib14
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doman10
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/domo11
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dosbin11
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dosym13
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/emake8
-rw-r--r--paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am3
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/exheres-0/dodoc64
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/exheres-0/nonfatal (renamed from paludis/repositories/e/ebuild/utils/exheres-0/emake)14
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/fowners4
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/fperms4
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newbin7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newconfd7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newdoc7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newenvd7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newexe7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newinitd7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newins7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newlib.a.in7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newlib.so.in7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newman7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newsbin7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/unpack5
-rw-r--r--paludis/repositories/e/ebuild/write_binary_ebuild.bash3
-rwxr-xr-xpaludis/repositories/e/ebuild/write_vdb_entry.bash3
48 files changed, 1059 insertions, 278 deletions
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 7937f3a..8e91ce3 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -1217,6 +1217,15 @@ namespace test_cases
}
{
+ TestMessageSuffix suffix("econf die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/econf-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
TestMessageSuffix suffix("emake fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/emake-fail",
@@ -1226,6 +1235,69 @@ namespace test_cases
}
{
+ TestMessageSuffix suffix("emake die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/emake-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("einstall die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/einstall-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("keepdir die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/keepdir-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("dobin fail", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/dobin-fail",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("dobin die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/dobin-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("fperms fail", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/fperms-fail",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("fperms die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/fperms-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
TestMessageSuffix suffix("econf source 0", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-0",
@@ -1576,6 +1648,42 @@ namespace test_cases
}
{
+ TestMessageSuffix suffix("expatch success", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/expatch-success",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("expatch die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/expatch-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal expatch fail", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-expatch-fail",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal expatch die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-expatch-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
TestMessageSuffix suffix("unpack die", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/unpack-die",
@@ -1585,6 +1693,51 @@ namespace test_cases
}
{
+ TestMessageSuffix suffix("nonfatal unpack fail", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-unpack-fail",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal unpack die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-unpack-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("econf fail", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/econf-fail",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal econf", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-econf",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal econf die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-econf-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
TestMessageSuffix suffix("emake fail", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/emake-fail",
@@ -1594,6 +1747,177 @@ namespace test_cases
}
{
+ TestMessageSuffix suffix("nonfatal emake", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-emake",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal emake die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-emake-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("einstall fail", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/einstall-fail",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal einstall", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-einstall",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal einstall die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-einstall-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("keepdir success", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/keepdir-success",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("keepdir fail", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/keepdir-fail",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal keepdir", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-keepdir",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal keepdir die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-keepdir-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("dobin success", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/dobin-success",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("dobin fail", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/dobin-fail",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal dobin success", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-dobin-success",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal dobin fail", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-dobin-fail",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal dobin die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-dobin-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("fperms success", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/fperms-success",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("fperms fail", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/fperms-fail",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal fperms success", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-fperms-success",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal fperms fail", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-fperms-fail",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("nonfatal fperms die", true);
+ const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-fperms-die",
+ UserPackageDepSpecOptions()))))]->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
TestMessageSuffix suffix("best version", true);
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/best-version-0",
diff --git a/paludis/repositories/e/e_repository_TEST_setup.sh b/paludis/repositories/e/e_repository_TEST_setup.sh
index 666c067..4438138 100755
--- a/paludis/repositories/e/e_repository_TEST_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_setup.sh
@@ -14,6 +14,14 @@ ln -s build symlinked_build
mkdir -p distdir
echo "already fetched" > distdir/already-fetched.txt || exit 1
+cat <<END > distdir/expatch-success-1.patch || exit 1
+--- a/bar
++++ b/bar
+@@ -1 +1,3 @@
+ foo
++bar
++baz
+END
mkdir -p fetchable
echo "one" > fetchable/fetchable-1.txt || exit 1
@@ -569,6 +577,20 @@ src_unpack() {
unpack ./f.bz2
}
END
+mkdir -p "cat/econf-die"
+cat <<END > cat/econf-die/econf-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_compile() {
+ econf
+}
+END
mkdir -p "cat/emake-fail"
cat <<END > cat/emake-fail/emake-fail-1.ebuild || exit 1
DESCRIPTION="The Description"
@@ -583,6 +605,106 @@ src_compile() {
emake monkey
}
END
+mkdir -p "cat/emake-die"
+cat <<END > cat/emake-die/emake-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_compile() {
+ emake monkey || die
+}
+END
+mkdir -p "cat/einstall-die"
+cat <<END > cat/einstall-die/einstall-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_install() {
+ einstall
+}
+END
+mkdir -p "cat/keepdir-die"
+cat <<"END" > cat/keepdir-die/keepdir-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_install() {
+ dodir /usr/share
+ touch "${D}"/usr/share/monkey
+ keepdir /usr/share/monkey
+}
+END
+mkdir -p "cat/dobin-fail"
+cat <<END > cat/dobin-fail/dobin-fail-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_install() {
+ dobin monkey
+}
+END
+mkdir -p "cat/dobin-die"
+cat <<END > cat/dobin-die/dobin-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_install() {
+ dobin monkey || die
+}
+END
+mkdir -p "cat/fperms-fail"
+cat <<END > cat/fperms-fail/fperms-fail-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_install() {
+ fperms 755 monkey
+}
+END
+mkdir -p "cat/fperms-die"
+cat <<END > cat/fperms-die/fperms-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_install() {
+ fperms 755 monkey || die
+}
+END
mkdir -p "cat/pretend-installed"
cat <<END > cat/pretend-installed/pretend-installed-2.ebuild || exit 1
DESCRIPTION="The Description"
@@ -937,6 +1059,66 @@ pkg_setup() {
optionq spork && die "boom"
}
END
+mkdir -p "packages/cat/expatch-success"
+cat <<"END" > packages/cat/expatch-success/expatch-success-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_unpack() {
+ echo foo > bar
+}
+
+src_prepare() {
+ expatch "${FETCHEDDIR}"/${P}.patch
+}
+END
+mkdir -p "packages/cat/expatch-die"
+cat <<END > packages/cat/expatch-die/expatch-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_prepare() {
+ expatch monkey.patch
+}
+END
+mkdir -p "packages/cat/nonfatal-expatch-fail"
+cat <<END > packages/cat/nonfatal-expatch-fail/nonfatal-expatch-fail-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_prepare() {
+ nonfatal expatch monkey.patch
+}
+END
+mkdir -p "packages/cat/nonfatal-expatch-die"
+cat <<END > packages/cat/nonfatal-expatch-die/nonfatal-expatch-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_prepare() {
+ nonfatal expatch monkey.patch || die
+}
+END
mkdir -p "packages/cat/unpack-die"
cat <<END > packages/cat/unpack-die/unpack-die-1.ebuild || exit 1
DESCRIPTION="The Description"
@@ -952,6 +1134,78 @@ src_unpack() {
unpack ./f.bz2
}
END
+mkdir -p "packages/cat/nonfatal-unpack-fail"
+cat <<END > packages/cat/nonfatal-unpack-fail/nonfatal-unpack-fail-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_unpack() {
+ echo "123" > f.bz2
+ nonfatal unpack ./f.bz2
+}
+END
+mkdir -p "packages/cat/nonfatal-unpack-die"
+cat <<END > packages/cat/nonfatal-unpack-die/nonfatal-unpack-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_unpack() {
+ echo "123" > f.bz2
+ nonfatal unpack ./f.bz2 || die
+}
+END
+mkdir -p "packages/cat/econf-fail"
+cat <<END > packages/cat/econf-fail/econf-fail-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_configure() {
+ econf
+}
+END
+mkdir -p "packages/cat/nonfatal-econf"
+cat <<END > packages/cat/nonfatal-econf/nonfatal-econf-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_configure() {
+ nonfatal econf
+}
+END
+mkdir -p "packages/cat/nonfatal-econf-die"
+cat <<END > packages/cat/nonfatal-econf-die/nonfatal-econf-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_configure() {
+ nonfatal econf || die
+}
+END
mkdir -p "packages/cat/emake-fail"
cat <<END > packages/cat/emake-fail/emake-fail-1.ebuild || exit 1
DESCRIPTION="The Description"
@@ -966,6 +1220,294 @@ src_compile() {
emake monkey
}
END
+mkdir -p "packages/cat/nonfatal-emake"
+cat <<END > packages/cat/nonfatal-emake/nonfatal-emake-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_compile() {
+ nonfatal emake monkey
+}
+END
+mkdir -p "packages/cat/nonfatal-emake-die"
+cat <<END > packages/cat/nonfatal-emake-die/nonfatal-emake-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_compile() {
+ nonfatal emake monkey || die
+}
+END
+mkdir -p "packages/cat/keepdir-success"
+cat <<END > packages/cat/keepdir-success/keepdir-success-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_install() {
+ keepdir /usr/share/monkey
+}
+END
+mkdir -p "packages/cat/keepdir-fail"
+cat <<"END" > packages/cat/keepdir-fail/keepdir-fail-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_install() {
+ dodir /usr/share
+ touch "${D}"/usr/share/monkey
+ keepdir /usr/share/monkey
+}
+END
+mkdir -p "packages/cat/nonfatal-keepdir"
+cat <<"END" > packages/cat/nonfatal-keepdir/nonfatal-keepdir-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_install() {
+ dodir /usr/share
+ touch "${D}"/usr/share/monkey
+ nonfatal keepdir /usr/share/monkey
+}
+END
+mkdir -p "packages/cat/nonfatal-keepdir-die"
+cat <<"END" > packages/cat/nonfatal-keepdir-die/nonfatal-keepdir-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_install() {
+ dodir /usr/share
+ touch "${D}"/usr/share/monkey
+ nonfatal keepdir /usr/share/monkey || die
+}
+END
+mkdir -p "packages/cat/einstall-fail"
+cat <<END > packages/cat/einstall-fail/einstall-fail-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_install() {
+ einstall
+}
+END
+mkdir -p "packages/cat/nonfatal-einstall"
+cat <<END > packages/cat/nonfatal-einstall/nonfatal-einstall-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_install() {
+ nonfatal einstall
+}
+END
+mkdir -p "packages/cat/nonfatal-einstall-die"
+cat <<END > packages/cat/nonfatal-einstall-die/nonfatal-einstall-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_install() {
+ nonfatal einstall || die
+}
+END
+mkdir -p "packages/cat/dobin-success"
+cat <<END > packages/cat/dobin-success/dobin-success-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_compile() {
+ touch foo
+}
+
+src_install() {
+ dobin foo
+}
+END
+mkdir -p "packages/cat/dobin-fail"
+cat <<END > packages/cat/dobin-fail/dobin-fail-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_install() {
+ dobin monkey
+}
+END
+mkdir -p "packages/cat/nonfatal-dobin-success"
+cat <<END > packages/cat/nonfatal-dobin-success/nonfatal-dobin-success-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_compile() {
+ touch foo
+}
+
+src_install() {
+ nonfatal dobin foo || die
+}
+END
+mkdir -p "packages/cat/nonfatal-dobin-fail"
+cat <<END > packages/cat/nonfatal-dobin-fail/nonfatal-dobin-fail-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_install() {
+ nonfatal dobin monkey
+}
+END
+mkdir -p "packages/cat/nonfatal-dobin-die"
+cat <<END > packages/cat/nonfatal-dobin-die/nonfatal-dobin-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_install() {
+ nonfatal dobin monkey || die
+}
+END
+mkdir -p "packages/cat/fperms-success"
+cat <<END > packages/cat/fperms-success/fperms-success-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_compile() {
+ touch foo
+}
+
+src_install() {
+ fperms 755 foo
+}
+END
+mkdir -p "packages/cat/fperms-fail"
+cat <<END > packages/cat/fperms-fail/fperms-fail-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_install() {
+ fperms 755 monkey
+}
+END
+mkdir -p "packages/cat/nonfatal-fperms-success"
+cat <<END > packages/cat/nonfatal-fperms-success/nonfatal-fperms-success-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_compile() {
+ touch foo
+}
+
+src_install() {
+ nonfatal fperms 755 foo || die
+}
+END
+mkdir -p "packages/cat/nonfatal-fperms-fail"
+cat <<END > packages/cat/nonfatal-fperms-fail/nonfatal-fperms-fail-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_install() {
+ nonfatal fperms 755 monkey
+}
+END
+mkdir -p "packages/cat/nonfatal-fperms-die"
+cat <<END > packages/cat/nonfatal-fperms-die/nonfatal-fperms-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_install() {
+ nonfatal fperms 755 monkey || die
+}
+END
mkdir -p "packages/cat/best-version"
cat <<'END' > packages/cat/best-version/best-version-0.ebuild || exit 1
DESCRIPTION="The Description"
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index ffe2b6b..aa85dd5 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -254,6 +254,8 @@ namespace paludis
k.get("unpack_fix_permissions")))
.dosym_mkdir(destringify<bool>(
k.get("dosym_mkdir")))
+ .failure_is_fatal(destringify<bool>(
+ k.get("failure_is_fatal")))
))
))));
diff --git a/paludis/repositories/e/eapi.sr b/paludis/repositories/e/eapi.sr
index 475d487..cefc6da 100644
--- a/paludis/repositories/e/eapi.sr
+++ b/paludis/repositories/e/eapi.sr
@@ -106,6 +106,7 @@ make_class_EAPIToolsOptions()
key unpack_unrecognised_is_fatal bool
key unpack_fix_permissions bool
key dosym_mkdir bool
+ key failure_is_fatal bool
doxygen_comment << "END"
/**
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index 0188973..ecae3c3 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -198,4 +198,5 @@ pipe_commands_no_slot_or_repo = true
unpack_unrecognised_is_fatal = false
unpack_fix_permissions = true
dosym_mkdir = true
+failure_is_fatal = false
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index bf14317..bb75015 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -225,4 +225,5 @@ pipe_commands_no_slot_or_repo = false
unpack_unrecognised_is_fatal = true
unpack_fix_permissions = false
dosym_mkdir = false
+failure_is_fatal = true
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index 6015126..f5d34f5 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -217,4 +217,5 @@ pipe_commands_no_slot_or_repo = true
unpack_unrecognised_is_fatal = false
unpack_fix_permissions = false
dosym_mkdir = false
+failure_is_fatal = false
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 0c85ca1..229fb1a 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -179,6 +179,8 @@ EbuildCommand::operator() ()
(*(*params[k::package_id()]->eapi())[k::supported()])[k::tools_options()].unpack_fix_permissions ? "yes" : "")
.with_setenv("PALUDIS_DOSYM_NO_MKDIR",
(*(*params[k::package_id()]->eapi())[k::supported()])[k::tools_options()].dosym_mkdir ? "" : "yes")
+ .with_setenv("PALUDIS_FAILURE_IS_FATAL",
+ (*(*params[k::package_id()]->eapi())[k::supported()])[k::tools_options()].failure_is_fatal ? "yes" : "")
.with_setenv("PALUDIS_UNPACK_FROM_VAR",
(*(*params[k::package_id()]->eapi())[k::supported()])[k::ebuild_environment_variables()][k::env_distdir()])
.with_setenv("PALUDIS_PIPE_COMMANDS_SUPPORTED", "yes")
diff --git a/paludis/repositories/e/ebuild/die_functions.bash b/paludis/repositories/e/ebuild/die_functions.bash
index f5ab4a5..1a46bbc 100644
--- a/paludis/repositories/e/ebuild/die_functions.bash
+++ b/paludis/repositories/e/ebuild/die_functions.bash
@@ -20,11 +20,16 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-export EBUILD_KILL_PID=$$
-declare -r EBUILD_KILL_PID
+shopt -s expand_aliases
+
+alias die='diefunc "${FUNCNAME:-$0}" "$LINENO"'
+alias assert='_pipestatus="${PIPESTATUS[*]}"; [[ -z "${_pipestatus//[ 0]/}" ]] || diefunc "${FUNCNAME:-$0}" "$LINENO" "$_pipestatus"'
+# paludis_die_or_error is only for use in scripts
+alias paludis_die_or_error='paludis_die_or_error_func "$0" "$LINENO"'
+# paludis_die_unless_nonfatal and paludis_assert_unless_nonfatal are only for use in shell functions
+alias paludis_die_unless_nonfatal='paludis_die_unless_nonfatal_func "$FUNCNAME" "$LINENO"'
+alias paludis_assert_unless_nonfatal='_pipestatus="${PIPESTATUS[*]}"; [[ -z "${_pipestatus//[ 0]/}" ]] || paludis_die_unless_nonfatal_func "$FUNCNAME" "$LINENO" "$_pipestatus"'
-alias die='diefunc "$FUNCNAME" "$LINENO"'
-alias assert='_pipestatus="${PIPESTATUS[*]}"; [[ -z "${_pipestatus//[ 0]/}" ]] || diefunc "$FUNCNAME" "$LINENO" "$_pipestatus"'
trap 'echo "die trap: exiting with error." 1>&2 ; exit 250' SIGUSR1
diefunc()
@@ -56,4 +61,26 @@ diefunc()
exit 249
}
+paludis_die_or_error_func()
+{
+ if [[ -n ${PALUDIS_FAILURE_IS_FATAL} ]]; then
+ diefunc "$@"
+ else
+ local func=${1}
+ shift 2
+ echo "${func}: $*" >&2
+ exit 247
+ fi
+}
+paludis_die_unless_nonfatal_func()
+{
+ if [[ -z ${PALUDIS_FAILURE_IS_NONFATAL} ]]; then
+ diefunc "$@"
+ else
+ local func=${1}
+ shift 2
+ echo "${func}: $*" >&2
+ return 247
+ fi
+}
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index 493f2f3..88f3d01 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -85,6 +85,9 @@ EBUILD_MODULES_DIRS="${EBUILD_MODULES_DIRS} ${EBUILD_MODULES_DIR}"
export PALUDIS_EBUILD_MODULES_DIR="${EBUILD_MODULES_DIR}"
+export EBUILD_KILL_PID=$$
+declare -r EBUILD_KILL_PID
+
ebuild_load_module()
{
local t= d=
diff --git a/paludis/repositories/e/ebuild/exheres-0/build_functions.bash b/paludis/repositories/e/ebuild/exheres-0/build_functions.bash
index 783a748..f0b1d23 100644
--- a/paludis/repositories/e/ebuild/exheres-0/build_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/build_functions.bash
@@ -2,6 +2,7 @@
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+# Copyright (c) 2008 Bo Ørsted Andresen
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -20,6 +21,11 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+nonfatal()
+{
+ PALUDIS_FAILURE_IS_FATAL= PALUDIS_FAILURE_IS_NONFATAL=yes "${@}"
+}
+
expatch()
{
if [[ "${EBUILD_PHASE}" != "prepare" ]] ; then
@@ -39,7 +45,7 @@ expatch()
elif [[ ${1} == -+([^[:space:]]) ]]; then
options+=("${1}")
elif [[ -d ${1} ]]; then
- expatch --recognised-suffixes ${patchlevel} "${options[@]}" "${1}"/*
+ expatch --recognised-suffixes ${patchlevel} "${options[@]}" "${1}"/* || return 247
((appliedpatches++))
else
case "${1}" in
@@ -66,7 +72,7 @@ expatch()
echo "${cmd} -- '${1}' | patch -s -f ${patchlevel:--p1} ${options[@]}" 1>&2
${cmd} -- "${1}" | patch -s -f ${patchlevel:--p1} "${options[@]}"
- assert "applying '${1}' failed"
+ paludis_assert_unless_nonfatal "applying '${1}' failed" || return 247
((appliedpatches++))
fi
shift
@@ -74,7 +80,7 @@ expatch()
# Die if no patches were applied and no directories were supplied. Since
# directories get handled recursively by separate instances of expatch we cannot
# reliably count applied patches when directories were supplied.
- [[ ${appliedpatches} -gt 0 || -n ${recognise} ]] || die "No patches applied."
+ [[ ${appliedpatches} -gt 0 || -n ${recognise} ]] || paludis_die_unless_nonfatal "No patches applied." || return 247
}
econf()
@@ -137,10 +143,10 @@ econf()
--datadir=/usr/share \
--sysconfdir=/etc \
--localstatedir=/var/lib \
- ${libcmd} "$@" ${LOCAL_EXTRA_ECONF} || die "econf failed"
+ ${libcmd} "$@" ${LOCAL_EXTRA_ECONF} || paludis_die_unless_nonfatal "econf failed" || return 247
else
- die "No configure script for econf"
+ paludis_die_unless_nonfatal "No configure script for econf" || return 247
fi
}
@@ -162,9 +168,9 @@ einstall()
cmd="${cmd} libdir=${D}/usr/$(ebuild_get_libdir)"
cmd="${cmd} ${EXTRA_EINSTALL} ${@} install"
echo "${cmd}" 1>&2
- ${cmd} || die "einstall failed"
+ ${cmd} || paludis_die_unless_nonfatal "einstall failed" || return 247
else
- die "No Makefile for einstall"
+ paludis_die_unless_nonfatal "No Makefile for einstall" || return 247
fi
}
diff --git a/paludis/repositories/e/ebuild/install_functions.bash b/paludis/repositories/e/ebuild/install_functions.bash
index 7adc193..3c836db 100644
--- a/paludis/repositories/e/ebuild/install_functions.bash
+++ b/paludis/repositories/e/ebuild/install_functions.bash
@@ -37,11 +37,11 @@ keepdir()
if [[ "${1}" == "-R" ]] || [[ "${1}" == "-r" ]] ; then
shift
find "$@" -type d -printf "${D}/%p/.keep_${CATEGORY}_${PN}-${SLOT}\0" | xargs -0 touch
- assert "Failed to create .keep_${CATEGORY}_${PN}-${SLOT} files"
+ paludis_assert_unless_nonfatal "Failed to create .keep_${CATEGORY}_${PN}-${SLOT} files" || return 247
else
local f
for f in "$@" ; do
- touch "${D}/${f}/.keep_${CATEGORY}_${PN}-${SLOT}" || die "Couldn't touch .keep_${CATEGORY}_${PN}-${SLOT} in ${f}"
+ touch "${D}/${f}/.keep_${CATEGORY}_${PN}-${SLOT}" || paludis_die_unless_nonfatal "Couldn't touch .keep_${CATEGORY}_${PN}-${SLOT} in ${f}" || return 247
done
fi
}
diff --git a/paludis/repositories/e/ebuild/utils/Makefile.am b/paludis/repositories/e/ebuild/utils/Makefile.am
index 74ac3fb..d89c79c 100644
--- a/paludis/repositories/e/ebuild/utils/Makefile.am
+++ b/paludis/repositories/e/ebuild/utils/Makefile.am
@@ -81,7 +81,6 @@ TESTS_ENVIRONMENT = env \
bash $(top_srcdir)/paludis/repositories/e/ebuild/utils/run_test.bash
TESTS = \
- dobin_TEST.bash \
wrapped_getfsize_TEST.bash \
sed_TEST.bash \
awk_TEST.bash \
diff --git a/paludis/repositories/e/ebuild/utils/dobin b/paludis/repositories/e/ebuild/utils/dobin
index c7901b5..34cbd3a 100755
--- a/paludis/repositories/e/ebuild/utils/dobin
+++ b/paludis/repositories/e/ebuild/utils/dobin
@@ -21,18 +21,18 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting" >&2
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed" >&2
fi
if [[ ! -d "${D}${DESTTREE}/bin" ]]; then
- install -d "${D}${DESTTREE}/bin" || exit 3
+ install -d "${D}${DESTTREE}/bin" || paludis_die_or_error "${D}${DESTTREE}/bin is not a dir"
fi
ret=0
@@ -44,4 +44,5 @@ for x in "$@" ; do
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "dobin returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/dobin_TEST.bash b/paludis/repositories/e/ebuild/utils/dobin_TEST.bash
deleted file mode 100644
index 4f10e4d..0000000
--- a/paludis/repositories/e/ebuild/utils/dobin_TEST.bash
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/bash
-# vim: set sw=4 sts=4 et :
-
-# Copyright (c) 2006 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
-
-source ${PALUDIS_EBUILD_DIR}/install_functions.bash
-
-dobin_TEST()
-{
- mkdir -p dobin_TEST_dir/src dobin_TEST_dir/dst ; test_return_code
-
- echo "one contents" > dobin_TEST_dir/src/one ; test_return_code
- chmod +x dobin_TEST_dir/src/one ; test_return_code
-
- echo "two contents" > dobin_TEST_dir/src/two ; test_return_code
- chmod +x dobin_TEST_dir/src/two ; test_return_code
-
- echo "three contents" > dobin_TEST_dir/src/three ; test_return_code
- chmod +x dobin_TEST_dir/src/three ; test_return_code
-
- export D=dobin_TEST_dir/dst
- ${PALUDIS_EBUILD_DIR}/utils/dobin dobin_TEST_dir/src/one &>/dev/null ; test_return_code
- ${PALUDIS_EBUILD_DIR}/utils/dobin dobin_TEST_dir/src/two dobin_TEST_dir/src/three &>/dev/null ; test_return_code
-
- [[ -f dobin_TEST_dir/dst/usr/bin/one ]] ; test_return_code
- [[ -f dobin_TEST_dir/dst/usr/bin/two ]] ; test_return_code
- [[ -f dobin_TEST_dir/dst/usr/bin/three ]] ; test_return_code
-
- test_equality "$(< dobin_TEST_dir/dst/usr/bin/one)" "one contents"
- test_equality "$(< dobin_TEST_dir/dst/usr/bin/two)" "two contents"
- test_equality "$(< dobin_TEST_dir/dst/usr/bin/three)" "three contents"
-
- rm -fr dobin_TEST_dir
-}
-
-dobin_fail_TEST()
-{
- mkdir -p dobin_TEST_dir/src dobin_TEST_dir/dst ; test_return_code
- echo "one contents" > dobin_TEST_dir/src/one ; test_return_code
- echo "two contents" > dobin_TEST_dir/src/two ; test_return_code
- echo "three contents" > dobin_TEST_dir/src/three ; test_return_code
-
- export D=dobin_TEST_dir/dst
- ! ${PALUDIS_EBUILD_DIR}/utils/dobin dobin_TEST_dir/src/four &>/dev/null ; test_return_code
- ! ${PALUDIS_EBUILD_DIR}/utils/dobin dobin_TEST_dir/src/one dobin_TEST_dir/src/seven &>/dev/null ; test_return_code
- ! ${PALUDIS_EBUILD_DIR}/utils/dobin dobin_TEST_dir/src/eight dobin_TEST_dir/src/one &>/dev/null ; test_return_code
-
- [[ -f dobin_TEST_dir/dst/usr/bin/one ]] ; test_return_code
- ! [[ -f dobin_TEST_dir/dst/usr/bin/four ]] ; test_return_code
- ! [[ -f dobin_TEST_dir/dst/usr/bin/five ]] ; test_return_code
- ! [[ -f dobin_TEST_dir/dst/usr/bin/six ]] ; test_return_code
-
- test_equality "$(< dobin_TEST_dir/dst/usr/bin/one)" "one contents"
-
- rm -fr dobin_TEST_dir
-}
-
diff --git a/paludis/repositories/e/ebuild/utils/doconfd b/paludis/repositories/e/ebuild/utils/doconfd
index 75479b7..a46e8be 100755
--- a/paludis/repositories/e/ebuild/utils/doconfd
+++ b/paludis/repositories/e/ebuild/utils/doconfd
@@ -21,11 +21,11 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
-if [ ${#} -lt 1 ]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+if [[ ${#} -lt 1 ]]; then
+ paludis_die_or_error "at least one argument needed"
fi
INSDESTTREE=/etc/conf.d/
diff --git a/paludis/repositories/e/ebuild/utils/dodir b/paludis/repositories/e/ebuild/utils/dodir
index 79c6254..fca8d9a 100755
--- a/paludis/repositories/e/ebuild/utils/dodir
+++ b/paludis/repositories/e/ebuild/utils/dodir
@@ -21,9 +21,10 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
ret=0
@@ -31,4 +32,5 @@ for x in "$@"; do
install -d ${DIROPTIONS} "${D}${x}" || ret=2
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "dodir returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/dodoc b/paludis/repositories/e/ebuild/utils/dodoc
index 6a54006..37b7fd2 100755
--- a/paludis/repositories/e/ebuild/utils/dodoc
+++ b/paludis/repositories/e/ebuild/utils/dodoc
@@ -2,6 +2,7 @@
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
+# Copyright (c) 2007 Ciaran McCreesh
#
# Based in part upon dodoc from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -21,19 +22,19 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ $# -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
dir="${D}usr/share/doc/${PF}/${DOCDESTTREE}"
if [[ ! -d "${dir}" ]]; then
- install -d "${dir}" || exit 3
+ install -d "${dir}" || paludis_die_or_error "could not create ${dir}"
fi
ret=0
@@ -47,4 +48,5 @@ for x in "$@"; do
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "dodoc returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/doenvd b/paludis/repositories/e/ebuild/utils/doenvd
index 427fdeb..91d2677 100755
--- a/paludis/repositories/e/ebuild/utils/doenvd
+++ b/paludis/repositories/e/ebuild/utils/doenvd
@@ -21,11 +21,11 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
export INSDESTTREE=/etc/env.d/
diff --git a/paludis/repositories/e/ebuild/utils/doexe b/paludis/repositories/e/ebuild/utils/doexe
index 61189fb..e3f3207 100755
--- a/paludis/repositories/e/ebuild/utils/doexe
+++ b/paludis/repositories/e/ebuild/utils/doexe
@@ -21,23 +21,24 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed"
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
if [[ ! -d "${D}${EXEDESTTREE}" ]]; then
- install -d "${D}${EXEDESTTREE}" || exit 3
+ if ! install -d "${D}${EXEDESTTREE}" ; then
+ paludis_die_or_error "could not create ${D}${EXEDESTTREE}"
+ fi
fi
ret=0
@@ -55,4 +56,5 @@ for x in "$@"; do
install ${EXEOPTIONS} "${mysrc}" "${D}${EXEDESTTREE}" || ret=2
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "doexe returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/doinfo b/paludis/repositories/e/ebuild/utils/doinfo
index 6072379..223f61e 100755
--- a/paludis/repositories/e/ebuild/utils/doinfo
+++ b/paludis/repositories/e/ebuild/utils/doinfo
@@ -21,30 +21,31 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 1
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
if [[ ! -d "${D}usr/share/info" ]]; then
- install -d "${D}usr/share/info" || exit 3
+ install -d "${D}usr/share/info" || paludis_die_or_error "could not create ${D}usr/share/info"
fi
ret=0
for x in "$@"; do
if [[ -e "${x}" ]]; then
- install -m0644 "${x}" "${D}usr/share/info"
+ install -m0644 "${x}" "${D}usr/share/info" || ret=2
else
echo "${0}: ${x} does not exist"
ret=2
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "doinfo returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/doinitd b/paludis/repositories/e/ebuild/utils/doinitd
index 85a3e06..3e9904d 100755
--- a/paludis/repositories/e/ebuild/utils/doinitd
+++ b/paludis/repositories/e/ebuild/utils/doinitd
@@ -21,11 +21,12 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
EXEDESTTREE=/etc/init.d
diff --git a/paludis/repositories/e/ebuild/utils/doins b/paludis/repositories/e/ebuild/utils/doins
index b37099e..6de34f8 100755
--- a/paludis/repositories/e/ebuild/utils/doins
+++ b/paludis/repositories/e/ebuild/utils/doins
@@ -22,20 +22,18 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
if [[ ${1} == "-r" ]]; then
@@ -54,7 +52,7 @@ if [[ ${INSDESTTREE} == ${D}* ]]; then
echo "You should not use \${D} with helpers." >&2
echo " --> ${INSDESTTREE}" >&2
echo "-------------------------------------------------------" >&2
- exit 248
+ paludis_die_or_error
fi
if [[ ! -d "${D}${INSDESTTREE}" ]]; then
@@ -86,4 +84,5 @@ for x in "$@"; do
install ${INSOPTIONS} "${mysrc}" "${D}${INSDESTTREE}" || ret=2
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "doins returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/dolib b/paludis/repositories/e/ebuild/utils/dolib
index d636764..0fed548 100755
--- a/paludis/repositories/e/ebuild/utils/dolib
+++ b/paludis/repositories/e/ebuild/utils/dolib
@@ -21,14 +21,14 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ! -d ${PALUDIS_EBUILD_MODULES_DIR} ]]; then
- echo "${0}: \${PALUDIS_EBUILD_MODULES_DIR} not valid; aborting" >&2
- exit 1
+ paludis_die_or_error "\${PALUDIS_EBUILD_MODULES_DIR} not valid; aborting"
fi
source "${PALUDIS_EBUILD_MODULES_DIR}/multilib_functions.bash"
@@ -36,12 +36,11 @@ source "${PALUDIS_EBUILD_MODULES_DIR}/multilib_functions.bash"
libdir="${D}${DESTTREE}/$(ebuild_get_libdir)"
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed"
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
if [[ ! -d ${libdir} ]]; then
- install -d "${libdir}" || exit 3
+ install -d "${libdir}" || paludis_die_or_error "could not create ${libdir}"
fi
ret=0
@@ -59,4 +58,5 @@ for x in "$@"; do
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "dolib returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/doman b/paludis/repositories/e/ebuild/utils/doman
index 20fc7a2..18e46d3 100755
--- a/paludis/repositories/e/ebuild/utils/doman
+++ b/paludis/repositories/e/ebuild/utils/doman
@@ -21,18 +21,19 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
BASE="/usr/share"
i18n=""
+ret=0
for x in "$@"; do
if [[ ${x:0:6} == "-i18n=" ]]; then
@@ -72,4 +73,5 @@ for x in "$@"; do
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "doman returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/domo b/paludis/repositories/e/ebuild/utils/domo
index 1a1747a..fe3d57c 100755
--- a/paludis/repositories/e/ebuild/utils/domo
+++ b/paludis/repositories/e/ebuild/utils/domo
@@ -21,18 +21,18 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
if [[ ! -d "${D}${DESTTREE}/share/locale" ]]; then
- install -d "${D}${DESTTREE}/share/locale" || exit 3
+ install -d "${D}${DESTTREE}/share/locale" || paludis_die_or_error "could not create ${D}${DESTTREE}/share/locale"
fi
ret=0
@@ -51,4 +51,5 @@ for x in "$@"; do
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "domo returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/dosbin b/paludis/repositories/e/ebuild/utils/dosbin
index c72d9c5..3ce589c 100755
--- a/paludis/repositories/e/ebuild/utils/dosbin
+++ b/paludis/repositories/e/ebuild/utils/dosbin
@@ -21,18 +21,18 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
if [[ ! -d "${D}${DESTTREE}/sbin" ]]; then
- install -d "${D}${DESTTREE}/sbin" || exit 3
+ install -d "${D}${DESTTREE}/sbin" || paludis_die_or_error "could not create ${D}${DESTTREE}/sbin"
fi
ret=0
@@ -44,4 +44,5 @@ for x in "$@"; do
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "dosbin returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/dosym b/paludis/repositories/e/ebuild/utils/dosym
index e1cbcea..5ffb7bb 100755
--- a/paludis/repositories/e/ebuild/utils/dosym
+++ b/paludis/repositories/e/ebuild/utils/dosym
@@ -22,28 +22,25 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source ${PALUDIS_EBUILD_DIR}/die_functions.bash
source ${PALUDIS_EBUILD_DIR}/pipe_functions.bash
source ${PALUDIS_EBUILD_DIR}/output_functions.bash
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed."
fi
if [[ ! -d $(dirname "${D}$2") ]]; then
if [[ -n "${PALUDIS_DOSYM_NO_MKDIR}" ]] ; then
- echo "dosym: error: target directory $(dirname "${D}$2" ) does not exist" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
- exit 123
+ die "error: target directory $(dirname "${D}$2" ) does not exist"
else
ebuild_notice "qa" "$0: target directory $(dirname "${D}$2") does not exist; creating. Please fix the ebuild to create it explicitly."
dodir $(dirname $2)
fi
fi
-ln -snf "${1}" "${D}${2}"
+ln -snf "${1}" "${D}${2}" || paludis_die_or_error "creation of symlink ${D}${2} failed"
diff --git a/paludis/repositories/e/ebuild/utils/emake b/paludis/repositories/e/ebuild/utils/emake
index f6fa8ca..55e0d2c 100755
--- a/paludis/repositories/e/ebuild/utils/emake
+++ b/paludis/repositories/e/ebuild/utils/emake
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006 Ciaran McCreesh
+# Copyright (c) 2006, 2007 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
@@ -17,6 +17,10 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
echo ${EMAKE_WRAPPER} ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@" 1>&2
${EMAKE_WRAPPER} ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@"
-
+ret=$?
+[[ 0 != $ret ]] && paludis_die_or_error "emake returned error $ret"
+exit $ret
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am b/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
index 48f4dc6..2d2d71c 100644
--- a/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
@@ -4,11 +4,11 @@ SUBDIRS = .
libexecprogdir = $(libexecdir)/paludis/utils/exheres-0
libexecprog_SCRIPTS = \
- dodoc \
dohard \
dohtml \
dosed \
donewins \
+ nonfatal \
prepall \
prepallstrip \
prepstrip \
@@ -20,7 +20,6 @@ libexecprog_SCRIPTS = \
prepalldocs \
ecompress \
ecompressdir \
- emake \
banned_in_eapi_exheres-0
AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/dodoc b/paludis/repositories/e/ebuild/utils/exheres-0/dodoc
deleted file mode 100755
index e53e0bb..0000000
--- a/paludis/repositories/e/ebuild/utils/exheres-0/dodoc
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/bash
-# vim: set sw=4 sts=4 et :
-
-# Copyright (c) 2006 Stephen Bennett
-# Copyright (c) 2007 Ciaran McCreesh
-#
-# Based in part upon dodoc from Portage, which is Copyright 1995-2005
-# Gentoo Foundation and distributed under the terms of the GNU General
-# Public License v2.
-#
-# 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 as published by the Free Software Foundation; either version
-# 2 of the License, or (at your option) any later version.
-#
-# 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
-
-if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
- exit 247
-fi
-
-if [[ $# -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
- exit 1
-fi
-
-dir="${D}usr/share/doc/${PF}/${DOCDESTTREE}"
-if [[ ! -d "${dir}" ]]; then
- if ! install -d "${dir}" ; then
- echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
- exit 3
- fi
-fi
-
-ret=0
-
-for x in "$@"; do
- if [[ -s "${x}" ]]; then
- install -m0644 "${x}" "${dir}"
- elif [[ ! -e "${x}" ]]; then
- echo "${0}: ${x} does not exist" >&2
- ret=2
- fi
-done
-
-if [[ 0 != "${ret}" ]] ; then
- echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
-fi
-exit ${ret}
-
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/emake b/paludis/repositories/e/ebuild/utils/exheres-0/nonfatal
index b092f7f..28167cb 100755
--- a/paludis/repositories/e/ebuild/utils/exheres-0/emake
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/nonfatal
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006, 2007 Ciaran McCreesh
+# Copyright (c) 2008 Bo Ørsted Andresen
#
# 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
@@ -17,13 +17,5 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-echo ${EMAKE_WRAPPER} ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@" 1>&2
-${EMAKE_WRAPPER} ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@"
-ret=$?
-if [[ 0 != $ret ]] ; then
- echo "emake returned error $ret" 1>&2
- echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
-fi
-
-exit $ret
+export PALUDIS_FAILURE_IS_FATAL= PALUDIS_FAILURE_IS_NONFATAL=yes
+exec "${@}"
diff --git a/paludis/repositories/e/ebuild/utils/fowners b/paludis/repositories/e/ebuild/utils/fowners
index b0b3af1..7f450a2 100755
--- a/paludis/repositories/e/ebuild/utils/fowners
+++ b/paludis/repositories/e/ebuild/utils/fowners
@@ -21,4 +21,6 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-chown "${@/#\//${D}/}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
+chown "${@/#\//${D}/}" || paludis_die_or_error "chown returned error $?"
diff --git a/paludis/repositories/e/ebuild/utils/fperms b/paludis/repositories/e/ebuild/utils/fperms
index 4b94e4e..0722704 100755
--- a/paludis/repositories/e/ebuild/utils/fperms
+++ b/paludis/repositories/e/ebuild/utils/fperms
@@ -21,4 +21,6 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-chmod "${@/#\//${D}/}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
+chmod "${@/#\//${D}/}" || paludis_die_or_error "chmod returned error $?"
diff --git a/paludis/repositories/e/ebuild/utils/newbin b/paludis/repositories/e/ebuild/utils/newbin
index aa5ae16..78e9741 100755
--- a/paludis/repositories/e/ebuild/utils/newbin
+++ b/paludis/repositories/e/ebuild/utils/newbin
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed."
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newconfd b/paludis/repositories/e/ebuild/utils/newconfd
index 4270bc5..7ddb13f 100755
--- a/paludis/repositories/e/ebuild/utils/newconfd
+++ b/paludis/repositories/e/ebuild/utils/newconfd
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed."
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newdoc b/paludis/repositories/e/ebuild/utils/newdoc
index 167efa8..694e3b6 100755
--- a/paludis/repositories/e/ebuild/utils/newdoc
+++ b/paludis/repositories/e/ebuild/utils/newdoc
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newenvd b/paludis/repositories/e/ebuild/utils/newenvd
index e147843..57c29bc 100755
--- a/paludis/repositories/e/ebuild/utils/newenvd
+++ b/paludis/repositories/e/ebuild/utils/newenvd
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newexe b/paludis/repositories/e/ebuild/utils/newexe
index 911a565..3584088 100755
--- a/paludis/repositories/e/ebuild/utils/newexe
+++ b/paludis/repositories/e/ebuild/utils/newexe
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newinitd b/paludis/repositories/e/ebuild/utils/newinitd
index 69c6149..7322aee 100755
--- a/paludis/repositories/e/ebuild/utils/newinitd
+++ b/paludis/repositories/e/ebuild/utils/newinitd
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newins b/paludis/repositories/e/ebuild/utils/newins
index 5d385e3..b87555c 100755
--- a/paludis/repositories/e/ebuild/utils/newins
+++ b/paludis/repositories/e/ebuild/utils/newins
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newlib.a.in b/paludis/repositories/e/ebuild/utils/newlib.a.in
index c146ed2..f723355 100755
--- a/paludis/repositories/e/ebuild/utils/newlib.a.in
+++ b/paludis/repositories/e/ebuild/utils/newlib.a.in
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newlib.so.in b/paludis/repositories/e/ebuild/utils/newlib.so.in
index 3916298..8be5491 100755
--- a/paludis/repositories/e/ebuild/utils/newlib.so.in
+++ b/paludis/repositories/e/ebuild/utils/newlib.so.in
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newman b/paludis/repositories/e/ebuild/utils/newman
index c228a16..99721db 100755
--- a/paludis/repositories/e/ebuild/utils/newman
+++ b/paludis/repositories/e/ebuild/utils/newman
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newsbin b/paludis/repositories/e/ebuild/utils/newsbin
index b8f5927..9aad1bb 100755
--- a/paludis/repositories/e/ebuild/utils/newsbin
+++ b/paludis/repositories/e/ebuild/utils/newsbin
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/unpack b/paludis/repositories/e/ebuild/utils/unpack
index b682710..94da791 100755
--- a/paludis/repositories/e/ebuild/utils/unpack
+++ b/paludis/repositories/e/ebuild/utils/unpack
@@ -24,7 +24,10 @@
die()
{
echo "unpack: error: $@" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
+ if [[ -z ${PALUDIS_FAILURE_IS_NONFATAL} ]]; then
+ echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
+ kill -s SIGUSR1 "${EBUILD_KILL_PID}"
+ fi
exit 123
}
assert()
diff --git a/paludis/repositories/e/ebuild/write_binary_ebuild.bash b/paludis/repositories/e/ebuild/write_binary_ebuild.bash
index db0f257..8d3e981 100644
--- a/paludis/repositories/e/ebuild/write_binary_ebuild.bash
+++ b/paludis/repositories/e/ebuild/write_binary_ebuild.bash
@@ -53,6 +53,9 @@ EBUILD_MODULES_DIRS="${EBUILD_MODULES_DIRS} ${EBUILD_MODULES_DIR}"
export PALUDIS_EBUILD_MODULES_DIR="${EBUILD_MODULES_DIR}"
+export EBUILD_KILL_PID=$$
+declare -r EBUILD_KILL_PID
+
ebuild_load_module()
{
for d in ${EBUILD_MODULES_DIRS}; do
diff --git a/paludis/repositories/e/ebuild/write_vdb_entry.bash b/paludis/repositories/e/ebuild/write_vdb_entry.bash
index 162caad..82c6f64 100755
--- a/paludis/repositories/e/ebuild/write_vdb_entry.bash
+++ b/paludis/repositories/e/ebuild/write_vdb_entry.bash
@@ -53,6 +53,9 @@ EBUILD_MODULES_DIRS="${EBUILD_MODULES_DIRS} ${EBUILD_MODULES_DIR}"
export PALUDIS_EBUILD_MODULES_DIR="${EBUILD_MODULES_DIR}"
+export EBUILD_KILL_PID=$$
+declare -r EBUILD_KILL_PID
+
ebuild_load_module()
{
for d in ${EBUILD_MODULES_DIRS}; do