app/services/katello/applicability/applicable_content_helper.rb in katello-4.9.2 vs app/services/katello/applicability/applicable_content_helper.rb in katello-4.10.0.rc1
- old
+ new
@@ -131,16 +131,16 @@
::Katello::InstalledPackage.where(nvra: rpms_in_enabled_module_streams.map(&:nvra),
epoch: rpms_in_enabled_module_streams.map(&:epoch)).select(:id)
end
def newest_distinct_installed_packages_query
- "SELECT DISTINCT ON (katello_installed_packages.name) katello_installed_packages.id " \
+ "SELECT DISTINCT ON (katello_installed_packages.name, katello_installed_packages.arch) katello_installed_packages.id " \
"FROM katello_installed_packages INNER JOIN " \
"katello_host_installed_packages ON " \
"katello_installed_packages.id = " \
"katello_host_installed_packages.installed_package_id " \
"WHERE katello_host_installed_packages.host_id = " \
- "#{content_facet.host.id} ORDER BY katello_installed_packages.name, katello_installed_packages.evr DESC"
+ "#{content_facet.host.id} ORDER BY katello_installed_packages.name, katello_installed_packages.arch, katello_installed_packages.evr DESC"
end
def applicable_differences
ActiveRecord::Base.connection.uncached do
consumer_ids = content_facet.send(applicable_units).pluck("#{content_unit_class.table_name}.id")