yast / yast-yast2

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

Support managing system in a chroot (bsc#1199840) #1258

Closed lslezak closed 2 years ago

lslezak commented 2 years ago

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.

Testing

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.006%) to 41.641% when pulling 3639dbe797526553ddbb749c517cc2359fa040da on chroot_management into 979ae92db0cacf06d1bed52a56fcd23042bdb846 on master.

mvidner commented 2 years ago

Just a clickable reference to WFM.scr_root.

yast-bot commented 2 years ago

:heavy_check_mark: Public Jenkins job #370 successfully finished :heavy_check_mark: Created OBS submit request #978975