depend.apache.eclass: Let APXS point to the new location of the binary.
[gentoo.git] / eclass / eutils.eclass
index d23a5b7db8fe393eb7bdf26a8f4f016d519c27ca..aaf195b43c98a9b442b1a3c95889470759684cd0 100644 (file)
@@ -595,6 +595,8 @@ epatch() {
                        : $(( count++ ))
                done
 
+               (( EPATCH_N_APPLIED_PATCHES++ ))
+
                # if we had to decompress the patch, delete the temp one
                if [[ -n ${PIPE_CMD} ]] ; then
                        rm -f "${PATCH_TARGET}"
@@ -689,7 +691,7 @@ edos2unix() {
 #           a full path to an icon
 # type:     what kind of application is this?
 #           for categories:
-#           http://standards.freedesktop.org/menu-spec/latest/apa.html
+#           https://specifications.freedesktop.org/menu-spec/latest/apa.html
 #           if unset, function tries to guess from package's category
 # fields:      extra fields to append to the desktop file; a printf string
 # @CODE
@@ -1731,18 +1733,22 @@ epatch_user() {
 
        # don't clobber any EPATCH vars that the parent might want
        local EPATCH_SOURCE check
-       for check in ${CATEGORY}/{${P}-${PR},${P},${PN}}{,:${SLOT}}; do
+       for check in ${CATEGORY}/{${P}-${PR},${P},${PN}}{,:${SLOT%/*}}; do
                EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CTARGET}/${check}
                [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${CHOST}/${check}
                [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${EPATCH_USER_SOURCE}/${check}
                if [[ -d ${EPATCH_SOURCE} ]] ; then
+                       local old_n_applied_patches=${EPATCH_N_APPLIED_PATCHES:-0}
                        EPATCH_SOURCE=${EPATCH_SOURCE} \
                        EPATCH_SUFFIX="patch" \
                        EPATCH_FORCE="yes" \
                        EPATCH_MULTI_MSG="Applying user patches from ${EPATCH_SOURCE} ..." \
                        epatch
                        echo "${EPATCH_SOURCE}" > "${applied}"
-                       has epatch_user_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS+=" epatch_user_death_notice"
+                       if [[ ${old_n_applied_patches} -lt ${EPATCH_N_APPLIED_PATCHES} ]]; then
+                               has epatch_user_death_notice ${EBUILD_DEATH_HOOKS} || \
+                                       EBUILD_DEATH_HOOKS+=" epatch_user_death_notice"
+                       fi
                        return 0
                fi
        done