In update.compare.inc in function update_process_project_info(&$projects), selected information from the .info file is added to the top-level for each project in the $projects array. However, not all information is added (e.g. PHP version dependency, module dependencies, etc). Having this other information available would be very useful for advanced implementations of hook_update_status_alter(). Is there any reason the 'info' portion actually needs to be unset()? It seems that if left it would just be ignored by the existing code in update module.

CommentFileSizeAuthor
#1 save-info-290918-1.patch646 bytespwolanin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

Status: Active » Needs review
FileSize
646 bytes

The simplest solution is just to remove the one line per the attached patch. Additional motivations for this would be switching based on other non-standard variables set in .info, or added in or changed by an implementation of hook_system_info_alter().

Patch applies cleanly against both 7.x and 6.x.

dww’s picture

Haven't thought about this too much let, but let me just point out the obvious: that this moves us in the opposite direction from what we're talking about over at #238950: Meta: update.module RAM consumption. ;) The goal of that issue is to strip out all the junk we're saving and processing in all these arrays. Of course, here you're talking about adding more info that might actually be useful, so it's different. When I get a chance, I'll ponder this patch a little more and give a helpful reply to your questions. ;) I'm not convinced this is a "bug", either, but I'll leave that alone for now.

EclipseGc’s picture

Patches cleanly against 7.x and does appear to break anything. I am running CVS of d7, no additional modules installed, so perhaps it's in need of a little extra testing in that regard, but I've seen nothing to indicate a problem at this point.

Eclipse

Dries’s picture

dww, reading the code it doesn't look like this would be in the critical path with regard to memory usage. The amount of memory that is added by loading .info files seems mostly negligible but maybe I'm wrong?

dww’s picture

Yeah, it's probably a drop in the bucket, and I doubt there's a compelling reason to ignore the rest of the contents of the .info file. Feel free to commit this without my having thought any more about it. But, if you'd like me to think about it first, remind myself exactly what's going on, etc, then I'll spend a little time on that at some point in the nearish future and report back here. I've got other things that are probably higher priority to attend to, first. ;)

royerd’s picture

Title: don't unset project info during processing » don't unset project info during
Priority: Normal » Critical
pwolanin’s picture

Title: don't unset project info during » don't unset project info during processing
Priority: Critical » Normal

not critical

Dries’s picture

Status: Needs review » Fixed

I think this is pretty harmless and opens up possibilities. Certainly not in the critical memory path. Committed to CVS HEAD.

pwolanin’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Reviewed & tested by the community

how about for 6.x too?

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Gabor is away from the keyboard so I committed this to the DRUPAL-6 branch. Thanks Peter.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.