Originally I wanted to detect that we are running in a container, but that's too specific. It should be more generic, in theory you could run YaST in a chroot or using a Live medium. Or you could manage the container itself, not the host system.
Solution
The target system needs to be set from the outside, YaST itself cannot detect that easily and reliably. The easiest way is to set an environment variable with the location of the mounted target system.
Update the Installation module constructor to initialize destdir according to the current SCR chroot
Coverage increased (+0.006%) to 41.641% when pulling 3639dbe797526553ddbb749c517cc2359fa040da on chroot_management into 979ae92db0cacf06d1bed52a56fcd23042bdb846 on master.
Problem
When running YaST in a container we need to somehow detect that YaST should manage the system mounted in the
/mnt
and not the container itself.bsc#1199840
Details
Originally I wanted to detect that we are running in a container, but that's too specific. It should be more generic, in theory you could run YaST in a chroot or using a Live medium. Or you could manage the container itself, not the host system.
Solution
The target system needs to be set from the outside, YaST itself cannot detect that easily and reliably. The easiest way is to set an environment variable with the location of the mounted target system.
Installation
module constructor to initializedestdir
according to the current SCR chrootTesting
yast2-registration
package which will use the new methods