aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-07-26 00:13:55 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-07-26 00:13:55 +0000
commitf67fadb68e2c2d36d55508e9339b881d4a72ccf0 (patch)
tree8b92283a9fdf9781d677221fa757a618aa6b7988
parentd18402718e4c0d08c7f214490a17ad84322c9b25 (diff)
downloadpaludis-f67fadb68e2c2d36d55508e9339b881d4a72ccf0.tar.gz
paludis-f67fadb68e2c2d36d55508e9339b881d4a72ccf0.tar.xz
Change how die works. Stricter emake, dodoc in exheres-0
-rw-r--r--paludis/repositories/e/Makefile.am1
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc145
-rwxr-xr-xpaludis/repositories/e/e_repository_TEST_setup.sh166
-rw-r--r--paludis/repositories/e/ebuild/build_functions.bash7
-rw-r--r--paludis/repositories/e/ebuild/die_functions.bash7
-rw-r--r--paludis/repositories/e/ebuild/utils/Makefile.am4
-rw-r--r--paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am4
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/exheres-0/banned_in_eapi_exheres-03
-rw-r--r--paludis/repositories/e/ebuild/utils/exheres-0/dodoc64
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/exheres-0/emake29
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/exheres-0/unpack (renamed from paludis/repositories/e/ebuild/utils/exheres-0/dounpack)4
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/unpack (renamed from paludis/repositories/e/ebuild/utils/dounpack)1
12 files changed, 422 insertions, 13 deletions
diff --git a/paludis/repositories/e/Makefile.am b/paludis/repositories/e/Makefile.am
index 0f65e03..5fde29f 100644
--- a/paludis/repositories/e/Makefile.am
+++ b/paludis/repositories/e/Makefile.am
@@ -143,6 +143,7 @@ e_repository_TEST_SOURCES = e_repository_TEST.cc
e_repository_TEST_LDADD = \
libpaludiserepository.la \
+ $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis.la \
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index a9f3066..dac40ef 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -22,6 +22,7 @@
#include <paludis/repositories/e/make_ebuild_repository.hh>
#include <paludis/repositories/e/eapi.hh>
#include <paludis/repositories/e/dep_spec_pretty_printer.hh>
+#include <paludis/repositories/fake/fake_installed_repository.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/system.hh>
#include <paludis/util/visitor-impl.hh>
@@ -864,5 +865,149 @@ namespace test_cases
return false;
}
} test_e_repository_fetch;
+
+ struct ERepositoryInstallEAPI0Test : TestCase
+ {
+ ERepositoryInstallEAPI0Test() : TestCase("install_eapi_0") { }
+
+ void run()
+ {
+ TestEnvironment env;
+ tr1::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ keys->insert("format", "ebuild");
+ keys->insert("names_cache", "/var/empty");
+ keys->insert("location", "e_repository_TEST_dir/repo13");
+ keys->insert("profiles", "e_repository_TEST_dir/repo13/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(FSEntry::cwd() / "e_repository_TEST_dir" / "distdir"));
+ tr1::shared_ptr<ERepository> repo(make_ebuild_repository(&env, keys));
+ env.package_database()->add_repository(1, repo);
+
+ tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(&env, RepositoryName("installed")));
+ env.package_database()->add_repository(2, installed_repo);
+
+ InstallAction action(InstallActionOptions::create()
+ .debug_build(iado_none)
+ .checks(iaco_default)
+ .no_config_protect(false)
+ .destination(installed_repo)
+ );
+
+ {
+ TestMessageSuffix suffix("in-ebuild die", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec("cat/in-ebuild-die", pds_pm_unspecific)), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("in-subshell die", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec("cat/in-subshell-die", pds_pm_unspecific)), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("success", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec("cat/success", pds_pm_unspecific)), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("unpack die", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec("cat/unpack-die", pds_pm_unspecific)), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("emake fail", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec("cat/emake-fail", pds_pm_unspecific)), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+ }
+ } test_e_repository_install_eapi_0;
+
+ struct ERepositoryInstallExheres0Test : TestCase
+ {
+ ERepositoryInstallExheres0Test() : TestCase("install_exheres_0") { }
+
+ void run()
+ {
+ TestEnvironment env;
+ tr1::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ keys->insert("format", "ebuild");
+ keys->insert("names_cache", "/var/empty");
+ keys->insert("location", "e_repository_TEST_dir/repo14");
+ keys->insert("profiles", "e_repository_TEST_dir/repo14/profiles/profile");
+ keys->insert("layout", "exheres");
+ keys->insert("eapi_when_unknown", "exheres-0");
+ keys->insert("eapi_when_unspecified", "exheres-0");
+ keys->insert("profile_eapi", "exheres-0");
+ keys->insert("distdir", stringify(FSEntry::cwd() / "e_repository_TEST_dir" / "distdir"));
+ tr1::shared_ptr<ERepository> repo(make_ebuild_repository(&env, keys));
+ env.package_database()->add_repository(1, repo);
+
+ tr1::shared_ptr<FakeInstalledRepository> installed_repo(new FakeInstalledRepository(&env, RepositoryName("installed")));
+ env.package_database()->add_repository(2, installed_repo);
+
+ InstallAction action(InstallActionOptions::create()
+ .debug_build(iado_none)
+ .checks(iaco_default)
+ .no_config_protect(false)
+ .destination(installed_repo)
+ );
+
+ {
+ TestMessageSuffix suffix("in-ebuild die", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec("cat/in-ebuild-die", pds_pm_unspecific)), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("in-subshell die", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec("cat/in-subshell-die", pds_pm_unspecific)), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("success", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec("cat/success", pds_pm_unspecific)), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ id->perform_action(action);
+ }
+
+ {
+ TestMessageSuffix suffix("unpack die", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec("cat/unpack-die", pds_pm_unspecific)), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+
+ {
+ TestMessageSuffix suffix("emake fail", true);
+ const tr1::shared_ptr<const PackageID> id(*env.package_database()->query(query::Matches(
+ PackageDepSpec("cat/emake-fail", pds_pm_unspecific)), qo_require_exactly_one)->last());
+ TEST_CHECK(id);
+ TEST_CHECK_THROWS(id->perform_action(action), InstallActionError);
+ }
+ }
+ } test_e_repository_install_exheres_0;
}
diff --git a/paludis/repositories/e/e_repository_TEST_setup.sh b/paludis/repositories/e/e_repository_TEST_setup.sh
index 6754ca2..41c83bb 100755
--- a/paludis/repositories/e/e_repository_TEST_setup.sh
+++ b/paludis/repositories/e/e_repository_TEST_setup.sh
@@ -437,5 +437,171 @@ DEPENDENCIES=""
END
cd ..
+mkdir -p repo13/{profiles/profile,metadata,eclass} || exit 1
+cd repo13 || exit 1
+echo "test-repo-13" >> profiles/repo_name || exit 1
+echo "cat" >> profiles/categories || exit 1
+cat <<END > profiles/profile/make.defaults
+ARCH="test"
+USERLAND="GNU"
+KERNEL="linux"
+LIBC="glibc"
+CHOST="i286-badger-linux-gnu"
+PALUDIS_COMMAND="/bin/false"
+END
+mkdir -p "cat/in-ebuild-die"
+cat <<END > cat/in-ebuild-die/in-ebuild-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+pkg_setup() {
+ die "boom"
+}
+END
+mkdir -p "cat/in-subshell-die"
+cat <<END > cat/in-subshell-die/in-subshell-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE=""
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+pkg_setup() {
+ ( hasq test \$KEYWORDS && die "boom" )
+}
+END
+mkdir -p "cat/success"
+cat <<END > cat/success/success-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+pkg_setup() {
+ useq spork && die "boom"
+}
+END
+mkdir -p "cat/unpack-die"
+cat <<END > cat/unpack-die/unpack-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+IUSE="spork"
+LICENSE="GPL-2"
+KEYWORDS="test"
+
+src_unpack() {
+ echo "123" > f.bz2
+ unpack ./f.bz2
+}
+END
+mkdir -p "cat/emake-fail"
+cat <<END > cat/emake-fail/emake-fail-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
+}
+END
+cd ..
+
+mkdir -p repo14/{profiles/profile,metadata,eclass} || exit 1
+cd repo14 || exit 1
+echo "test-repo-14" >> profiles/repo_name || exit 1
+echo "cat" >> metadata/categories.conf || exit 1
+cat <<END > profiles/profile/make.defaults
+CHOST="i286-badger-linux-gnu"
+PALUDIS_COMMAND="/bin/false"
+END
+mkdir -p "packages/cat/in-ebuild-die"
+cat <<END > packages/cat/in-ebuild-die/in-ebuild-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS=""
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+pkg_setup() {
+ die "boom"
+}
+END
+mkdir -p "packages/cat/in-subshell-die"
+cat <<END > packages/cat/in-subshell-die/in-subshell-die-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS=""
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+pkg_setup() {
+ ( hasq test \$PLATFORMS && die "boom" )
+}
+END
+mkdir -p "packages/cat/success"
+cat <<END > packages/cat/success/success-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+pkg_setup() {
+ optionq spork && die "boom"
+}
+END
+mkdir -p "packages/cat/unpack-die"
+cat <<END > packages/cat/unpack-die/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
+ unpack ./f.bz2
+}
+END
+mkdir -p "packages/cat/emake-fail"
+cat <<END > packages/cat/emake-fail/emake-fail-1.ebuild || exit 1
+DESCRIPTION="The Description"
+HOMEPAGE="http://example.com/"
+SRC_URI=""
+SLOT="0"
+MYOPTIONS="spork"
+LICENSE="GPL-2"
+PLATFORMS="test"
+
+src_compile() {
+ emake monkey
+}
+END
+cd ..
+
cd ..
diff --git a/paludis/repositories/e/ebuild/build_functions.bash b/paludis/repositories/e/ebuild/build_functions.bash
index 6e7aa11..17e4c75 100644
--- a/paludis/repositories/e/ebuild/build_functions.bash
+++ b/paludis/repositories/e/ebuild/build_functions.bash
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+# Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -103,8 +103,3 @@ einstall()
fi
}
-unpack()
-{
- dounpack ${@} || die "unpack failed"
-}
-
diff --git a/paludis/repositories/e/ebuild/die_functions.bash b/paludis/repositories/e/ebuild/die_functions.bash
index cfff825..572d860 100644
--- a/paludis/repositories/e/ebuild/die_functions.bash
+++ b/paludis/repositories/e/ebuild/die_functions.bash
@@ -20,12 +20,12 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-EBUILD_KILL_PID=$$
+export EBUILD_KILL_PID=$$
declare -r EBUILD_KILL_PID
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' 15
+trap 'echo "die trap: exiting with error." 1>&2 ; exit 250' SIGUSR1
diefunc()
{
@@ -51,7 +51,8 @@ diefunc()
echo 1>&2
fi
- kill ${EBUILD_KILL_PID}
+ echo "diefunc: making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
+ kill -s SIGUSR1 "${EBUILD_KILL_PID}"
exit 249
}
diff --git a/paludis/repositories/e/ebuild/utils/Makefile.am b/paludis/repositories/e/ebuild/utils/Makefile.am
index 681d0c3..7d14c87 100644
--- a/paludis/repositories/e/ebuild/utils/Makefile.am
+++ b/paludis/repositories/e/ebuild/utils/Makefile.am
@@ -25,7 +25,6 @@ libexecprog_SCRIPTS = \
dosbin \
dosed \
dosym \
- dounpack \
emake \
fowners \
fperms \
@@ -50,7 +49,8 @@ libexecprog_SCRIPTS = \
prepallinfo \
prepinfo \
prepdocs \
- prepalldocs
+ prepalldocs \
+ unpack
AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am b/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
index 7e5db94..5384da2 100644
--- a/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
@@ -4,6 +4,7 @@ SUBDIRS = .
libexecprogdir = $(libexecdir)/paludis/utils/exheres-0
libexecprog_SCRIPTS = \
+ dodoc \
dohard \
dosed \
donewins \
@@ -16,7 +17,8 @@ libexecprog_SCRIPTS = \
prepinfo \
prepdocs \
prepalldocs \
- dounpack \
+ unpack \
+ emake \
banned_in_eapi_exheres-0
AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/banned_in_eapi_exheres-0 b/paludis/repositories/e/ebuild/utils/exheres-0/banned_in_eapi_exheres-0
index 937c70c..2145011 100755
--- a/paludis/repositories/e/ebuild/utils/exheres-0/banned_in_eapi_exheres-0
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/banned_in_eapi_exheres-0
@@ -21,5 +21,8 @@ COLOUR_RED=$'\e[31;01m'
COLOUR_NORMAL=$'\e[0m'
echo "${COLOUR_RED}!!! Ebuild bug: '$(basename ${0} )' banned in EAPI exheres-0${COLOUR_NORMAL}"
+echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
+kill -s SIGUSR1 "${EBUILD_KILL_PID}"
+
exit 123
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/dodoc b/paludis/repositories/e/ebuild/utils/exheres-0/dodoc
new file mode 100644
index 0000000..b1cb876
--- /dev/null
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/dodoc
@@ -0,0 +1,64 @@
+#!/bin/bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2006 Stephen Bennett <spb@gentoo.org>
+# Copyright (c) 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
+#
+# 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
+ exit 247
+ echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
+ kill -s SIGUSR1 "${EBUILD_KILL_PID}"
+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/emake
new file mode 100755
index 0000000..a3afc82
--- /dev/null
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/emake
@@ -0,0 +1,29 @@
+#!/bin/bash
+# vim: set sw=4 sts=4 et :
+
+# Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
+#
+# 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
+
+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
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/dounpack b/paludis/repositories/e/ebuild/utils/exheres-0/unpack
index 6ca7817..52ff686 100755
--- a/paludis/repositories/e/ebuild/utils/exheres-0/dounpack
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/unpack
@@ -23,7 +23,9 @@
die()
{
- echo "dounpack: error: $@" 1>&2
+ echo "unpack: error: $@" 1>&2
+ echo "unpack: making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
+ kill -s SIGUSR1 "${EBUILD_KILL_PID}"
exit 123
}
diff --git a/paludis/repositories/e/ebuild/utils/dounpack b/paludis/repositories/e/ebuild/utils/unpack
index 8de948c..1b1937c 100755
--- a/paludis/repositories/e/ebuild/utils/dounpack
+++ b/paludis/repositories/e/ebuild/utils/unpack
@@ -24,6 +24,7 @@
die()
{
echo "dounpack: error: $@" 1>&2
+ kill -s SIGUSR1 "${EBUILD_KILL_PID}"
exit 123
}