Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 282486 - subversion.eclass: ESVN_WC_REVISION references revision before "svn up" instead of the one after
Summary: subversion.eclass: ESVN_WC_REVISION references revision before "svn up" inste...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Akinori Hattori
URL: http://thread.gmane.org/gmane.linux.g...
Whiteboard:
Keywords:
: 294135 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-23 19:27 UTC by Andre
Modified: 2013-07-27 10:18 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
example ebuild where you can see the bug (qtlobby.ebuild,1.01 KB, text/plain)
2009-08-23 19:29 UTC, Andre
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andre 2009-08-23 19:27:01 UTC
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
Comment 1 Andre 2009-08-23 19:29:44 UTC
Created attachment 202075 [details]
example ebuild where you can see the bug
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-23 19:43:17 UTC
You can run subversion_wc_info again...
Comment 3 Paul Varner (RETIRED) gentoo-dev 2009-08-27 14:25:36 UTC
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.
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-27 14:32:34 UTC
Changing ESVN_WC_REVISION would break existing ebuilds. We can introduce new variables e.g ESVN_PREVIOUS_WC_REVISION and ESVN_CURRENT_WC_REVISION.
Comment 5 Leho Kraav (:macmaN @lkraav) 2009-11-22 16:00:32 UTC
this is a problem in media-tv/xbmc-9999 too.
Comment 6 Patrick Lauer gentoo-dev 2009-11-23 10:15:10 UTC
*** Bug 294135 has been marked as a duplicate of this bug. ***
Comment 7 Leho Kraav (:macmaN @lkraav) 2010-12-17 00:24:02 UTC
did anyone ever do anything about this?
Comment 8 Leho Kraav (:macmaN @lkraav) 2011-05-01 07:28:31 UTC
Since xbmc moved to git I personally have no interest anymore.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-14 09:20:26 UTC
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.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-23 18:48:14 UTC
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.
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-27 10:18:17 UTC
+  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.
+