Skip to content

Commit

Permalink
Merge 2f979d7 into 89e21fc
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Jul 14, 2016
2 parents 89e21fc + 2f979d7 commit 46e306d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ before_install:
# disable rvm, use system Ruby
- rvm reset
- wget https://raw.githubusercontent.com/yast/yast-devtools/master/travis-tools/travis_setup.sh
- sh ./travis_setup.sh -p "yast2-devtools yast2 yast2-packager yast2-installation yast2-update yast2-country rake" -g "gettext yast-rake yard rspec:3.3.0 simplecov coveralls rubocop:0.29.1"
- sh ./travis_setup.sh -p "yast2-devtools yast2 yast2-packager yast2-installation yast2-update yast2-country rake" -g "gettext yast-rake yard rspec:3.3.0 simplecov coveralls rubocop:0.41.2"
script:
- rake check:syntax
- rake check:pot
Expand Down
13 changes: 7 additions & 6 deletions src/lib/migration/main_workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ class MainWorkflow
include Yast::I18n

FIND_CONFIG_CMD = "/usr/bin/snapper --no-dbus list-configs | " \
"grep \"^root \" >/dev/null"
"grep \"^root \" >/dev/null".freeze

CREATE_SNAPSHOT_CMD = "/usr/bin/snapper create --type=%{snapshot_type} " \
"--cleanup-algorithm=number --print-number --userdata important=yes " \
"--description=\"%{description}\""
"--description=\"%{description}\"".freeze

def self.run
workflow = new
Expand Down Expand Up @@ -88,7 +88,7 @@ def run
next: "repositories"
},
"restart_after_update" => {
restart: :restart
restart: :restart
},
"repositories" => {
abort: :abort,
Expand All @@ -108,7 +108,7 @@ def run
next: "restart_after_migration"
},
"restart_after_migration" => {
restart: :restart
restart: :restart
},
# note: the steps after the YaST restart use the new code from
# the updated (migrated) yast2-migration package!!
Expand All @@ -123,7 +123,7 @@ def run
abort: :abort,
next: :next
}
}
}.freeze

def aliases
{
Expand Down Expand Up @@ -218,7 +218,8 @@ def display_abort_message
"\n" \
"We strongly recommend to rollback to a snapshot created before the\n" \
"migration was started (via selecting the snapshot in the boot menu\n" \
"if you use snapper) or restore the system from a backup."))
"if you use snapper) or restore the system from a backup.")
)
end

def create_pre_snapshot
Expand Down
4 changes: 2 additions & 2 deletions src/lib/migration/proposal_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ProposalClient < ::Installation::ProposalClient
include Yast::I18n

# ID prefix used in the proposal links
LINK_PREFIX = "migration--disable_repository_"
LINK_PREFIX = "migration--disable_repository_".freeze

def initialize
Yast.import "Pkg"
Expand Down Expand Up @@ -173,7 +173,7 @@ def proposal_warning(warnings, links)
def disable_repo(link)
log.info "Activated link: #{link}"

link.match(/^#{LINK_PREFIX}(\d+)/)
link =~ /^#{LINK_PREFIX}(\d+)/
repo = Regexp.last_match(1).to_i

log.info "Disabling repository #{repo}"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/migration/proposal_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class ProposalStore < Installation::ProposalStore
include Yast::Logger
include Yast::I18n

PROPOSAL_NAMES = ["migration_proposal", "packages_proposal"]
PROPOSAL_NAMES = ["migration_proposal", "packages_proposal"].freeze
PROPOSAL_PROPERTIES = {
"enable_skip" => "false"
}
}.freeze
MODULES_ORDER = PROPOSAL_NAMES

def initialize(_unused_mode)
Expand Down

0 comments on commit 46e306d

Please sign in to comment.