After further investigation I can explain why you are not able to reproduce the bug. During the installation I enable another repository that contains some packages with fixes that I need. I have a modified package of lomoco which fixes bug 1040198 (the maintainer decided not to fix it in Leap 42.3). The presence of this modified package in my auxiliary repository triggers the installation error of java-1_5_0-gcj-compat. However the Requires(pre/post) line in the spec file is necessary anyway whether the bug is triggered or not.