Module: Registration

Defined in:
src/lib/registration/exceptions.rb,
src/lib/registration/addon.rb,
src/lib/registration/helpers.rb,
src/lib/registration/storage.rb,
src/lib/registration/sw_mgmt.rb,
src/lib/registration/releasever.rb,
src/lib/registration/downloader.rb,
src/lib/registration/smt_status.rb,
src/lib/registration/repo_state.rb,
src/lib/registration/eula_reader.rb,
src/lib/registration/url_helpers.rb,
src/lib/registration/fingerprint.rb,
src/lib/registration/addon_sorter.rb,
src/lib/registration/registration.rb,
src/lib/registration/finish_dialog.rb,
src/lib/registration/suse_register.rb,
src/lib/registration/connect_helpers.rb,
src/lib/registration/eula_downloader.rb,
src/lib/registration/registration_ui.rb,
src/lib/registration/ssl_certificate.rb,
src/lib/registration/ui/wizard_client.rb,
src/lib/registration/ui/addon_eula_dialog.rb,
src/lib/registration/ui/abort_confirmation.rb,
src/lib/registration/migration_repositories.rb,
src/lib/registration/ssl_certificate_details.rb,
src/lib/registration/ui/media_addon_workflow.rb,
src/lib/registration/ui/autoyast_addon_dialog.rb,
src/lib/registration/registration_codes_loader.rb,
src/lib/registration/ui/addon_reg_codes_dialog.rb,
src/lib/registration/ui/autoyast_config_dialog.rb,
src/lib/registration/ui/migration_repos_workflow.rb,
src/lib/registration/ui/registered_system_dialog.rb,
src/lib/registration/ui/autoyast_config_workflow.rb,
src/lib/registration/ui/import_certificate_dialog.rb,
src/lib/registration/ui/migration_finish_workflow.rb,
src/lib/registration/ui/registration_update_dialog.rb,
src/lib/registration/ui/migration_selection_dialog.rb,
src/lib/registration/ui/registration_sync_workflow.rb,
src/lib/registration/ui/addon_selection_base_dialog.rb,
src/lib/registration/ui/regservice_selection_dialog.rb,
src/lib/registration/ui/base_system_registration_dialog.rb,
src/lib/registration/ui/migration_repos_selection_dialog.rb,
src/lib/registration/ui/addon_selection_registration_dialog.rb,
src/lib/registration/ui/addon_selection_reregistration_dialog.rb

Overview


Copyright (c) 2014 Novell, Inc. 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.

You should have received a copy of the GNU General Public License along with this program; if not, contact Novell, Inc.

To contact Novell about this file by physical or electronic mail, you may find

current contact information at www.novell.com.

Defined Under Namespace

Modules: RegistrationCodesLoader, Storage, UI Classes: Addon, ConnectHelpers, DownloadError, Downloader, EulaDownloader, EulaReader, Fingerprint, FinishDialog, Helpers, MigrationRepositories, PkgError, Registration, RegistrationUI, Releasever, RepoState, RepoStateStorage, ServiceError, SmtStatus, SslCertificate, SslCertificateDetails, SuseRegister, SwMgmt, UrlHelpers

Constant Summary collapse

ADDON_SORTER =

Sorter for sorting Addons in required display order (first paid extensions, then free extensions, modules at the end see https://bugzilla.novell.com/show_bug.cgi?id=888567#c21)

proc do |x, y|
  if x.product_type != y.product_type
    begin
      # if empty or nil move at the end
      if !x.product_type || x.product_type.empty?
        1
      elsif !y.product_type || y.product_type.empty?
        -1
      else
        # simplification: "extension" is lexicographically before "module"
        # as requested in the display order so take advantage of this...
        x.product_type <=> y.product_type
      end
    end
  elsif x.free != y.free
    # paid (non-free) first
    x.free ? 1 : -1
  else
    # sort the groups by label ("friendly_name" or "name" attribute)
    x.label <=> y.label
  end
end