Skip to content

Commit

Permalink
Merge pull request #50 from yast/check_base_product
Browse files Browse the repository at this point in the history
check the base product at start to avoid problems later
  • Loading branch information
lslezak committed Apr 17, 2014
2 parents 3debafa + 36ab095 commit b9a9b76
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions package/yast2-registration.changes
Expand Up @@ -3,6 +3,7 @@ Thu Apr 17 09:45:50 UTC 2014 - lslezak@suse.cz

- check the libzypp lock at start, do not continue if libzypp is
already locked by another application (bnc#873882)
- check the base product at start to avoid problems later

-------------------------------------------------------------------
Tue Apr 15 16:47:27 UTC 2014 - lslezak@suse.cz
Expand Down
8 changes: 8 additions & 0 deletions src/clients/inst_scc.rb
Expand Up @@ -681,6 +681,13 @@ def display_registered_dialog
end

def registration_check
# check the base product at start to avoid problems later
if ::Registration::SwMgmt.find_base_product.nil?
# error message
Report.Error(_("The base product was not found,\ncheck your system."))
return Mode.normal ? :abort : :auto
end

if Mode.normal && ::Registration::Registration.is_registered?
return display_registered_dialog
else
Expand All @@ -702,6 +709,7 @@ def start_workflow
sequence = {
"ws_start" => "check",
"check" => {
:auto => :auto,
:abort => :abort,
:cancel => :abort,
:register => "register",
Expand Down

0 comments on commit b9a9b76

Please sign in to comment.