lueschem / edi

Embedded development infrastructure.
https://www.get-edi.io
GNU Lesser General Public License v3.0
38 stars 12 forks source link

Syntax error in a changelog entry gives date string 'None', documentation exits. #61

Closed ghost closed 3 years ago

ghost commented 3 years ago

The documentation module was aborting due to a syntactical invalid changelog:

swift-lang (5.2.5-11-debian-buster) whatever; urgency=medium

  * Package created with FPM.

 -- Neil Jones neil@example.com  Tue, 11 Aug 2020 12:40:05 +0000

which misses '<' and '>' around the email address.

/usr/lib/python3/dist-packages/debian/changelog.py:484: UserWarning: Unexpected line while looking for more change data or trailer:  -- Neil Jones neil@example.com  Tue, 11 Aug 2020 12:40:05 +0000
  warnings.warn(message)
/usr/lib/python3/dist-packages/debian/changelog.py:484: UserWarning: Found eof where expected more change data or trailer
  warnings.warn(message)
Error: Failed to parse date string 'None':
Parser must be a string or character stream, not NoneType
+ unexpected_exit /home/.../edi-pi/artifacts/pi4-buster-arm64_documentation
+ local TEMPDIR=/home/.../edi-pi/artifacts/pi4-buster-arm64_documentation
+ print_error 'Going to clean up after abnormal script termination.'
...
Error: Going to clean up after abnormal script termination.
+ clean_up /home/.../edi-pi/artifacts/pi4-buster-arm64_documentation
+ local TEMPDIR=/home/.../edi-pi/artifacts/pi4-buster-arm64_documentation
+ rm -rf /home/.../edi-pi/artifacts/pi4-buster-arm64_documentation
+ trap - EXIT
+ print_error_and_exit 'Abnormal script termination.'
...
Error: Abnormal script termination.
+ exit 1
Error: Command '['sudo', '-u', '...', 'sh', '-c', '/home/.../edi-pi/tmp1m_wrzb1/write_doc.edi']' returned non-zero exit status 1.

I have contacted Neil at his proper email address and told him about this.

Also it seems that FPM has a lot of issues one being that it is not that actively maintained.

Maybe we could make the documentation module more robust by changing the parsing, even though of cause the error is in a syntactical invalid debian change-log file.

lueschem commented 3 years ago

Thanks for pointing out this issue. There is indeed another try/catch needed in the parsing code.