Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 131552 - cvs.eclass: ECVS_OFFLINE_${PN} doesnt work with packages with '-' in their name
Summary: cvs.eclass: ECVS_OFFLINE_${PN} doesnt work with packages with '-' in their name
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-28 03:28 UTC by Martin Väth
Modified: 2006-12-10 16:16 UTC (History)
0 users

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


Attachments
cvs.eclass patch for new treatment of ECVS_OFFLINE* (cvs.eclass.patch,1.83 KB, patch)
2006-04-28 03:31 UTC, Martin Väth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2006-04-28 03:28:13 UTC
Although the variable ECVS_OFFLINE_${PN} is not officially documented, I think this was a very nice idea. Unfortunately, most packages using cvs.eclass end with "-cvs" (e.g. "emacs-cvs") so that it is not possible to set this variable, because variable names must not contain "-".
I suggest to replace "-" by "_" in ${PN}.

Moreover, it seems reasonable that ECVS_OFFLINE_${PN} (which is probably defined by the user in /etc/make.conf or by the ebuild) should *always* (and not only in case ECVS_OFFLINE=1) be overridden by ECVS_OFFLINE so that the user can change easily the global behavior on the command line. However, perhaps then it is also useful to have a "default" setting for those packages not explicitly specified via ECVS_OFFLINE_${PN}; I suggest the name ECVS_OFFLINE_DEFAULT. (I.e. the "override precedence" is ECVS_OFFLINE > ECVS_OFFLINE_${PN} > ECVS_OFFLINE_DEFAULT).

Finally, if ECVS_OFFLINE* is set but the directory does not exist, I suggest trying to fetch the cvs anyway instead of breaking with an error.

I add a patch "fixing" all three issues.
Comment 1 Martin Väth 2006-04-28 03:31:11 UTC
Created attachment 85656 [details, diff]
cvs.eclass patch for new treatment of ECVS_OFFLINE*
Comment 2 SpanKY gentoo-dev 2006-04-29 12:54:24 UTC
what is the point of ECVS_OFFLINE_DEFAULT ?  i dont seem to get it

> Finally, if ECVS_OFFLINE* is set but the directory does not exist, I suggest
> trying to fetch the cvs anyway instead of breaking with an error.

no ... if you have OFFLINE vars set, then cvs wont fetch
Comment 3 Martin Väth 2006-04-30 05:18:56 UTC
> what is the point of ECVS_OFFLINE_DEFAULT?

Well, my idea was that you have in your /etc/make.conf (or in your environment) a list like this:

ECVS_OFFLINE_emacs-cvs=0 # I always "need" the newest gimmick in emacs
ECVS_OFFLINE_foo-cvs=1   # The newest foo-cvs currently won't compile
...
ECVS_OFFLINE_DEFAULT=1   # For all others not explicitly listed above, I usually don't want the newest version, since it may cause problems or since my bandrate is limited (but in case of library upgrades, recompilation might be necessary anyway)

On the other hand, in some cases it might be convenient to be able to type something like
  ECVS_OFFLINE=0 emerge -eD world
which fetches all newest versions independent of the setting in the above list.
Comment 4 SpanKY gentoo-dev 2006-12-10 16:16:47 UTC
$PN is now properly sanitized ... as for the rest, i dont think that level of complication/flexibility is really needed