Merge pull request #182 from stefanvanwouw/master
authorAshley Penney <ashley.penney@puppetlabs.com>
Wed, 23 Oct 2013 14:13:55 +0000 (07:13 -0700)
committerAshley Penney <ashley.penney@puppetlabs.com>
Wed, 23 Oct 2013 14:13:55 +0000 (07:13 -0700)
apt::source templates/sources.list.erb generates invalid source line when architecture is provided.

spec/defines/source_spec.rb
templates/source.list.erb

index 9ad4d463e4939fde48a2eccd19a9b4ab1738bb13..215d1e692f992c134c67f478f25b94e46bc2109f 100644 (file)
@@ -73,7 +73,7 @@ describe 'apt::source', :type => :define do
       let :content do
         content = "# #{title}"
         if param_hash[:architecture]
-          arch = "[arch=#{param_hash[:architecture]}]"
+          arch = "[arch=#{param_hash[:architecture]}] "
         end
         content << "\ndeb #{arch}#{param_hash[:location]} #{param_hash[:release]} #{param_hash[:repos]}\n"
 
index e8b68659406b256b27c991d9d6c53c3534001c65..9946966ee5322dab85336320c1adfba88999381e 100644 (file)
@@ -1,5 +1,5 @@
 # <%= @name %>
-deb <% if @architecture %>[arch=<%= @architecture %>]<% end %><%= @location %> <%= @release_real %> <%= @repos %>
+deb <% if @architecture %>[arch=<%= @architecture %>] <% end %><%= @location %> <%= @release_real %> <%= @repos %>
 <%- if @include_src then -%>
-deb-src <% if @architecture %>[arch=<%= @architecture %>]<% end %><%= @location %> <%= @release_real %> <%= @repos %>
+deb-src <% if @architecture %>[arch=<%= @architecture %>] <% end %><%= @location %> <%= @release_real %> <%= @repos %>
 <%- end -%>