We actually expect an extra space. The previous build failed because a test is issued for location='', which indeed results in 2 spaces between the architecture specification and the release. According to the sources.list man page a location is always required though (unlike the missing/empty location in the :default_params of the source_spec test).
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"