Skip to contentSkip to conversation

Is there a working version of opkg?

Buildroot Grant Edwards 1 participant 2 messages Apr 1, 2025

lore
Share & tools
lore
#0 lore raw

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

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#1 lore raw
Quoted 4 lines · Grant Edwards

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.

Doh! Never mind.

The author of that package was trying to run an opkg command in the preinst script...

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot