zhengzkkai / opkg

Automatically exported from code.google.com/p/opkg
0 stars 0 forks source link

-offline-root, create path with double slash #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. opkg install polipo -o /tmp/cifs/root
and 
1. opkg install polipo -offline-root /tmp/cifs/root

What is the expected output? What do you see instead?
Collected errors:
 * opkg_conf_load: Could not create lock file /tmp/cifs/root//var/lock/opkg.lock: No such file or directory.

What version of the product are you using? On what operating system?
opkg version 0.1.8

Please provide any additional information below.
The problem is double slash in path.
I think the issue can be fixed by removing "/" from format string:

file: libopkg/opkg_conf.c
function: opkg_conf_load(void)

current:
sprintf_alloc (&lock_file, "%s/%s", opkg_config->offline_root, OPKGLOCKFILE);

fixed:
sprintf_alloc (&lock_file, "%s%s", opkg_config->offline_root, OPKGLOCKFILE);

Original issue reported on code.google.com by Kros...@gmail.com on 12 Dec 2013 at 11:17

GoogleCodeExporter commented 9 years ago
Does the directory "/tmp/cifs/root/var/lock/" exist before you run opkg? I 
don't think the bug is the double forwardslash, I think it's issue 110.

Original comment by paul.betafive on 20 Dec 2013 at 4:26

GoogleCodeExporter commented 9 years ago

Original comment by paul.betafive on 20 Dec 2013 at 6:34