iuscommunity/yum-plugin-replace — pull request #4 by andytson (2013-05-26 19:26:33+00:00)
Title: Fix issue where not all pkgs_to_not_remove are checked.

I found a bug in replace.py, where only one entry in pkgs_to_not_remove is being the "messy" counterpart checks when not in the same SRPM. Essentially pkgs_to_not_remove being altered while looping, and so ending the loop prematurely.

Steps to reproduce:

yum install php php-pecl-memcache
yum replace php --replace-with=php54

Expecting to see:

Installing:
php54-pecl-memcache
Removing:
php-pecl-memcache

Actual result:

Removing for dependencies:
php-pecl-memcache

I've included a fix which corrects this issue.