Build checksum of all files installed by plugin manager

JoshuaRogers - February 14, 2009 - 00:26
Project:Plugin Manager
Version:6.x-2.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

The plugin manager should calculate the md5sum of every file that it installs. This should allow it to tell whether a file has been modified since it was installed. This could be very useful when upgrading / remove modules / themes, as to have a reminder that it has been customized. This should help prevent accidental removal of modifications.

#1

jabapyth - February 14, 2009 - 15:48

thats a great idea. although, what do you think should happen when plugin manager finds a file that *has* been modified? I think it would be fairly difficult to determine automatically whether to keep or delete it. In the 'normal' upgrade process (if one were to upgrade a module by hand) wouldn't the file be deleted anyway?
Or is this just to prevent deletion of modifications made *by hand*, eg w/ a text editor? In that case, is this really a valuable function? -- it seems that that would only be useful to developers, and might be confusing to the typical user.

#2

greggles - February 14, 2009 - 16:24

Note that http://drupal.org/project/file_integrity does this already to some extent - could be something to just depend on or to copy code from.

#3

JoshuaRogers - February 14, 2009 - 20:12

Since the plugin manager has the ability to update and remove files, I just thought that it would be nice for users to get a notice before overwriting any customized files. Just one quick md5file() for each file during installation and one more for each for before removing it. Anything that wasn't installed via the plugin manager will just be assumed to be unchanged.

 
 

Drupal is a registered trademark of Dries Buytaert.