although it's not required by any part of core, the packaging script automatically adds a "project = ...." line to every .info file before it makes a tarball. it does this at the same time when it's adding the accurate, human-readable version string and a packaging timestamp. this attribute is used by the update_status.module (which will soon be part of system.module in D6) to know what project's release history to query for update info.

so, everything works great if you download a tarball, since all the .info files have this attribute already. however, if you checkout directly from CVS, this is missing, and certain things go to hell in update_status.module. as a convinience for the deploy-from-CVS crowd, if we just commit this patch, then update_status will work better with core out of the box, with no special hackery. we can try to hack around the problem, but this seems cleaner than special-case code in update_status.module to handle all the core modules...

Comments

merlinofchaos’s picture

This is my idea, so clearly I +1 this.

drewish’s picture

seems like the logical way to go

dww’s picture

StatusFileSize
new15.74 KB

the *only* downside i can think of is that when people blindly copy a core module's .info file as an example, they'll get this wrong. i've seen other people put "version = VERSION" in their contribs, for example. so, we'd have to document this. perhaps a comment in the core .info files themselves above version and project would be in order, to help people understand *not* to directly copy these attributes. do y'all think that's worth doing?

also, in the interest of full disclosure, i just wrote the work-around code (http://drupal.org/node/145095), and, aside from indentation and formatting, it's basically 1 extra if () clause and a call to strpos(). ;) so, i don't think it's insane to have that extra check, even in the D6 version in core, to handle the deploy-from-CVS crowd.

but, i'm still in favor of this patch going in, perhaps with the comment in each .info file as i propose here.

p.s. here's a patch that applies cleanly to D5 if there's any hope of a backport.

merlinofchaos’s picture

I think if we did it right, it'd only happen if

1) someone has project = Core -- required
2) someone has version = VERSION
3) someone has that module checked out of CVS

Sure, that's possible. Those modules also will probably suck. I don't think we care.

dww’s picture

Status: Needs review » Closed (won't fix)

Between the 1-line of code in update_status and the new CVS deploy module, there should be no reason for this patch anymore. And, there are some drawbacks, so let's not do this.