fpv-wtf / wtfos-configurator

Configurator for wtfos, with built in margerine
GNU Affero General Public License v3.0
42 stars 16 forks source link

package manager not able to fetch packages ( #351

Closed MomoRC-tech closed 1 year ago

MomoRC-tech commented 1 year ago

Device

Trace ID (bottom left) 32a1bdf7-c8cd-4cb9-b65f-b86308c1c0aa

Describe the issue

--> after rebooting, package manager is not able to fetch packages any more (to add/remove features) "Failed fetching package list: OPKG is locked - please wait a bit and reload. If lock is not released after some time (5 minutes), please reboot your device."

No change in behaviour after rebooting/trying different cables/on different computers

j005u commented 1 year ago

Try the following command in the CLI and see if that changes anything: rm /opt/tmp/opkg.lock

j005u commented 1 year ago

@stylesuxx as a follow up: I checked, /opt/tmp is not actually a tmpfs. It's part of the overlay in /blackbox/wtfos/opt/.

I did think of this at one point, but hadn't seen any strange behavior so mistakenly dismissed the question.

If it helps @Momo-GitHub-1 then I need to probably change the wtfos-system scripts to ln -s /tmp /opt/tmp at startup.

MomoRC-tech commented 1 year ago

Thx. rm /opt/tmp/opkg.lock worked as a workaround

stylesuxx commented 1 year ago

@j005u OK, so symlink to /tmp it is? Alternatively I guess we could clean that up on startup, but it seems to be the cleaner way to link it to tmp, no?

j005u commented 1 year ago

@j005u OK, so symlink to /tmp it is? Alternatively I guess we could clean that up on startup, but it seems to be the cleaner way to link it to tmp, no?

Yes. I think actually this can be done once and the symlink should persist. I'll have to figure out where to put it in wtfos-system so that it also applies to updated users. Will deal with over the weekend.

j005u commented 1 year ago

I've published wtfos-system 0.2.1 which enforces /opt/tmp being a symlink to /tmp on startup.

I couldn't really put it in postinst as the opkg lock would be active and messing with /opt/tmp meanwhile seemed like a bad plan.

If users get stuck in this situation prior to upgrading they'll still need to rm /opt/tmp/opkg.lock.

Couldn't think of a good way to do this even with healthchecks, again because of not wanting to wipe out any ongoing opkg processes. Now it goes just after the /opt symlink is populated, at that point we shouldn't yet have the configurator doing anything with opkg either.