putting yum inside when clause