[Buildroot] Is there a working version of opkg?
Grant Edwards
grant.b.edwards at gmail.com
Tue Apr 1 19:50:57 UTC 2025
Does anybody know of a working verison of opkg? I've tried 0.6.2 and
0.7.0, and both versions have a file-locking bug. The basic 'opkg'
utility appears to fork off multiple children (WHY?!?!?) which then
collide with each other when trying to lock /var/log/opkg.lock.
It can be plainly seen using strace, but to make it a little more
obvious, I added fprintf() calls to opkg_lock/unlock:
# opkg install --force-reinstall --force-downgrade <foo>.opk
PID 843 PPID 696 opkg_lock()
Installing <foo> on apps.
beginning preinst...
PID 846 PPID 844 opkg_lock()
error: opkg_lock: Could not lock /var/run/opkg.lock: Resource temporarily unavailable.
error: opkg_cmd_exec: Command failed to capture privilege lock: Resource temporarily unavailable.
ending preinst.....
Configuring web-server.
beginning postinst...
starting /apps/webserver...
ending postinst...
PID 843 PPID 696 opkg_unlock()
If found some old threads discussing the addition of waits/retries
when acquiring that lock but that "solution" was apparently rejected
in favor of just leaving it broken.
--
Grant
More information about the buildroot
mailing list