@@ -20,14 +20,24 @@ def check_file(self, pkg, filename):
2020 self .output .add_info ('W' , pkg , 'beam-compile-info-missed' , filename )
2121 return
2222
23- compile_state = byte_to_string (beam .compileinfo ['source' ])
24- if 'debug_info' not in beam .compileinfo ['options' ]:
23+ # Beams compiled with the 'deterministic' option omit the
24+ # 'source' and 'options' entries from the compile info. For
25+ # those, fall back to the presence of the debug info chunk.
26+ options = beam .compileinfo .get ('options' )
27+ if options is None :
28+ has_debug_info = beam .selectChunkByName (b'Dbgi' ) is not None
29+ else :
30+ has_debug_info = 'debug_info' in options
31+ if not has_debug_info :
2532 self .output .add_info ('E' , pkg , 'beam-compiled-without-debuginfo' , filename )
2633
2734 # This can't be an error as builddir can be user specific and vary between users
2835 # it could be error in OBS where all the builds are done by user abuild, not in
2936 # general.
30- if not self .source_re .match (compile_state ):
31- self .output .add_info ('W' , pkg , 'beam-was-not-recompiled' , filename , compile_state )
37+ source = beam .compileinfo .get ('source' )
38+ if source is not None :
39+ compile_state = byte_to_string (source )
40+ if not self .source_re .match (compile_state ):
41+ self .output .add_info ('W' , pkg , 'beam-was-not-recompiled' , filename , compile_state )
3242 except Exception :
3343 self .output .add_info ('E' , pkg , 'pybeam-failed' , filename )
0 commit comments