app-emulation/xen-tools: check and emit failure message
authorYixun Lan <dlan@gentoo.org>
Tue, 2 May 2017 08:18:47 +0000 (16:18 +0800)
committerYixun Lan <dlan@gentoo.org>
Tue, 2 May 2017 09:01:36 +0000 (17:01 +0800)
'source' command may fail if the file not found

Gentoo-Bug: 616042
Package-Manager: Portage-2.3.5, Repoman-2.3.2

app-emulation/xen-tools/xen-tools-4.7.2.ebuild
app-emulation/xen-tools/xen-tools-4.8.1.ebuild

index 36614705a62e3ad96268711646adb0e54f21f22d..91fb13495b8b25316251858594072c45a41725c4 100644 (file)
@@ -185,7 +185,7 @@ src_prepare() {
                EPATCH_SUFFIX="patch"
                EPATCH_FORCE="yes"
 
-               source "${WORKDIR}"/patches-security/${PV}.conf
+               source "${WORKDIR}"/patches-security/${PV}.conf || die
 
                for i in ${XEN_SECURITY_MAIN}; do
                        epatch "${WORKDIR}"/patches-security/xen/$i
@@ -215,7 +215,7 @@ src_prepare() {
        # Gentoo's patchset
        if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
                einfo "Try to apply Gentoo specific patch set"
-               source "${FILESDIR}"/gentoo-patches.conf
+               source "${FILESDIR}"/gentoo-patches.conf || die
                _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
                for i in ${!_gpv}; do
                        EPATCH_SUFFIX="patch" \
index 9133e5d6309d951a25e723d5ee7fd274118eac74..97abadec279e5f9d2274fb02b24b87f6589e21f8 100644 (file)
@@ -181,7 +181,7 @@ src_prepare() {
                EPATCH_SUFFIX="patch"
                EPATCH_FORCE="yes"
 
-               source "${WORKDIR}"/patches-security/${PV}.conf
+               source "${WORKDIR}"/patches-security/${PV}.conf || die
 
                for i in ${XEN_SECURITY_MAIN}; do
                        epatch "${WORKDIR}"/patches-security/xen/$i
@@ -211,7 +211,7 @@ src_prepare() {
        # Gentoo's patchset
        if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
                einfo "Try to apply Gentoo specific patch set"
-               source "${FILESDIR}"/gentoo-patches.conf
+               source "${FILESDIR}"/gentoo-patches.conf || die
                _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
                for i in ${!_gpv}; do
                        EPATCH_SUFFIX="patch" \