From 2d8ded1f6976b1b0f9129a63c1dc39b59fcf553c Mon Sep 17 00:00:00 2001 From: Tom Duckering Date: Tue, 31 Jan 2017 17:59:40 +0000 Subject: [PATCH] Allow empty string for release in apt::source This fixes a regression from commit 0a178c33. Some repos don't have a release. This allows using such repos. Tests added to make sure when release is set to an empty string the source file is rendered correctly. All other tests are passing. --- manifests/source.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/source.pp b/manifests/source.pp index a9769ea890..e68cb7f6f1 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -4,7 +4,7 @@ Optional[String] $location = undef, String $comment = $name, String $ensure = present, - Optional[String] $release = undef, + Optional[String] $release = 'UNDEF', String $repos = 'main', Optional[Variant[Hash]] $include = {}, Optional[Variant[String, Hash]] $key = undef, @@ -19,7 +19,7 @@ $_before = Apt::Setting["list-${title}"] - if ! $release { + if $release == 'UNDEF' { if $facts['lsbdistcodename'] { $_release = $facts['lsbdistcodename'] } else {