Hi, Thanks! My concern is, that I am trying to first install "rubygems" from
source and then after rubygems is installed, I am doing the following
exec { "wgetrubygems":
command => "wget
http://rubyforge.org/frs/download.php/57643/rubygems-1.3.4.tgz",
cwd => "/tmp/",
unless => "sudo gem update"
}
#untar it after it has been downloaded, this step requires the
previous step to complete
#hence the "require" dependency
exec { "tarrubygems":
command => "tar -xzvf rubygems-1.3.4.tgz",
cwd => "/tmp/",
require => Exec["wgetrubygems"],
unless => "sudo gem update"
}
#and then install it using the setup.ruby script, this again
requires the previous steps to complete
#hence the dependency :)
exec { "installrubygems":
command => "ruby setup.rb",
cwd => "/tmp/rubygems-1.3.4/",
unless => "sudo gem update",
require => [Package["ruby"], Package["rdoc"],
Exec["tarrubygems"]]
}
#Create a symbolic link to the gem1.8 binary so as to execute the
gem command, do it only if the symbolic link
#does not exist, this step depends on the previous step to complete
exec { "symlinkrubygem":
command => "sudo ln -s /usr/bin/gem1.8 /usr/bin/gem",
require => Exec["installrubygems"],
unless => "test -L /usr/bin/gem"
}
package { "somepackage":
provider => gem,
require => Exec["symlinkrubygem"]
}
So for the above package to be installed, gem needs to be on the system,
that means there needs to be an order there. So, if I use the "require"
metaparameter, I want to make sure I am doing the right thing.
So, am I on the right track?
2009/6/24 Mike Renfro <[email protected]>
>
> On 6/24/2009 12:53 PM, Swati Tiwari wrote:
> > I am sorry but I am very new to debian package management. When I try
> > to ensure the installation of packages, if the package is not
> > available, puppet issues "apt-get install package" which basically
> > installs a stable binary.
> >
> > So, I am not sure how I will be able to set up dependencies directly
> > while building packages. Could you please give me any ideas or am I
> > shooting on a tangent?
>
> If these are standard Debian packages from a debian.org mirror, then the
> dependencies should already be set, and you shouldn't have any ordering
> issues at all.
>
> If these are packages you've created locally, then you'd set needed
> dependencies in the debian/control file.
> http://www.debian.org/doc/debian-policy/ch-relationships.html has more
> details.
>
> --
> Mike Renfro / R&D Engineer, Center for Manufacturing Research,
> 931 372-3601 / Tennessee Technological University
>
> >
>
--
Regards,
Swati
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---