lib/zypper.pm

wait_quit_zypper

wait_quit_zypper();

This function waits for any zypper processes in background to finish.

Some zypper processes (such as purge-kernels) in background hold the lock, usually it's not intended or common that run 2 zypper tasks at the same time, so we need wait the zypper processes in background to finish and release the lock so that we can run a new zypper for our test.