Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check for puppet rpm before trying to install #445

Merged
merged 2 commits into from Feb 12, 2014

Conversation

Phil0xF7
Copy link

@Phil0xF7 Phil0xF7 commented Feb 8, 2014

This fixes an issue where subsequent tests will fail when the RS_PROVISION=no and RS_DESTROY=no flag is set for centos. The error is caused by attempting to install the puppet rpm on a machine that already has the puppet rpm installed.

This fixes an issue where subsequent tests will fail when the RS_PROVISION=no and RS_DESTROY=no flag is set for centos. The error is caused by attempting to install the puppet rpm on a machine that already has the puppet rpm installed.
@igalic
Copy link
Contributor

igalic commented Feb 8, 2014

Couldn't this be fixed simply by using yum instead of rpm?

@apenney
Copy link
Contributor

apenney commented Feb 10, 2014

@igalic I dunno, I didn't know yum could http files like rpm can. Were you thinking like, yum localinstall or something?

@igalic
Copy link
Contributor

igalic commented Feb 11, 2014

I just tried it out, and you're right, localinstall was the clue

[root@localhost ~]# rpm -e --nodeps  ruby-shadow
[root@localhost ~]# rpm -qa rpm
rpm-4.8.0-37.el6.x86_64
[root@localhost ~]# rpm -qa ruby-shadow
[root@localhost ~]# yum localinstall -y http://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-shadow-1.4.1-13.el6.x86_64.rpm
Loaded plugins: fastestmirror, security
Setting up Local Package Process
ruby-shadow-1.4.1-13.el6.x86_64.rpm                                                                                                                                        |  11 kB     00:00     
Examining /var/tmp/yum-root-UPLKLt/ruby-shadow-1.4.1-13.el6.x86_64.rpm: ruby-shadow-1.4.1-13.el6.x86_64
Marking /var/tmp/yum-root-UPLKLt/ruby-shadow-1.4.1-13.el6.x86_64.rpm to be installed
Loading mirror speeds from cached hostfile
 * base: ftp.plusline.de
 * centosplus: centos.digitalnova.at
 * contrib: ftp.plusline.de
 * epel: mirror.muntinternet.net
 * extras: centos.digitalnova.at
 * updates: centos.digitalnova.at
Resolving Dependencies
--> Running transaction check
---> Package ruby-shadow.x86_64 0:1.4.1-13.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================================
 Package                                   Arch                                 Version                                      Repository                                                      Size
==================================================================================================================================================================================================
Installing:
 ruby-shadow                               x86_64                               1.4.1-13.el6                                 /ruby-shadow-1.4.1-13.el6.x86_64                                15 k

Transaction Summary
==================================================================================================================================================================================================
Install       1 Package(s)

Total size: 15 k
Installed size: 15 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
puppet-3.4.2-1.el6.noarch has missing requires of ruby-shadow
  Installing : ruby-shadow-1.4.1-13.el6.x86_64                                                                                                                                                1/1 
  Verifying  : ruby-shadow-1.4.1-13.el6.x86_64                                                                                                                                                1/1 

Installed:
  ruby-shadow.x86_64 0:1.4.1-13.el6                                                                                                                                                               

Complete!
[root@localhost ~]# echo $?
0
[root@localhost ~]# yum localinstall -y http://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-shadow-1.4.1-13.el6.x86_64.rpm
Loaded plugins: fastestmirror, security
Setting up Local Package Process
ruby-shadow-1.4.1-13.el6.x86_64.rpm                                                                                                                                        |  11 kB     00:00     
Examining /var/tmp/yum-root-UPLKLt/ruby-shadow-1.4.1-13.el6.x86_64.rpm: ruby-shadow-1.4.1-13.el6.x86_64
/var/tmp/yum-root-UPLKLt/ruby-shadow-1.4.1-13.el6.x86_64.rpm: does not update installed package.
Nothing to do
[root@localhost ~]# echo $?
0
[root@localhost ~]# 

@igalic
Copy link
Contributor

igalic commented Feb 11, 2014

of course this works with yum localinstall -y http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm too ;)

@igalic
Copy link
Contributor

igalic commented Feb 11, 2014

@Phil0xF7 would you mind updating the PR?

@Phil0xF7
Copy link
Author

@igalic PR has been updated.

igalic added a commit that referenced this pull request Feb 12, 2014
Add check for puppet rpm before trying to install
@igalic igalic merged commit 12ef27b into puppetlabs:master Feb 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants