[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldsync-hackers] Installing newer database from .palm/install



On 1 Feb 2001, Mikael Hedin wrote:
> I'm thinking about the policy "don't install a database in
> .palm/install if it's already installed if the revision is not
> higher".  Sounds fine.  But shouldn't the creation time be checked
> also?  I.e. there is a database with the same revision as the
> installed one, but the creation time is newer on the desktop than on
> the palm device.  Then I think it should be intalled.
>
> Example: a web sucker (plucker) makes a daily pluck of some news site,
> then I want the new .pdb installed every day.

	If I understand correctly, you're suggesting the following:

	newpdb = pdb_Load(file from ~/.palm/install);
	oldpdb = the version of 'newpdb' installed on the Palm;

	if (oldpdb doesn't exist ||
	    newpdb->creationtime > oldpdb->creationtime ||
	    (newpdb->creationtime == oldpdb->creationtime &&
	     newpdb->modnum > oldpdb->modnum))
		install newpdb;

This seems reasonable. Do you want to submit a patch? Does anyone see any
problems with this?

	One kinda-related problem I just noticed: when InstallNewFiles()
overwrites an existing database, it doesn't update the cached copy of the
database header. This could lead to inconsistencies.

-- 
Andrew Arensburger                      This message *does* represent the
arensb@ooblick.com			views of ooblick.com
Usenet: it's not an obsession--it's just something I have to do ALL the time.


-- 
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.