efahl / owut

OpenWrt Upgrade Tool
15 stars 0 forks source link

Handle missing rpcd-mod-rpcsys #11

Closed dangowrt closed 3 months ago

dangowrt commented 3 months ago

Current situation:

Reference error: left-hand side expression is null
In collect_packages(), file /usr/bin/owut, line 721, byte 38:
  called from function collect_all (/usr/bin/owut:1090:19)
  called from anonymous function (/usr/bin/owut:1616:15)

 `    packages.installed = sort(installed.packages);`
  Near here ------------------------------^

Expected output:

rpcd-mod-rpcsys is missing. Please install it.

(or something like that)

efahl commented 3 months ago

Hmm, seems like it should already be there as a (transitive) requirement of attendedsysupgrade-common, which is in the Makefile's DEPENDS list...

Should I be doing run-time checking, too?

$ opkg whatdepends rpcd-mod-rpcsys
Root set:
  rpcd-mod-rpcsys
What depends on root set
        attendedsysupgrade-common 8     depends on rpcd-mod-rpcsys
efahl commented 3 months ago

I added thorough checks on all ubus.calls, generating diagnostics that would have pinpointed both this one and #12 right away.

ERROR: ubus: Method not found: Failed to invoke function 'ackagelist' on object 'rpc-sys'
 from: 'ubus call rpc-sys ackagelist { "all": true }'

Fixed in c49480e0a1466187f0cb2d78cd6c3517566e9bf8