Merge pull request #63 from rskvazh/master

Pin source with originator. Useful for pinning Launchpad PPA
This commit is contained in:
Branan Purvine-Riley 2012-05-25 11:57:12 -07:00
commit 95beb15266

View file

@ -2,11 +2,12 @@
# pin a release in apt, useful for unstable repositories # pin a release in apt, useful for unstable repositories
define apt::pin( define apt::pin(
$ensure = present, $ensure = present,
$packages = '*', $packages = '*',
$priority = 0, $priority = 0,
$release = '', $release = '',
$origin = '' $origin = '',
$originator = '',
) { ) {
include apt::params include apt::params
@ -17,6 +18,8 @@ define apt::pin(
$pin = "release a=${release}" $pin = "release a=${release}"
} elsif $origin != '' { } elsif $origin != '' {
$pin = "origin \"${origin}\"" $pin = "origin \"${origin}\""
} elsif $originator != '' {
$pin = "release o=${originator}"
} else { } else {
$pin = "release a=${name}" $pin = "release a=${name}"
} }