Also I extracted my opkg.conf from ptxdist after little hack in /usr/local/lib/ptxdist-2018.11.0/scripts/lib/ptxd_make_image_prepare_work_dir.sh

ptxd_make_image_extract_xpkg_files() {
...
cat "${xpkg_conf}" > /tmp/opkg.conf && 
..
}


ââ[$] <> cat opkg.conf 
option force_postinstall 1
#
# /etc/opkg/opkg.conf
#
dest root /
arch armhf 10
arch all 1
arch noarch 1
option check_signature 0
#option signature_ca_path /etc/ssl/certs
#option signature_ca_file /etc/ssl/certs/opkg.crt



Am Di., 4. Dez. 2018 um 13:58 Uhr schrieb Michael Olbrich <m.olbrich@pengutronix.de>:
On Tue, Dec 04, 2018 at 01:47:45PM +0100, Andreas Friesen wrote:
> DESTDIR="/home/friesen/rootfs/rootfs0"  strace -orootfs.log  opkg -f
> "/home/friesen/rootfs/opkg.conf" -o "/home/friesen/rootfs/rootfs0/" install
> rootfs_1.0.0_armhf.ipk
> ââ[$] <> cat rootfs.log| grep run
[...]
> mkdir("/home/friesen/rootfs/rootfs0///usr/local/var/run", 0777) = 0
> chmod("/home/friesen/rootfs/rootfs0///usr/local/var/run", 0755) = 0
> creat("/home/friesen/rootfs/rootfs0///usr/local/var/run/opkg.lock", 0640) =
> 4
[...]
> DESTDIR="/home/friesen/rootfs/rootfs" strace -orootfs0.log
>  /home/friesen/gitlab/quantumx-master/projects/ppc/ptx-multi/platform-soc/sysroot-host/bin/opkg
> -f "/home/friesen/rootfs/opkg.conf" -o "/home/friesen/rootfs/rootfs/"
> install  rootfs_1.0.0_armhf.ipk
> ââ[$] <> cat rootfs0.log| grep run
[...]
> mkdir("/home/friesen/rootfs/rootfs///var/run", 0777) = 0
> chmod("/home/friesen/rootfs/rootfs///var/run", 0755) = 0
> creat("/home/friesen/rootfs/rootfs///var/run/opkg.lock", 0640) = 4

The opkg.conf template contains this:

option  lock_file /var/lock/opkg.lock

As a result, the lock file is created there and I don't see this error.
I'm guessing, that you have a custom opkg.conf without this entry.
You need to add it with a path outside of /var/run.

Michael

--
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de