Skip to content

Commit

Permalink
workaround: disable some offline upgrade code, update only packages
Browse files Browse the repository at this point in the history
the offline migration code does DUP from all, online migration
needs to do only DUP from the migration repositories
  • Loading branch information
lslezak committed Jun 26, 2015
1 parent d10d939 commit 3d36dc4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# use the shared Yast defaults
inherit_from:
/usr/share/YaST2/data/devtools/data/rubocop_yast_style.yml

Style/MethodName:
Exclude:
# the mocked Update module methods break the Ruby naming rule
- test/main_workflow_test.rb
8 changes: 8 additions & 0 deletions src/lib/migration/main_workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ def repositories
end

def proposals
# HACK: disable updating from _all_ repositories in update_proposal.rb
# client, pretend that the initialization has been already done
Yast::Update.did_init1 = true

# update only installed packages, updated based on patterns is used for
# product version upgrade (e.g. SLES11 -> SLES12)
Yast::Update.onlyUpdateInstalled = true

Yast::WFM.CallFunction("migration_proposals")
end

Expand Down
7 changes: 4 additions & 3 deletions test/main_workflow_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
module Yast
# Faked Update module
class UpdateClass
# we need at least one non-default methods, otherwise ruby-bindings thinks
# it is just namespace
def fake_method
def did_init1=(_init)
end

def onlyUpdateInstalled=(_mode)
end
end
Update = UpdateClass.new
Expand Down

0 comments on commit 3d36dc4

Please sign in to comment.