[dev] [commits] Horde-Hatchery branch master updated. 32b8d7d18cb8987b1235005df6567d4d37e87950

Michael M Slusarz slusarz at horde.org
Wed Aug 5 22:14:27 UTC 2009


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Quoting Michael M Slusarz <slusarz at horde.org>:
>
>> Well, this is all hypothetical at this point since we don't yet  
>> need a second upgrade script in IMP.  I'd still prefer to keep this  
>> all in one file though.  It is much easier to understand what  
>> exactly changed between versions and reduces a bunch of potential  
>> cruft in the prefs - since for every ONCE tasks the class name  
>> needs to be stored in the preferences.
>>
>> Would a reasonable solution for people running dev releases be a  
>> script that would automatically run a given login task from the  
>> command line?  Either that or we could set the interval to EVERY,  
>> although we would have to remember to switch it back at release time.
>
> My suggestion is more along the lines of: for each system task that  
> needs to happen once per user, store the revision number of the  
> system tasks in their preferences (instead of storing class names).  
> So we start at revision 1. Each change gets a new revision number  
> (changes made together get the same revision number). We update  
> prefs.php.dist so that the default value is always current (or we  
> could have a special call that returns the current level).
>
> Then on login, we get the user's current level, see if there are any  
> tasks after that, and run them.

This seems like it is adding too much complexity in the logintasks.   
Additionally, this requires us to load/parse the SystemTask every time  
a user logs in.  The present method doesn't require this.

I still think that a command-line script is the preferred solution (it  
is written and currently lives in horde-support/maintainer-tools).   
Upgrades are not all that common, and not that many people are running  
dev code, so this seems more appropriate.  And on the plus side:  
upgrading still becomes much easier because of having to find/run the  
appropriate script, we only need to do:

   cd [hordebase]
   php horde-run-task.php -a [app] -t [taskname] -u [username]

anytime an upgrade is announced.

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list