Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | save-info-290918-1.patch | 646 bytes | pwolanin |
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedThe 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.
Comment #2
dwwHaven'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.
Comment #3
EclipseGc CreditAttribution: EclipseGc commentedPatches 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
Comment #4
Dries CreditAttribution: Dries commenteddww, 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?
Comment #5
dwwYeah, 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. ;)
Comment #6
royerd CreditAttribution: royerd commentedComment #7
pwolanin CreditAttribution: pwolanin commentednot critical
Comment #8
Dries CreditAttribution: Dries commentedI think this is pretty harmless and opens up possibilities. Certainly not in the critical memory path. Committed to CVS HEAD.
Comment #9
pwolanin CreditAttribution: pwolanin commentedhow about for 6.x too?
Comment #10
Dries CreditAttribution: Dries commentedGabor is away from the keyboard so I committed this to the DRUPAL-6 branch. Thanks Peter.
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.