class Zypper::Upgraderepo::View::Ini
Public Class Methods
alternative(num, repo, max_col, alt)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 175 def self.alternative(num, repo, max_col, alt) self.info num, 'Not Found', repo, false puts "hint=#{alt[:message]}" puts "suggested_url=#{alt[:url]}" unless alt[:url].to_s.empty? end
available(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 162 def self.available(num, repo, max_col) self.info num, 'Ok', repo end
header(max_col, upgrade = false)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 197 def self.header(max_col, upgrade = false) end
not_found(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 171 def self.not_found(num, repo, max_col) self.info num, 'Not Found', repo, false end
redirected(num, repo, max_col, redirected)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 166 def self.redirected(num, repo, max_col, redirected) self.info num, 'Redirected', repo, false puts "redirected_to=#{redirected}" end
separator()
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 193 def self.separator puts '' end
timeout(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 181 def self.timeout(num, repo, max_col) self.info num, 'Server Timeout', repo, false end
untouched(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 189 def self.untouched(num, repo, max_col) self.info num, 'Untouched', repo end
upgraded(num, repo, max_col)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 185 def self.upgraded(num, repo, max_col) self.info num, 'Upgraded', repo end
Private Class Methods
info(num, status, repo, valid = true)
click to toggle source
# File lib/zypper/upgraderepo/view.rb, line 206 def self.info(num, status, repo, valid = true) @@number = num puts "[repository_#{num}]" puts "name=#{repo.name}" puts "alias=#{repo.alias}" puts "old_url=#{repo.old_url}" if repo.upgraded? if valid if repo.unversioned? && repo.old_url puts <<-'HEADER'.gsub(/^ +/, '') # The repository is unversioned: its packages should be perfectly # working regardless the distribution version, that because all the # required dependencies are included in the repository itself and # automatically picked up. HEADER end puts "url=#{repo.url}" elsif repo.enabled? puts <<-'HEADER'.gsub(/^ +/, '') # The interpolated URL is invalid, try overriding with the one suggested # in the fields below or find it manually starting from the old_url. # The alternatives are: # 1. Waiting for a repository upgrade; # 2. Change the provider for the related installed packages; # 3. Disable the repository putting the enabled status to 'No'. # url= HEADER else puts <<-'HEADER'.gsub(/^ +/, '') # The interpolated URL is invalid, but being the repository disabled you can # keep the old_url in the field below, it will be ignored anyway during the # normal update and upgrade process. HEADER puts "url=#{repo.old_url}" end puts "priority=#{repo.priority}" puts "enabled=#{repo.enabled? ? 'Yes' : 'No'}" puts "status=#{status}" end