hi all,
using opkg r215 I get error while acquired administrative lock
root@OpenWrt:/proc# opkg info
/usr/lib/opkg/lock
....: Permission denied
Collected errors:
* Could not obtain administrative lock
root@OpenWrt:/proc# ls /usr/lib/opkg/lock -la
-rw-r----- 1 root root 0 Jan 1 00:19 /usr/lib/opkg/lock
This log was created using patch post at the end of bug.
The filesystem is jffs2 otherwise I will investigate this bug soon,
probably I will use fcntl instread lockf ;)
Best Regards
diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
index fbbd2b2..f962aff 100644
--- a/libopkg/opkg_conf.c
+++ b/libopkg/opkg_conf.c
@@ -134,12 +134,14 @@ int opkg_conf_init(opkg_conf_t *conf, const args_t *args)
sprintf_alloc (&lock_file, "%s/lock", OPKG_STATE_DIR_PREFIX);
conf->lock_fd = creat (lock_file, S_IRUSR | S_IWUSR | S_IRGRP);
+ printf("%s\n",lock_file);
err = lockf (conf->lock_fd, F_TLOCK, 0);
free (lock_file);
if (err)
{
+ perror("....");
opkg_message (conf, OPKG_ERROR, "Could not obtain administrative
lock\n");
return OPKG_CONF_ERR_LOCK;
}
--
1.6.0.4
Original issue reported on code.google.com by claudyu...@gmail.com on 31 Aug 2009 at 7:27
Original issue reported on code.google.com by
claudyu...@gmail.com
on 31 Aug 2009 at 7:27