Once #538660: Move update manager upgrade process into new authorize.php file (and make it actually work) lands (and it's very close now), we'll need to document some new hooks that are invoked in various spots:

hook_updater_info()
hook_updater_info_alter()
hook_verify_update_archive()

Comments

jhodgdon’s picture

Shouldn't this be included in the original issue report, rather than reporting as a separate issue?

jhodgdon’s picture

Category: task » bug

I guess that other issue was too big so they closed it down and split it up.

Anyway, this is now part of the hooks meta-issue, and it's a bug report if this doc is missing (which it is).
#675046: Make sure all hooks in D7 have documentation

gdd’s picture

Status: Active » Needs review
StatusFileSize
new2.13 KB

OK here's a start. The biggest problem I have is in hook_verify_update_archive(). So in #124 of the original issue, this is added with mention of it being used in contrib for things like code signing. However it is not anywhere in core (that I could find), so there's no easy place to grab a sample implementation from. Additionally, the calling code update_manager_archive_verify() indicates this should return $failures, but doesn't indicate what kind of data that is. It is checking !empty(), which seems weird, like it expects an array of some kind. If dww can provide some clarity there, that would be really helpful.

Otherwise the other two hooks seem pretty straightforward.

jhodgdon’s picture

Status: Needs review » Needs work

A few small style/punctuation changes:

+ * Provider information on updaters (classes that can update Drupal.)

--> Provide information on updaters (classes that can update Drupal).

+ *   This array can contain the following keys.

keys. -> keys:

+ * @return $failures

We generally don't put a $variable on the line with @return.

Anyway, it looks like we need dww or someone else who understands hook_verify_update_archive() to let us know what should be in that function doc and its example function body. The rest looks good to me so far.

jhodgdon’s picture

Status: Needs work » Needs review
StatusFileSize
new2.78 KB

Here's a new patch. I figured out what was going on and fixed up the documentation.

Status: Needs review » Needs work

The last submitted patch, 605270-moreinfo.patch, failed testing.

jhodgdon’s picture

Status: Needs work » Needs review
StatusFileSize
new2.71 KB

Another patch just got committed - here's a reroll that should work...

dww’s picture

Assigned: Unassigned » dww
Status: Needs review » Needs work

Nice, thanks! Some of the actual info isn't quite right. I'm rerolling now. Stay tuned...

dww’s picture

Status: Needs work » Needs review
StatusFileSize
new3.31 KB

@jhodgdon: sorry, this is some really wonky, complex stuff that almost no one is ever going to use. :/ I tried to be as clear as possible, but the underlying technical stuff I'm attempting to explain is pretty sucky. ;) Please feel free to find better wording if you can, or ask me if this makes no sense.

Thanks!
-Derek

dww’s picture

StatusFileSize
new3.78 KB

Actually, hook_verify_update_archive() is a hook by update.module, not system.module. Sorry that wasn't clear in the OP. Moved that doc block to update.api.php.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new3.78 KB
that has been download.

download -> downloaded
(probably came from my patch in the first place?)

Otherwise, looks fine to me. I'll just make that change...

jhodgdon’s picture

(better wait for test bot though in case I screwed it up)

aspilicious’s picture

Status: Reviewed & tested by the community » Needs work
+++ modules/system/system.api.php	20 Apr 2010 21:24:29 -0000
@@ -3219,6 +3222,66 @@ function hook_token_info_alter(&$data) {
+ * Alter the Updater information array. ¶

Trailing white space

98 critical left. Go review some!

dww’s picture

Status: Needs work » Needs review
StatusFileSize
new3.78 KB
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me...

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD! Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -Update manager

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