]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Remove .length from variable $pin_release in app
authorpaladox <paladox@users.noreply.github.com>
Tue, 15 May 2018 18:56:21 +0000 (19:56 +0100)
committerGitHub <noreply@github.com>
Tue, 15 May 2018 18:56:21 +0000 (19:56 +0100)
This causes

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Unknown function: 'length'. at /etc/puppet/environments/production/modules/apt/templates/pin.pref.epp:4:16 at /etc/puppet/environments/production/modules/apt/manifests/source.pp:92 on node xxx

downstream

templates/pin.pref.epp

index 7991332c83b872fb7338071bee52d1b933ba962d..cb43bc0f20d1592070c85dc450f6f2c603243392 100644 (file)
@@ -1,7 +1,7 @@
 <%- | $name, $pin_release, $release, $codename, $release_version, $component, $originator, $label, $version, $origin, $explanation, $packages_string, $priority | -%>
 <%-
 $pin =
-if $pin_release.length > 0 {
+if $pin_release {
   $options = [
     if $release         { "a=${release}" },
     if $codename        { "n=${codename}" },