List Info

Thread: Re: Migration from sqlite2 to sqlite3




Re: Migration from sqlite2 to sqlite3
country flaguser name
France
2007-05-02 06:37:13
Hi Frederik,

F-Spot does use sqlite3 by default. I mean, if both sqlite2
and sqlite3
are available on your system and you start f-spot for the
first time,
your db will be version 3.

Upgrading your old db from version 2 to version 3 is pretty
trivial, and
a script called f-spot-sqlite-upgrade is available in the
tools folder
of the sources.

Right now, we can't auto-upgrade everyone database by
running this
script to ease the pain of packages maintainers, cause this
script need
both sqlite2 and sqlite3 installed at the same time (and if
we do so, I
guess quite a lot of packages maintainers will start to
become really
angry 
)

I know, upgrading the db is not a task that should be left
to the user,
and most of the packaging systems do not have any ways to
run scripts on
user owned files...

My guess is that the only working (but unelegant) option to
solve both
user and maintainers headaches is, from a F-Spot point of
view, bundle a
copy of sqlite2 in our tree and toolbox, and check for db
version at
every start... hopefully this hack could be removed after 2
years or
more... Patch for this is welcome.

Hope this clarify the situation and helps you

regards

stephane

On Sat, 2007-04-28 at 14:03 +0000, Frederik Himpe wrote:
> My questions here are a follow-up on a discussion in
Mandriva development 
> list about F-spot and sqlite: http://archives.ma
ndrivalinux.com/
> cooker/2007-04/msg02229.php
> 
> It seems F-Spot by default still uses the old
(obsolete?) sqlite2 for its 
> database. Several distributions, like Debian and
Ubuntu, have patched F-
> Spot to use the superior sqlite3 by default (patch can
be found also on 
> the above address). Is there any reason why this is not
the default in F-
> Spot?
> 
> We can very well imagine that sometime in the future,
distributions will 
> not include sqlite2 anymore, which will cause problems
for existing 
> users. Now that most distributions still ship both
versions, would not it 
> be interesting to add code to F-Spot which
automatically migrates from 
> sqlite2 to sqlite3 if both are available on the system?
This would 
> prepare F-Spot better for a future where sqlite2 is not
available anymore.
> 
-- 
Stephane Delcroix
stephanedelcroix.org

_______________________________________________
F-spot-list mailing list
F-spot-listgnome.org
ht
tp://mail.gnome.org/mailman/listinfo/f-spot-list

Re: Migration from sqlite2 to sqlite3
country flaguser name
Belgium
2007-05-02 15:22:16
On Wed, 02 May 2007 13:37:13 +0200, Stephane Delcroix
wrote:

> Hi Frederik,
> 
> F-Spot does use sqlite3 by default. I mean, if both
sqlite2 and sqlite3
> are available on your system and you start f-spot for
the first time,
> your db will be version 3.

OK, I verified this, and you are right. Probably it did not
in the older 
version that Debian includes, but in Mandriva cooker, I get
indeed sqlite 
version 3 db.

> Upgrading your old db from version 2 to version 3 is
pretty trivial, and
> a script called f-spot-sqlite-upgrade is available in
the tools folder
> of the sources.

Yep, it's not difficult, but it's annoying to ask users to
start a shell 
to upgrade their db :-(

It seems like the script is a fairly recent addition, only
available in 
svn at the moment.
 
> My guess is that the only working (but unelegant)
option to solve both
> user and maintainers headaches is, from a F-Spot point
of view, bundle a
> copy of sqlite2 in our tree and toolbox, and check for
db version at
> every start... hopefully this hack could be removed
after 2 years or
> more... Patch for this is welcome.

I think F-Spot should include code which checks availability
of both 
versions of libsqlite.so and upgrade the db if it's
necessary. I think it 
should do this with standard Mono libraries and
libsqlite.so.X, so we 
don't need a dependency on the sqlite and sqlite3 programs
themselves 
(which in most distro's are in other package than the
libraries).

Distro's could stop including the old sqlite2 library by
default, but for 
people upgrading their distro to a newer version, the
package probably 
won't be uninstalled, and so the upgrade then can be done
automagically. 
For people installing a distro for the first time, they'll
have only the 
slqite3 libs, and so for them there won't be a problem
neither.

That leaves only those people upgrading their system, but
not having 
sqlite2 libs installed (e.g. because they formatted all
partitions to 
install a new distro but reuse older /home), but that seems
to be a case 
which we cannot fix automagically.

If I ever get some time and courage (never programmed in C#,
and actually 
it's already a rather long time ago I did some real
programming at 
all...), I'll maybe see if I could start coding something
like this.

> Hope this clarify the situation and helps you

Thanks for the information, I see the situation much clearer
now!

-- 
Frederik Himpe

_______________________________________________
F-spot-list mailing list
F-spot-listgnome.org
ht
tp://mail.gnome.org/mailman/listinfo/f-spot-list

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )