List Info

Thread: Confused: package value of info files




Confused: package value of info files
user name
2006-12-21 15:53:42
i, too, was puzzled by this, and ended up concluding that the "$Name$" trick didn't work.  further discussions on IRC and some playing around revealed that, at least in my case, it only worked after i had both committed that to the .info file, then pulled a completely fresh checkout of the module (checkout, not update!).  

i think the deal is that CVS name expansion doesn't work for updates?  perhaps Derek will grace us with the actual mechanics... 

it might be a good idea to get something in the official doc about how the name expansion works exactly, because it's certainly not self-evident. 

chad

On Dec 21, 2006, at 8:20 AM, Ken Rickard wrote:

OK, now I'm confused, since the standard changed slightly since I wrote my .info file.

I changed the version string to version = "$Name" and committed the change.

When I then run cvs update, the string in the info file returns as: 

version = "$Name:  $"

I assume that this is by design and I should not worry about it.  But it does not conform to the documentation.

References:
http://drupal.org/cvs?commit=48687
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/mysite/mysite.info?r1=1.1.2.1&r2=1.1.2.2


Ken Rickard
agentrickard

Confused: package value of info files
user name
2006-12-21 18:30:11
On Dec 21, 2006, at 7:53 AM, Chad Phillips -- Apartment
Lines wrote:

> i think the deal is that CVS name expansion doesn't
work for  
> updates?  perhaps Derek will grace us with the actual
mechanics...  

sadly, all i know is that it seems to work best with
"cvs checkout"  
and doesn't work well with "cvs update".
furthermore, if you're on HEAD, $Name$ will expand empty, so
don't  
expect miracles there. ;)  to be honest, i've never used
$Name$  
expansion before, but it seemed like the best fit for this
particular  
case.  unfortunately, in practice, it doesn't work as nicely
as i  
expected.  luckily, only a tiny minority of drupal users
will notice  
or care about these failings, since the vast majority will
download  
releases from d.o, and those always have perfect, accurate,
human- 
readable version strings in the .info files, instead.

and, to put this concept to rest, $Revision$ is definitely
*not* what  
we want, that'd be the cvs revision id for the .info file
itself,  
which is utterly misleading as a "version" of your
module.  it'll  
probably stay "1.1" or 1.2" basically
forever...


> it might be a good idea to get something in the
official doc about  
> how the name expansion works exactly, because it's
certainly not  
> self-evident.  

/me shrugs.

i *really* don't care so much about optimizing for the
straight-from- 
CVS power-users crowd.  webchick (bless her soul) provided a
nice php  
snippet to pretty-ify in this case[1] if you want to try it.

bottom line: if you update directly from CVS, 95% of the
time, you're  
just getting the end of some branch, which doesn't have a
valid  
version anyway (since it's moving target code) and there's
not really  
any good value to put in that field. :(

want a nice, real, known version string to appear on your
modules  
page?  download an official release from d.o...

think it's too much of a pain to keep a site updated like
that?   
write some (secure) tools to help a human admin automate the
task of  
finding, downloading, and installing into place the latest
copies of  
your favorite modules.  lord knows enough people have
requested such  
a feature... [and please do *not* reopen that discussion in
this  
thread -- search the archives for this list instead]. ;)

want to optimize the version field on your modules page when
you  
update straight from CVS?  you're in a tiny minority of
power users,  
and you're not the people who are most confused about what
version  
you're running.  no offense, but i don't care much about
your  
usability experience with this field. ;)  i'd be happy to
provide  
insight and wisdom (such as i can) but otherwise, you're on
your  
own.  i have far more urgent tasks to deal with [2].

cheers,
-derek

[1] http://d
rupal.org/node/101009#comment-178021

[2] e.g. porting project* to 5.x:
http://drupal.org/node/9
9759
http://drupal.org/node/
103956
http://drupal.org/node/
101150


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )