Bug 3215 - sqlite3 command-line application is not available
: sqlite3 command-line application is not available
Status: RESOLVED FIXED
Product: Development platform
Tools
: 5.0-alpha-pre1
: All Linux
: Low enhancement with 4 votes (vote)
: 5.0-beta
Assigned To: Urho Konttori
: sdk-tools-bugs
:
: community-diablo, patch
:
:
  Show dependency tree
 
Reported: 2008-06-03 15:48 UTC by Marius Gedminas
Modified: 2009-10-22 07:57 UTC (History)
11 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Marius Gedminas (reporter) 2008-06-03 15:48:41 UTC
The sqlite3 package that contains the command-line tool is not available in
chinook, because it is explicitly disabled by a maemo patch to the source
package.

Please restore it, as it is very useful for developers of applications that use
libsqlite3.
Comment 1 Frantisek Dufka maemo.org 2008-06-03 16:37:19 UTC
just for reference - relevant source for chinook is here
http://repository.maemo.org/pool/chinook/free/s/sqlite3/

It is not clear from debian changelog in sqlite3_3.4.1-1osso3.diff.gz why
building sqlite deb was disabled in osso version, see also thread 
http://lists.maemo.org/pipermail/maemo-developers/2008-June/033562.html for the
history
Comment 2 Urho Konttori 2008-06-05 10:43:54 UTC
We have notified your request and it will be hopefully handled soon. Can you
also specify that do you want the tool for sdk, device or both?
Comment 3 Marius Gedminas (reporter) 2008-06-05 13:13:44 UTC
The device especially -- I already can use my distro's native sqlite3 on my
laptop to access the files inside scratchbox.  Although it may be more
convenient to have it on both the device and in the SDK.
Comment 4 Quim Gil nokia 2008-06-10 08:04:41 UTC
This looks like an enhancement request.
Comment 5 Urho Konttori 2008-06-26 20:43:17 UTC
Ok, we've now integrated sqlite command line for internal use. I'll investigate
the possibility to put it to extras (command line tool).
Comment 6 Dr. Nicholas Shaw 2008-08-01 01:16:21 UTC
Sqlite3 is small and works super as an embedded DB.  Providing it with the OS
will certainly improve applications that require a light, tight, DB as the
backend.  I know the three applications I have for Linux all use Sqlite3 and I
haven't been able to compile it for Maemo which has hindered my ability to port
my applications.
Comment 7 Eero Tamminen nokia 2008-10-02 17:48:53 UTC
(In reply to comment #6)
> Sqlite3 is small and works super as an embedded DB.  Providing it with the OS
> will certainly improve applications that require a light, tight, DB as the
> backend.  I know the three applications I have for Linux all use Sqlite3 and I
> haven't been able to compile it for Maemo which has hindered my ability to port
> my applications.

libsqlite3-0 is already included onto Diablo.  So I'm curious, what these apps
use the sqlite command line tool for? To create initial database content?
Comment 8 Steve Veltkamp 2008-10-02 22:44:31 UTC
Because sqlite3 makes database which is easily portable from platform to
platform, command line interface is handy for backing up database which can
then be transfer by internet or cable and used on another platform. CLI is also
useful for doing such tasks as search and replace, quick edits and inserts, and
routine admin.

Datable is application that is designed to be a GUI for sqlite3, and is great,
but it is much slower than using CLI, especially on larger databases. For
instance, to open a table with thousands of records in Datable is a VERY SLOW
process, because all records need to be loaded in. CLI doesn't require this,
and so I can instantly do an edit/insert, etc.
Comment 9 Quim Gil nokia 2008-12-29 16:16:49 UTC
http://repository.maemo.org/pool/fremantle/free/s/sqlite3/

Can we revisit this report and see what is the decision for Fremantle?
Comment 10 Kamen Bundev 2009-01-19 13:41:26 UTC
Still no sqlite command line tool included in Fremantle's package as of now
(3.6.3-2). Just a reminder.
Comment 11 Urho Konttori 2009-01-19 20:03:06 UTC
Just a check, why not have the libsqlite on the device and the CLI tool as
downloable package from extras? A CLI tool is always something that will need a
reason to exist in 99% of the peoples devices not only 1%. I can see that
postinst scripts might certainly need to use teh cli tool to run some db
updates when migrating applications from one version to the next, but I'm not
sure if those cases exist in the real world. Do they? sqlite3 is quite a small
tool, so I would definitely see us integrating that if it's not too much of a
hassle. It should be in the sb anyway now.
Comment 12 Dr. Nicholas Shaw 2009-01-19 20:50:14 UTC
(In reply to comment #7)
> libsqlite3-0 is already included onto Diablo.  So I'm curious, what these apps
> use the sqlite command line tool for? To create initial database content?

The CLT is used for embedded db.  For example, in my C++ programs, I used the
following:
sqlite3 *db;
int rc;
rc = sqlite3_open("bm.db", &db);  This command opens the bm.db for whatever I
need it to do.  It basically runs sqlite3 CLT with the given database.  In
short, yes, there are many of us who need sqlite3 as a CLT.
Comment 13 Eero Tamminen nokia 2009-01-20 10:23:04 UTC
(In reply to comment #11)
> Just a check, why not have the libsqlite on the device and the CLI tool as
> downloable package from extras?

Package dependencies should decide what's on the device.  If nothing
pre-installed depends on sqlite3, it shouldn't be pre-installed on the target.

If something later installed needs sqlite3, it should depend from it.


(In reply to comment #12)
>> libsqlite3-0 is already included onto Diablo.

The problem is that our sqlite3 source package uselessly differs from upstream.
 In upstream it's already put in a separate binary package:
  http://packages.debian.org/source/lenny/sqlite3

But according to the original comment, our source is patched so that it doesn't
provide sqlite3 package.  This kludge should be removed.  As to in which repo
sqlite3 should be, I cannot comment on.
Comment 14 Kamen Bundev 2009-01-20 11:09:34 UTC
This is the only relevant change in 3.4.1 and in fremantle's repo there's no
diff so it looks like there are no differences from upstream (the test was
removed when i checked in 3.6.8)?

--- sqlite3-3.4.1.orig/src/os_unix.c
+++ sqlite3-3.4.1/src/os_unix.c
@@ -650,9 +650,16 @@
   key1.dev = statbuf.st_dev;
   key1.ino = statbuf.st_ino;
 #ifdef SQLITE_UNIX_THREADS
+  /* HACK: skip this test because it breaks QEMU      */
+  /* Use value obtained from real HW instead          */
+#if 0
   if( threadsOverrideEachOthersLocks<0 ){
     testThreadLockingBehavior(fd);
-  }
+  } 
+#else
+  threadsOverrideEachOthersLocks = 1;
+#endif
+  
   key1.tid = threadsOverrideEachOthersLocks ? 0 : pthread_self();
 #endif
   memset(&key2, 0, sizeof(key2));
Comment 15 Ivan Frade nokia 2009-05-22 15:14:02 UTC
Sqlite3 has been readded to the platform (thanks to the patch provided in the
comments!).

It has been done some time ago, but we forgot to close this bug.
Comment 16 Lucas Maneos 2009-10-22 07:57:15 UTC
Marking patches of interest to Diablo (Maemo4) community updates, please excuse
the noise.