Module: Y2Packager

Defined in:
src/lib/y2packager/product_sorter.rb,
src/lib/y2packager/package.rb,
src/lib/y2packager/product.rb,
src/lib/y2packager/repository.rb,
src/lib/y2packager/release_notes.rb,
src/lib/y2packager/product_reader.rb,
src/lib/y2packager/product_location.rb,
src/lib/y2packager/release_notes_store.rb,
src/lib/y2packager/release_notes_reader.rb,
src/lib/y2packager/storage_manager_proxy.rb,
src/lib/y2packager/dialogs/addon_selector.rb,
src/lib/y2packager/widgets/product_license.rb,
src/lib/y2packager/release_notes_fetchers/rpm.rb,
src/lib/y2packager/release_notes_fetchers/url.rb,
src/lib/y2packager/release_notes_content_prefs.rb,
src/lib/y2packager/release_notes_fetchers/base.rb,
src/lib/y2packager/clients/inst_product_license.rb,
src/lib/y2packager/dialogs/inst_product_license.rb,
src/lib/y2packager/widgets/product_license_confirmation.rb,
src/lib/y2packager/clients/inst_repositories_initialization.rb,
src/lib/y2packager/resolvable.rb,
src/lib/y2packager/system_packages.rb,
src/lib/y2packager/known_repositories.rb,
src/lib/y2packager/dialogs/addon_selector.rb,
src/lib/y2packager/self_update_addon_repo.rb,
src/lib/y2packager/widgets/product_license.rb,
src/lib/y2packager/self_update_addon_filter.rb,
src/lib/y2packager/clients/inst_product_license.rb,
src/lib/y2packager/dialogs/inst_product_license.rb,
src/lib/y2packager/widgets/product_license_content.rb,
src/lib/y2packager/widgets/simple_language_selection.rb,
src/lib/y2packager/widgets/license_translations_button.rb,
src/lib/y2packager/clients/inst_product_upgrade_license.rb,
src/lib/y2packager/dialogs/product_license_translations.rb,
src/lib/y2packager/widgets/product_license_translations.rb,
src/lib/y2packager/clients/inst_repositories_initialization.rb

Overview


Copyright © 2017 SUSE LLC, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.


Defined Under Namespace

Modules: Clients, Dialogs, ReleaseNotesFetchers, Widgets Classes: KnownRepositories, Package, Product, ProductLocation, ProductReader, ReleaseNotes, ReleaseNotesContentPrefs, ReleaseNotesReader, ReleaseNotesStore, Repository, Resolvable, SelfUpdateAddonFilter, SelfUpdateAddonRepo, StorageManagerProxy, SystemPackages

Constant Summary collapse

PRODUCT_SORTER =

Sorter for sorting Products in required display order

proc do |x, y|
  # both products have defined order
  if x.order && y.order
    x.order <=> y.order
  # only one product has defined order
  elsif x.order || y.order
    # product with defined order first
    x.order ? -1 : 1
  else
    # none product has defined order, sort by label
    x.label <=> y.label
  end
end