File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed
resources/puppetlabs/lein-ezbake/template/global/ext Expand file tree Collapse file tree 2 files changed +20
-9
lines changed 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 } "
353354options . replaces . each do |pkg , version |
354355 if options . output_type == 'rpm'
355- fpm_opts << "--replaces '#{ pkg } <= #{ version } -1'"
356- fpm_opts << "--conflicts '#{ pkg } <= #{ version } -1'"
356+ val = if version . nil? || version . empty?
357+ "'#{ pkg } '"
358+ else
359+ "'#{ pkg } <= #{ version } -1'"
360+ end
361+ fpm_opts << "--replaces #{ val } "
362+ fpm_opts << "--conflicts #{ val } "
357363 elsif options . output_type == 'deb'
358364 # why debian, why.
359- fpm_opts << "--replaces '#{ pkg } (<< #{ version } -1openvox1)'"
360- fpm_opts << "--conflicts '#{ pkg } (<< #{ version } -1openvox1)'"
361- fpm_opts << "--replaces '#{ pkg } (<< #{ version } -1#{ options . dist } )'"
362- fpm_opts << "--conflicts '#{ pkg } (<< #{ version } -1#{ options . dist } )'"
365+ if version . nil? || version . empty?
366+ fpm_opts << "--replaces '#{ pkg } '"
367+ fpm_opts << "--conflicts '#{ pkg } '"
368+ else
369+ fpm_opts << "--replaces '#{ pkg } (<< #{ version } -1openvox1)'"
370+ fpm_opts << "--conflicts '#{ pkg } (<< #{ version } -1openvox1)'"
371+ fpm_opts << "--replaces '#{ pkg } (<< #{ version } -1#{ options . dist } )'"
372+ fpm_opts << "--conflicts '#{ pkg } (<< #{ version } -1#{ options . dist } )'"
373+ end
363374 end
364375end
365376
Original file line number Diff line number Diff line change 5353
5454(def ReplacesPkgs
5555 [{:package schema/Str
56- :version schema/Str}])
56+ :version ( schema/optional-key schema/ Str) }])
5757
5858(def RPMTriggers
5959 [{:package schema/Str
@@ -641,8 +641,8 @@ Additional uberjar dependencies:
641641 :terminus-map termini
642642 :replaces-pkgs (for [{:keys [package version]}
643643 (get-local :replaces-pkgs [])]
644- {:package (as-ruby-literal package)
645- :version (as-ruby-literal version)} )
644+ ( cond-> {:package (as-ruby-literal package)}
645+ version ( assoc :version (as-ruby-literal version))) )
646646 :redhat-postinst-install-triggers (map extract-rpm-package-scripts
647647 (get-local :redhat-postinst-install-triggers []))
648648 :redhat-postinst-upgrade-triggers (map extract-rpm-package-scripts
You can’t perform that action at this time.
0 commit comments