DE-IBH / apt-dater

terminal-based remote package update manager
GNU General Public License v2.0
101 stars 24 forks source link

Normal exit showed an error #150

Closed 3Tri closed 3 years ago

3Tri commented 6 years ago

Hi! I am using apt-dater 1.0.3 on Debian 9 with some Debian and Ubuntu VMs. Some update runs showed "An error at SERVERNAME has been detected [Less/ignore/connect]" But there was no error in output, just the some systemd ouput.

liske commented 6 years ago

Is it possible for you to provide the screen logs for a session where apt-dater claims there was an error?

3Tri commented 6 years ago

I sas this today:

Scanning kernel images... [                                                                                                                                                                                  ]
^MScanning kernel images...                                                                                                                                                                                    
Failed to retrieve available kernel versions.
No services need to be restarted.
Connection to $SERVER closed.

This is a Xen-machine without /boot.

helmo commented 6 years ago

I'm also seeing this, It could be the ncurses dialog asking a question.

When I grep the typescript logfile using egrep "((?<\!no )error|(?<\!insserv: )warning|fail(ed)?|^?*(E|W): )" /root/.local/share/apt-dater/history/host.example.com:0/1522825660-19410/typescript

I just get just the fullscreen dialog asking 'Daemons using outdated libraries: Which services should be restarted?'.

helmo commented 6 years ago

On closer inspection I found that the dialog was masking a message about restarting the fail2ban service.

Changing the err-pattern from err-pattern="((?&lt;!no )error|(?&lt;!insserv: )warning|fail(ed)?)"/> to err-pattern="((?&lt;!no )error|(?&lt;!insserv: )warning|failed|fail(?!2ban))"/> seems to help. I decided to list 'failed' explicitly to reduce the complexity a little bit.

I'd like to make a pull request for it but found the pattern in 6 files which feels a bit redundant, and I assume in part generated. @liske could you indicate the best way forward?

conf/apt-dater.xml.in etc/apt-dater.xml.in man/apt-dater.xml.5 man/apt-dater.xml.html man/apt-dater.xml.xml src/keyfiles.c

liske commented 6 years ago

You need to update all those files:

Please add patches for all files into your PR. Splitting up fail and failed for the negative lookahead seems to be a good idea.