Updater supervisor: TypeError: '>' not supported between instances of 'NoneType' and 'int'

Turris Omnia with OS 5.1.2 and update approvals on hbs. I’ve received the notification that 5.1.3 is available. But since then I see this in logs:

2020-11-13 13:59:48 info updater-supervisor[]: Running pkgupdate
2020-11-13 13:59:48 info updater-supervisor[]: Traceback (most recent call last):
   File "/usr/bin/updater-supervisor", line 11, in <module>
    load_entry_point('svupdater==1.3.1', 'console_scripts', 'updater-supervisor')()
   File "/usr/lib/python3.7/site-packages/svupdater/__main__.py", line 103, in main
   File "/usr/lib/python3.7/site-packages/svupdater/_supervisor.py", line 160, in run
   File "/usr/lib/python3.7/site-packages/svupdater/_supervisor.py", line 77, in run
   File "/usr/lib/python3.7/site-packages/svupdater/approvals.py", line 157, in _approved
 TypeError: '>' not supported between instances of 'NoneType' and 'int'

Can I ask you for content of /usr/share/updater/approvals?

0d26bf3aafa30b1761ba3a65f9ef9e1f01126ef018458faac2fd1690831821fc asked 1604618334

I 've had the same problem with 5.1.3, after I disapproved reinstall of kernel packages.
I wasn’t able to get updates for 5.1.4.

after removing approvals and need_approval those appeared and I was able to upgrade.
dirty but helped.

I am sorry for getting to this with such delay… I was debugging and solving other issues.

@peci1 There seems to be no issue with that file. Another try, can you please post output of uci get updater.autorun.auto_approve_time? (it is ok entry is missing). I think that I found root cause of this issue.

@fantomas I think that you have different issue. @peci1 received exception, in your case it just won’t ask for update again as it seems. Are you sure that update you previously denied wasn’t the 5.1.4 update? Do you know time window of deny and 5.1.4 release to your appropriate branch?
Anyway I think that real issue is that approval is after “ignore” hidden in Foris and that prevents you from approving it later on.

# uci get updater.autorun.auto_approve_time
uci: Entry not found

Ok, thank you. The fix is going to be in Turris OS 5.1.5. For now you can switch either to automatic updates or to delayed updates. The error should be present only if you have approval only configured.

I got the exactly the same error, it disappeared after I removed /usr/share/updater/approvals
it contained similar string like the above mentioned, unfortunately I haven’t kept a copy.
According to old logs (USB stick) it started appearing on Sep 22, 02:21
(shortly after installing 5.1.0 int the Sep 21 evening)

I have the same result for uci get updater.autorun.auto_approve_time as @peci1

Ok in that case it is the same issue and please follow same advice. Thank you for helping me to debug this.

It’s back:

Nov 29 19:08:02 turris updater-supervisor: There is no running process with stored pid. Overtaking it.
Nov 29 19:08:02 turris updater-supervisor: Running pkgupdate
Nov 29 19:08:02 turris updater-supervisor: Traceback (most recent call last):
File “/usr/bin/updater-supervisor”, line 11, in
load_entry_point(‘svupdater==1.3.1’, ‘console_scripts’, ‘updater-supervisor’)()
File “/usr/lib/python3.7/site-packages/svupdater/main.py”, line 103, in main
File “/usr/lib/python3.7/site-packages/svupdater/_supervisor.py”, line 160, in run
File “/usr/lib/python3.7/site-packages/svupdater/_supervisor.py”, line 77, in run
File “/usr/lib/python3.7/site-packages/svupdater/approvals.py”, line 157, in _approved
TypeError: ‘>’ not supported between instances of ‘NoneType’ and ‘int’

TOS 5.1.4.
at 18:26 I enabled “Extensions of network protocols for 3G/LTE” package in Reforis.
After getting notification, I haven’t confirmed installation (in fact I was only curious which packages it would install).
I have disabled that package, nothing was installed nor uninstalled.

the /usr/share/updater/approvals contains:
42fe4befb4e29306b2f0257fab6ef50b31060d05c0c777afe069594f1d447e3d asked 1606674404

…nothing more.

looks like it’s going to get fixed in next TOS

Yes, the fix can be found already in HBK, which contains the next fixup of Turris OS 5.1.x release, and soon there should be HBT. Also, it can be found in HBL, HBD branches.