Skip to content
Permalink
Browse files

Merge pull request #334 from yast/online_upgrade

Initial support for the SLE12 -> SLE15 upgrade + cleanup + addon dumper
  • Loading branch information...
lslezak committed Oct 6, 2017
2 parents 2b36041 + df12f34 commit 9e9421d0dbcd0bd470d105884a2d0f7cca7d5907
@@ -0,0 +1,60 @@
#! /usr/bin/ruby

# This is a simple reader for the addons dumps,
# tweak it as needed to display more details about the addons.

require "yast"
require "registration/addon"

# Monkey Patch to workaround issue in ruby 2.4 Psych (bsc#1048526)
# when fixed or if suseconnect is changed then remove
# (copied from test/spec_helper.rb)
module SUSE
module Connect
module Remote
class Product
alias_method :initialize_orig, :initialize
def initialize(arg = {})
initialize_orig(arg)
end
end

class Service
alias_method :initialize_orig, :initialize
def initialize(arg = { "product" => {} })
initialize_orig(arg)
end
end
end
end
end

INDENT_WIDTH = 2

# dump addon data on STDOUT, recursively dumps the dependant addons
def dump_addon(a, indent_level = 0)
prefix = " " * INDENT_WIDTH * indent_level
puts
puts prefix + "Display Name: #{a.friendly_name}"
puts prefix + "ID: #{a.identifier}-#{a.version}-#{a.arch}"
puts prefix + "EULA: #{a.eula_url}"
puts prefix + "Free: #{a.free}"

return unless a.depends_on

puts prefix + "Depends on:"
dump_addon(a.depends_on, indent_level + 1)
end

if ARGV[0]
addons = YAML.load_file(ARGV[0])
addons.each { |a| dump_addon(a) }
else
puts "This is a simple reader for registration addon dumps."
puts
puts "Usage: dump_reader <file_path>"
puts
puts " <file_path> is the addons dump file, originally stored at"
puts " /var/log/YaST2/registration_addons.yml"
exit 1
end
@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Tue Oct 3 14:17:52 UTC 2017 - lslezak@suse.cz

- Initial support for the SLE12 -> SLE15 upgrade, honor the target
mount point prefix (fate#323163)
- Do not crash when the baseproduct symlink does not exist in
installed system
- Dump the available addons to a separate file
(/var/log/YaST2/registration_addons.yml) instead of the y2log
to make it better readable
- 4.0.1

-------------------------------------------------------------------
Thu Sep 14 07:27:48 UTC 2017 - knut.anderssen@suse.com

@@ -17,7 +17,7 @@


Name: yast2-registration
Version: 4.0.0
Version: 4.0.1
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -0,0 +1,17 @@
# ------------------------------------------------------------------------------
# Copyright (c) 2017 SUSE LLC
#
# 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.
#
# ------------------------------------------------------------------------------
#

require "registration/clients/inst_migration_repos"

Registration::Clients::InstMigrationRepos.new.main

0 comments on commit 9e9421d

Please sign in to comment.
You can’t perform that action at this time.