Handle malformed apt package version
@@ -69,7 +69,7 @@ else
options '--allow-downgrades' if platform_family?('debian') \
&& node['packages'] \
&& node['packages']['apt'] \
- && Gem::Version.new(node['packages']['apt']['version']) >= Gem::Version.new('1.1.0')
+ && Gem::Version.new(node['packages']['apt']['version'].split('~')[0]) >= Gem::Version.new('1.1.0')
allow_downgrade true if platform_family?('rhel', 'amazon', 'fedora')
notifies :restart, 'service[signalfx-agent]', :delayed
end
