This class will used from other packages (y2-registration and y2-installation)
4.4.42
Technical Details
During upgrade YaST removes the old repository services (e.g. SLE12) from the system. Unfortunately when upgrading via RMT it returns the same name ("SUSE_Linux_Enterprise_Server_x86_64") also for the new service (SLE15), YaST did not expected that and removed the "old" service from the system which was actually the new one.
Obviously removing the SLES installation repository caused troubles later.
The problem does not happen with SCC as it uses unique names for each service (e.g. "SUSE_Linux_Enterprise_Server_12_SP3_x86_64" and "SUSE_Linux_Enterprise_Server_15_SP4_x86_64") so there is no conflict in the names.
Solution
Remember also the newly added services and when doing the old service cleanup skip the new services.
Testing
Added unit tests
Tested manually against the RMT server reported in the bug
Coverage increased (+0.03%) to 41.632% when pulling f89b68bd826f9f1626116461f1981d301a61238c on bsc1194453 into 19a2879444e2dbbca34dacdf392bbfab4918cfb8 on master.
Technical Details
During upgrade YaST removes the old repository services (e.g. SLE12) from the system. Unfortunately when upgrading via RMT it returns the same name ("SUSE_Linux_Enterprise_Server_x86_64") also for the new service (SLE15), YaST did not expected that and removed the "old" service from the system which was actually the new one.
Obviously removing the SLES installation repository caused troubles later.
The problem does not happen with SCC as it uses unique names for each service (e.g. "SUSE_Linux_Enterprise_Server_12_SP3_x86_64" and "SUSE_Linux_Enterprise_Server_15_SP4_x86_64") so there is no conflict in the names.
Solution
Remember also the newly added services and when doing the old service cleanup skip the new services.
Testing