Skip to content

Commit

Permalink
Allow empty string for release in apt::source
Browse files Browse the repository at this point in the history
This fixes a regression from commit 0a178c3.

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.
  • Loading branch information
tomduckering authored and Helen Campbell committed May 26, 2017
1 parent 03baf34 commit 2d8ded1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manifests/source.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -19,7 +19,7 @@

$_before = Apt::Setting["list-${title}"]

if ! $release {
if $release == 'UNDEF' {
if $facts['lsbdistcodename'] {
$_release = $facts['lsbdistcodename']
} else {
Expand Down

0 comments on commit 2d8ded1

Please sign in to comment.