Fail early when its not debian or ubuntu ( or debian like distro )
[puppet-modules/puppetlabs-apt.git] / manifests / pin.pp
index 39de3d8f1f688bbf1f79b5903c094558923efb07..9cb4a8e798ba5ef3a0e1caa05275e5ba53137201 100644 (file)
@@ -31,13 +31,19 @@ define apt::pin(
     $release_version,
     $component,
     $originator,
-    $label] 
+    $label]
   $pin_release = join($pin_release_array, '')
 
   # Read the manpage 'apt_preferences(5)', especially the chapter
   # 'Thea Effect of APT Preferences' to understand the following logic
   # and the difference between specific and general form
-  if $packages != '*' { # specific form
+  if is_array($packages) {
+    $packages_string = join($packages, ' ')
+  } else {
+    $packages_string = $packages
+  }
+
+  if $packages_string != '*' { # specific form
 
     if ( $pin_release != '' and ( $origin != '' or $version != '' )) or
       ( $origin != '' and ( $pin_release != '' or $version != '' )) or