When you try to use ESVN_WC_REVISION in a ebuild to get the recent svn-revision you get the Revision of your local svn-copy before the update and not the one after the update Reproducible: Always Steps to Reproduce: 1. choose a svn-ebuild 2. Include in "src_configure ()": echo $SVN__WC_REVISION 3. manually update your local svn-copy to a older revision 4. emerge the ebuild and look at the echoed Revision Actual Results: you get the Revision you had Before the svn up Expected Results: echo the Revision after svn up
Created attachment 202075 [details] example ebuild where you can see the bug
You can run subversion_wc_info again...
I ran into the same problem with the gentoolkit-9999 ebuild. However, when I read the eclass source code, it looked like a deliberate decison to not update the variable until the pkg_preinst phase. For my purposes, I was able to do what I wanted in that phase. It is not clear to me, if that is acceptable in your example ebuild.
Changing ESVN_WC_REVISION would break existing ebuilds. We can introduce new variables e.g ESVN_PREVIOUS_WC_REVISION and ESVN_CURRENT_WC_REVISION.
this is a problem in media-tv/xbmc-9999 too.
*** Bug 294135 has been marked as a duplicate of this bug. ***
did anyone ever do anything about this?
Since xbmc moved to git I personally have no interest anymore.
I'm now having to work-around this in sys-devel/llvm. @Arfrever: which ebuilds exactly depend on this kind of information? Grepping the tree only shows 6 ebuilds that are actually saying 'eclass is broken' and calling subversion_wc_info to get the right revision. Plus two that are actually using the 'previous' revision for a version number which looks like a bug to me. To sum up, there's no in-tree ebuild which uses this kind of useless, pointless and *confusing* functionality. And there's no reason to keep this broken in the name of backwards compatibility with non-existent ebuilds.
Due to no reply from maintainer, I've sent the necessary patch to gentoo-dev for review. If I get no negative replies, I'll commit it in a week starting from now.
+ 27 Jul 2013; Michał Górny <mgorny@gentoo.org> subversion.eclass: + Export working copy information after the update rather than in + pkg_preinst(). This makes it possible for ebuild to reference e.g. + ESVN_WC_REVISION properly. Bug #282486. +