Description of problem:
It would be useful to have an option to tell yum to not wait and exit if the lock taken (e.g. if yum is run non-interactive from some script)
yum waits until the lock is freed
patch posted upstream to allow this.
config option is:
it would be accessible via setting in yum.conf or via
yum --setopt="exit_on_lock=true" yourcommandhere