File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
resources/puppetlabs/lein-ezbake/template/global Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 152152params+=(' --logrotate' )
153153< % end -%>
154154
155+ # In this part, we should really be fixing the use of as-ruby-literal
156+ # rather than messing with quotes here. But someone more familiar with
157+ # Clojure than I can do that.
155158< % EZBake::Config[:replaces_pkgs].each do | package, version| -%>
156- params+=(' --replaces' " <%= package -%>,<%= version -%>" )
159+ < % munged_package = package.delete_prefix(" '" ).delete_suffix(" '" ) %>
160+ < % munged_version = version.nil? ? ' ' : version.delete_prefix(" '" ).delete_suffix(" '" ) %>
161+ < % replaces_str = munged_version.empty? ? " #{munged_package}" : " #{munged_package} #{munged_version}" %>
162+ params+=(' --replaces' " <%= replaces_str %>" )
157163< % end %>
158164
159165< % EZBake::Config[:create_dirs].each do | directory| -%>
Original file line number Diff line number Diff line change 350350shared_opts << "--url http://github.com/openvoxproject"
351351shared_opts << "--architecture all"
352352
353- puts "######## Replaces: #{ options . replaces } "
354353options . replaces . each do |pkg , version |
354+ # Strip the surrounding quotes since we add them in a certain way here.
355+ # We should probably just fix this in the core code by being smarter with
356+ # as-ruby-literaly, but someone more familiar with Clojure can do that part.
357+ pkg = pkg . delete_prefix ( "'" ) . delete_suffix ( "'" )
358+ version = version . delete_prefix ( "'" ) . delete_suffix ( "'" )
359+ puts "Replaces package: #{ pkg } "
360+ puts "Replaces version: #{ version } "
355361 if options . output_type == 'rpm'
356362 val = if version . nil? || version . empty?
357363 "'#{ pkg } '"
372378 fpm_opts << "--conflicts '#{ pkg } (<< #{ version } -1#{ options . dist } )'"
373379 end
374380 end
381+ puts "fpm_opts so far: #{ fpm_opts } "
375382end
376383
377384if options . is_pe
You can’t perform that action at this time.
0 commit comments