-
-
Notifications
You must be signed in to change notification settings - Fork 177
Closed
Description
Problem
An embedded Linux device with a readonly mount of path /opt means opkg fails Could not create lock file /opt/tmp/opkg.lock. The opkg installer should allow a different lockfile location, .e.g. --lock path/opkg.lock
Reproduction
Given any system with readonly /opt path.
cd /tmp- Download the
opkgfile. - Download the
opkg.conffile. - Change
opkg.conffile from
src/gz entware http://bin.entware.net/armv7sf-k3.2
dest root /
dest ram /opt/tmp
lists_dir ext /opt/var/opkg-lists
option tmp_dir /opt/tmp
arch all 100
arch armv7-3.2 160
to a writeable location (any writable path will do; just prepend /tmp)
src/gz entware http://bin.entware.net/armv7sf-k3.2
dest root /
dest ram /tmp/opt/tmp
lists_dir ext /tmp/opt/var/opkg-lists
option tmp_dir /tmp/opt/tmp
arch all 100
arch armv7-3.2 160
- run
opkg
$ /tmp/opkg --conf /tmp/opkg.conf -V3 -d /tmp/ -t /tmp/ update
opkg_conf_parse_file: Loading conf file /tmp/opkg.conf.
opkg_conf_parse_file: Supported arch all priority (100)
opkg_conf_parse_file: Supported arch armv7-3.2 priority (160)
Collected errors:
* opkg_conf_set_option: Duplicate option tmp_dir, using first seen value "/tmp/".
* opkg_conf_load: Could not create lock file /opt/tmp/opkg.lock: No such file or directory.
The culprit message is Could not create lock file /opt/tmp/opkg.lock: No such file or directory.
On my system, the path /opt is readonly (because the mount root / is readonly). The / is of type squashfs and so cannot be remounted as read-write (mount -o remount,rw / has no affect).
Solution
The opkg should have an option to specify the lockfile path.
$ /tmp/opkg --lock /tmp/opkg.lock
The opkg.conf should also allow specifying the lockfile path.
Environment
- Entware feed:
armv7sf-k3.2 - Firmware version DDWRT latest
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels