yast / yast-yast2

YaST module yast2
http://en.opensuse.org/Portal:YaST
GNU General Public License v2.0
54 stars 44 forks source link

Fix Unit Tests in AutoBuild #1255

Closed shundhammer closed 2 years ago

shundhammer commented 2 years ago

Problem

Autobuild for this package fails with unit tests:

Failed to load Module 'SlideShow' due to: cannot load such file -- y2packager/product_spec

https://ci.suse.de/job/yast-yast-yast2-SLE-15-SP4/4/console

Cause

The .spec file of this package (yast2.spec) does not require or buildrequire yast2-packager, so AutoBuild does not install it in the build environment. But adding it would mean a cyclic dependency between packages yast2 (this package) and yast2-packager.

Solution

This adds a workaround for the real-world problem, disregarding the academic problem that a system using the SlideShow does indeed not install yast2-packager:

This overrides Ruby Kernel::require with a custom version that skips loading some few predefined Ruby libraries; like the one that could not be loaded here.

Does this Cause Problems?

Not in real life. That SlideShow.rb module that caused the error is only called by YaST clients that install packages, and those clients will all RPM-require yast2-packager anyway.

Version Bump?

No since it was rake osc:sr that failed here as the very last step in Jenkins. The last version never arrived in OBS. This PR is to make that possible.

yast-bot commented 2 years ago

:heavy_check_mark: Internal Jenkins job #5 successfully finished :heavy_check_mark: Created IBS submit request #271394