View Single Post
Old 03-20-2012, 11:41 PM   #24
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by lukeroge View Post
I know how to mount the main partition as rw, but I had assumed that it would be installing things to the extend image and it wouldn't need access the the root partition. I'll try it again later with it set as RW.
Here is the reason:
Code:
[root@kindle root]# strace -f -F /opt/bin/ipkg list 2>&1|tail
munmap(0x4001b000, 34)                  = 0
close(3)                                = 0
open("/var/local/system/tzVar", O_RDONLY) = -1 ENOENT (No such file or directory)
gettimeofday({1332300008, 690798}, NULL) = 0
getpid()                                = 18936
mkdir("/opt/ipkg-g1rwEY", 0700)         = -1 EROFS (Read-only file system)
write(2, "ipkg_conf_init: Failed to create"..., 85ipkg_conf_init: Failed to create temporary directory `(null)': Read-only file system
) = 85
exit_group(30)                          = ?
Process 18936 detached
[root@kindle root]#
This is harmless, but I do agree that it's annoying. You can either set the environment variable TMPDIR locally or globally (e.g.: )
Code:
TMPDIR=/tmp /opt/bin/ipkg list_installed
TMPDIR=/opt/tmp /opt/bin/ipkg list_installed
For a permanent fix, directly change the default TMPDIR setting inside /opt/lib/libipkg.so.0.0.0 from /opt to /tmp (that's bytes 209c9 through 209cb in the file). I have attached the patched file for convenience.

In either of these cases, it works smoothly with root mounted ro.
Attached Files
File Type: zip libipkg.so.0.0.0-fixed-TMPDIR.zip (68.0 KB, 383 views)
ixtab is offline   Reply With Quote