puppet RPM version conflict

The below puppet error occurred. Despite the usual unhelpful reference to a ruby script, it turned out that the Puppet V3 client had been automatically uninstalled and replaced by puppet-agent.
Normally, you can easily force certain versions of a particular package, however in this situation, PuppetLabs have reverted to earlier behavious and labelled the package "puppet-agent", whilst obsoleting the "puppet" package. This meant that ordinary steps to force a certain version to be installed didn't work.
I was able to manually work around it by using "yum install --exclude puppet-agent*"

This was caused by making both the Puppet V3 and Puppet V4 packages available in the same RPM Repo (as there is a need for both versions of the install during a transition period)

The Error

[root@puppet-client ~]# puppet agent -t
Warning: Setting 'pluginsync' is deprecated.
   (at /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/defaults.rb:1607:in `block in <module:Puppet>')
Error: Could not request certificate: Error 400 on SERVER: The environment must be purely alphanumeric, not 'puppet-ca'
Exiting; failed to retrieve certificate and waitforcert is disabled

Check installed version

(This is the Puppet V4 client package)

[root@puppet-client ~]# rpm -q puppet-agent
puppet-agent-1.4.1-1.el7.x86_64

Trying to unstall puppet (showing it is obseleter by puppet-agent)

[root@puppet-client ~]# yum install puppet-3.8.2-1.el7
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package puppet-3.8.2-1.el7.noarch is obsoleted by puppet-agent-1.4.1-1.el7.x86_64 which is already installed
Nothing to do

Resolving the issue - uninstall then reinstall

[root@puppet-client ~]# yum remove puppet-agent
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package puppet-agent.x86_64 0:1.4.1-1.el7 will be erased
--> Finished Dependency Resolution
 
Dependencies Resolved
 
======================================================================================================================================================================================================================
Package                                                Arch                                             Version                                                 Repository                                      Size
======================================================================================================================================================================================================================
Removing:
puppet-agent                                           x86_64                                           1.4.1-1.el7                                             @puppet                                        106 M
 
Transaction Summary
======================================================================================================================================================================================================================
Remove  1 Package
 
Installed size: 106 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : puppet-agent-1.4.1-1.el7.x86_64                                                                                                                                                                    1/1
  Verifying  : puppet-agent-1.4.1-1.el7.x86_64                                                                                                                                                                    1/1
 
Removed:
  puppet-agent.x86_64 0:1.4.1-1.el7
 
Complete!
[root@puppet-client ~]# yum install -y puppet --exclude puppet-agent\*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package puppet.noarch 0:3.8.2-1.el7 will be installed
--> Processing Dependency: facter >= 1:1.7.0 for package: puppet-3.8.2-1.el7.noarch
--> Running transaction check
---> Package facter.x86_64 1:2.4.4-1.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
======================================================================================================================================================================================================================
Package                                           Arch                                              Version                                                     Repository                                      Size
======================================================================================================================================================================================================================
Installing:
puppet                                            noarch                                            3.8.2-1.el7                                                 puppet                                         1.5 M
Installing for dependencies:
facter                                            x86_64                                            1:2.4.4-1.el7                                               puppet                                          98 k
 
Transaction Summary
======================================================================================================================================================================================================================
Install  1 Package (+1 Dependent package)
 
Total download size: 1.6 M
Installed size: 6.6 M
Downloading packages:
(1/2): facter-2.4.4-1.el7.x86_64.rpm                                                                                                                                                           |  98 kB  00:00:00
(2/2): puppet-3.8.2-1.el7.noarch.rpm                                                                                                                                                           | 1.5 MB  00:00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                  13 MB/s | 1.6 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:facter-2.4.4-1.el7.x86_64                                                                                                                                                                        1/2
  Installing : puppet-3.8.2-1.el7.noarch                                                                                                                                                                          2/2
  Verifying  : puppet-3.8.2-1.el7.noarch                                                                                                                                                                          1/2
  Verifying  : 1:facter-2.4.4-1.el7.x86_64                                                                                                                                                                        2/2
 
Installed:
  puppet.noarch 0:3.8.2-1.el7
 
Dependency Installed:
  facter.x86_64 1:2.4.4-1.el7