]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
sqlite3: use 1024 for MAX_PATHNAM rbt/long
authorRobert Yang <liezhi.yang@windriver.com>
Wed, 22 Nov 2017 07:31:33 +0000 (15:31 +0800)
committerRobert Yang <liezhi.yang@windriver.com>
Thu, 30 Nov 2017 01:27:27 +0000 (09:27 +0800)
The 512 is a little small when len(TMPDIR) == 410, it would be failed when
do_rootfs, use 1024 to fix problem:

Fixed when len(TMPDIR) == 410:
$ bitbake core-image-minimal
[snip]
"tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/lib/python3.5/site-packages/dnf/yum/history.py", line 799, in _get_cursor
    self._conn = sqlite.connect(self._db_file)
sqlite3.OperationalError: unable to open database file

[YOCTO #12374]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
meta/recipes-support/sqlite/files/0001-sqlite3.c-use-1024-MAX_PATHNAME.patch [new file with mode: 0644]
meta/recipes-support/sqlite/sqlite3_3.21.0.bb

diff --git a/meta/recipes-support/sqlite/files/0001-sqlite3.c-use-1024-MAX_PATHNAME.patch b/meta/recipes-support/sqlite/files/0001-sqlite3.c-use-1024-MAX_PATHNAME.patch
new file mode 100644 (file)
index 0000000..f000477
--- /dev/null
@@ -0,0 +1,37 @@
+From 9f63bdd623a851c6f4af6d1259161d5d47d94bb3 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 22 Nov 2017 15:23:24 +0800
+Subject: [PATCH] sqlite3.c: use 1024 for MAX_PATHNAME
+
+The 512 is a little small when build in deep directory, e.g., it would be
+failed to run when oe-core's TMPDIR == 410, use 1024 to fix problem.
+
+Fixed:
+[snip]
+"/usr/lib/python3.5/site-packages/dnf/yum/history.py", line 799, in _get_cursor
+    self._conn = sqlite.connect(self._db_file)
+sqlite3.OperationalError: unable to open database file
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ sqlite3.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sqlite3.c b/sqlite3.c
+index 4ec1271..31edaf8 100644
+--- a/sqlite3.c
++++ b/sqlite3.c
+@@ -30379,7 +30379,7 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
+ /*
+ ** Maximum supported path-length.
+ */
+-#define MAX_PATHNAME 512
++#define MAX_PATHNAME 1024
+ /*
+ ** Maximum supported symbolic links
+-- 
+2.7.4
+
index 1d51733e813d97ec64b96ebc64333e14b7f864cc..33f41e5a507078fcda25abecb492ba93f54b2f3e 100644 (file)
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed0
 
 SRC_URI = "\
   http://www.sqlite.org/2017/sqlite-autoconf-${SQLITE_PV}.tar.gz \
+  file://0001-sqlite3.c-use-1024-MAX_PATHNAME.patch \
   "
 SRC_URI[md5sum] = "7913de4c3126ba3c24689cb7a199ea31"
 SRC_URI[sha256sum] = "d7dd516775005ad87a57f428b6f86afd206cb341722927f104d3f0cf65fbbbe3"