Currently, subversion.eclass exports working working copy information
such as ESVN_WC_REVISION two times: once before running 'svn up',
and the second time in pkg_preinst(). As a result, between those two
calls ESVN_WC_REVISION lists the *previous* working copy revision rather
than the current one.
This behavior is not exploited by any ebuild. Instead, all ebuilds that
use ESVN_WC_REVISION either hack it around, or actually use the wrong
revision mistakenly.
The patch fixes the eclass to export working copy information *after*
the update is done. Redundant call to subversion_wc_info is removed from
pkg_preinst() as no ebuild needs the re-export.
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=282486
---
gx86/eclass/subversion.eclass | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gx86/eclass/subversion.eclass b/gx86/eclass/subversion.eclass
index 43d7ce1..9c349bd 100644
--- a/gx86/eclass/subversion.eclass
+++ b/gx86/eclass/subversion.eclass
@@ -324,6 +324,9 @@ subversion_fetch() {
${ESVN_UPDATE_CMD} ${options} || die
"${ESVN}: can't update ${wc_path} from ${repo_uri}."
fi
fi
+
+ # export updated information for the working copy
+ subversion_wc_info "${repo_uri}" || die "${ESVN}:
unknown problem occurred while accessing working copy."
fi
fi
@@ -441,7 +444,6 @@ subversion_src_prepare() {
# config protection.
subversion_pkg_preinst() {
local pkgdate=$(date "+%Y%m%d %H:%M:%S")
- subversion_wc_info "${1}"
if [[ -n ${ESCM_LOGDIR} ]]; then
local dir="${ROOT}/${ESCM_LOGDIR}/${CATEGORY}"
if [[ ! -d ${dir} ]]; then
--
1.8.3.2