[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coldsync-hackers] ColdSync 1.5.0 snapshot (and RFC)
Just to prove to everyone that I haven't quite disappeared from
the face of the earth, I've just uploaded a new ColdSync snapshot:
http://www.ooblick.com/software/coldsync/coldsync-1.5.0-20001111.tar.gz
This should be considered alpha-quality software. Don't use it on
important data.
The main changes are the following:
- There is a new "-m<mode>" option, which determines in which
mode ColdSync will run:
- "coldsync -ms" (Sync or Standalone mode) is the default.
This is the normal sync.
- "coldsync -mb <dir> [file...]" (Backup mode) reads databases
from the Palm and writes them to <dir>. If individual
databases are named, only those databases are backed up.
- "coldsync -mr [file...]" (Restore mode) copies the named
files to the Palm, without any modifications. If the file is
a directory, installs all of the databases in that
directory. This can be used to install new databases.
- For now, ColdSync does not update the username and userid on
the Palm. This will be handled by a future Init mode.
- Added John-David Smith's Install conduits. These provide a
hook for actions to be taken when installing a database.
(When you're looking at the code, bear in mind that he wrote
the code before I ripped main() apart and rewrote it from
scratch. So John-David Smith gets credit for writing this
code, and I get the blame for breaking it.)
Request for comments:
* Init mode:
ColdSync currently suffers from the "Bargle bug", where if you
reset your Palm, ColdSync thinks that you've erased everything, and
deletes your backup. In addition, several people have complained
that, since ColdSync sets your user name and ID to your name and uid
from /etc/passwd, that this causes problems with HotSync.
To address both of these issues, I want to do the following:
- Before a normal sync, ColdSync will check the user name and
ID on the Palm. If a username and/or userid have been
specified in the appropriate pda {} block, and they don't
match what's on the Palm, ColdSync will abort. Also, if the
userid is 0, ColdSync will abort (this should prevent the
Bargle bug).
- I want to add an Init mode to allow you to set the username
and userid. When you run 'coldsync -mI' (with no other
options), ColdSync will connect to the Palm, find an
appropriate pda {} block in .coldsyncrc, and set the
username and userid from there.
If it can't find a username or userid in .coldsyncrc,
it will default to the current user's name and uid from
/etc/passwd.
Question: how else should one be able to specify the
username and userid? Command-line options? Interactive
query?
Bear in mind that all user interaction should happen
before ColdSync talks to the Palm, since "keepalive" packets
aren't implemented yet, and the user's response could take
an arbitrarily long time.
* Install conduits:
The way Install conduits currently work (or should work) is as
follows: ColdSync looks at each file in ~/.palm/install in turn, and
runs all applicable Install conduits defined in .coldsyncrc . An
Install conduit can modify its input database, upload records
directly to an existing database on the Palm, add records to
databases in the backup directory, delete the input database, or
anything else it likes.
After the Install conduits have run, ColdSync takes a second
look at ~/.palm/install, and uploads anything that's still there.
The intent is to allow Install conduits to control how a given
database gets installed. For instance, if you want to incorporate
all of your friend's addresses, you can just plunk his AddressDB.pdb
into ~/.palm/install , and a conduit will add its contents to
~/.palm/backup/AddressDB.pdb, then delete
~/.palm/install/AddressDB.pdb .
Question: Let's say that your site administrator has just
dropped a copy of the corporate directory in your
~/.palm/install/AddressDB.pdb . However, you prefer to use the
SuperAddressBook application, so you write an Install conduit to
convert ~/.palm/install/AddressDB.pdb to
~/.palm/install/SuperAB.pdb. After ColdSync runs the Install
conduits for AddressDB.pdb, should it also run the Install conduits
for SuperAB.pdb ? Or should it assume that if you just created it,
then you know what you're doing?
Question: one thought that crossed my mind was that of adding
another built-in conduit, "[install]", which installs its database,
and make it a default conduit, so that by default, ColdSync will
install new files in the normal way. This would allow you to do
something like:
conduit install {
type: Supe/Addr;
path: /conduits/address-preprocessor;
}
conduit install {
type: Supe/Addr;
path: [install];
}
conduit install {
type: Supe/Addr;
path: /conduits/address-postprocessor;
}
The danger here is that if you forget to invoke "[install]"
explicitly after your own conduit, the file will still be there, and
ColdSync will try to reinstall it the next time you sync.
Question: currently, if an Install conduit deletes its input
database, that means that it has taken care of installing it (or
whatever). What if you have two conduits:
conduit install {
type: Foox/Barx;
path: /conduits/first;
}
conduit install {
type: Foox/Barx;
path: /conduits/second;
}
If /conduits/first deletes its input database, should
/conduits/second still run?
--
Andrew Arensburger This message *does* represent the
arensb@ooblick.com views of ooblick.com
Time spent at cons does not count against your lifespan.
--
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.