added builddep command.
This commit is contained in:
parent
a11af502cd
commit
5c05fa0f91
3 changed files with 24 additions and 0 deletions
|
@ -5,6 +5,12 @@ Provides helpful definitions for dealing with Apt.
|
|||
|
||||
## Usage
|
||||
|
||||
### apt:builddep
|
||||
Install the build depends of a specified package.
|
||||
<pre>
|
||||
apt::builddep { "glusterfs-server": }
|
||||
</pre>
|
||||
|
||||
### apt::force
|
||||
Force a package to be installed from a specific release. Useful when using repositoires like Debian unstable in Ubuntu.
|
||||
<pre>
|
||||
|
|
16
manifests/builddep.pp
Normal file
16
manifests/builddep.pp
Normal file
|
@ -0,0 +1,16 @@
|
|||
# builddep.pp
|
||||
|
||||
define apt::builddep() {
|
||||
|
||||
Class['apt'] -> Apt::Ppa[$title]
|
||||
|
||||
exec { "apt-update-${name}":
|
||||
command => "/usr/bin/apt-get update",
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
exec { "apt-builddep-${name}":
|
||||
command => "/usr/bin/apt-get -y --force-yes build-dep $name",
|
||||
notify => Exec["apt-update-${name}"],
|
||||
}
|
||||
}
|
2
tests/builddep.pp
Normal file
2
tests/builddep.pp
Normal file
|
@ -0,0 +1,2 @@
|
|||
class { 'apt': }
|
||||
apt::builddep{ 'foo': }
|
Loading…
Reference in a new issue