yast / yast-yast2

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

[ProductControl] Ask if user would like to continue when client is missing #1143

Closed dgdavid closed 3 years ago

dgdavid commented 3 years ago

Problem

Yast-firstboot executes the clients enabled in its control file. But it shows an exception error when a client is not available (e.g., because the package is not installed). — extracted from https://trello.com/c/xA1YyIdv/ (internal link) description

Solution

Do not crash, by checking if the client exists and asking the user what to do (continue or not) when it does not.

Tests

Only tested manually, since adding unit tests for this complex part of the code if out of the scope of this PR.

Screenshots

Before After
Screenshot_sle15sp3_2021-03-08_09:41:51 Screenshot_sle15sp3_2021-03-08_09:49:19

Additional notes

After taking a look to the code, there are no doubts that ProductControl.RunFrom deserves a refactorization, getting rid of those Builtins and extracting the logic to a specialized class. However, I conclude that postponing it for SP4 is a better idea.


Related links

coveralls commented 3 years ago

Coverage Status

Coverage decreased (-0.01%) to 40.522% when pulling 602885dbf409b29597b85402537f23fbc67f45fb on bsc-1180954 into 4c985bb22eda5427a37b254609e9b9f822a43a1c on master.

yast-bot commented 3 years ago

:heavy_check_mark: Internal Jenkins job #147 successfully finished :heavy_check_mark: Created IBS submit request #237542

yast-bot commented 3 years ago

:heavy_check_mark: Public Jenkins job #287 successfully finished :heavy_check_mark: Created OBS submit request #877750