-# This adds the necessary components to get backports for ubuntu and debian
-#
-# == Parameters
-#
-# [*release*]
-# The ubuntu/debian release name. Defaults to $lsbdistcodename. Setting this
-# manually can cause undefined behavior. (Read: universe exploding)
-#
-# == Examples
-#
-# include apt::backports
-#
-# class { 'apt::backports':
-# release => 'natty',
-# }
-#
-# == Authors
-#
-# Ben Hughes, I think. At least blame him if this goes wrong. I just added puppet doc.
-#
-# == Copyright
-#
-# Copyright 2011 Puppet Labs Inc, unless otherwise noted.
-class apt::backports(
- $release = $lsbdistcodename,
- $location = $apt::params::backports_locations
-) inherits apt::params {
+class apt::backports (
+ $location = undef,
+ $release = undef,
+ $repos = undef,
+ $key = undef,
+ $pin = 200,
+){
+ if $location {
+ validate_string($location)
+ $_location = $location
+ }
+ if $release {
+ validate_string($release)
+ $_release = $release
+ }
+ if $repos {
+ validate_string($repos)
+ $_repos = $repos
+ }
+ if $key {
+ unless is_hash($key) {
+ validate_string($key)
+ }
+ $_key = $key
+ }
+ unless is_hash($pin) {
+ unless (is_numeric($pin) or is_string($pin)) {
+ fail('pin must be either a string, number or hash')
+ }
+ }