Skip to content

Commit

Permalink
display downloaded Beta warning (bnc#882034)
Browse files Browse the repository at this point in the history
removed hardcoded text (temporary workaround)
  • Loading branch information
lslezak committed Jun 23, 2014
1 parent ceddd6a commit 0633b73
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 32 deletions.
1 change: 1 addition & 0 deletions package/yast2-registration.changes
Expand Up @@ -11,6 +11,7 @@ Fri Jun 20 10:24:04 UTC 2014 - lslezak@suse.cz
workflow
- added a popup for changing the registration server URL
(bnc#883138)
- removed Beta warning workaround (bnc#882034)

-------------------------------------------------------------------
Mon Jun 16 16:05:20 UTC 2014 - lslezak@suse.cz
Expand Down
41 changes: 9 additions & 32 deletions src/lib/registration/ui/addon_eula_dialog.rb
Expand Up @@ -100,8 +100,11 @@ def accept_eula(addon)
Yast::ProductLicense.DisplayLicenseDialogWithTitle(eulas.keys, enable_back,
eula_lang(eulas.keys), arg_ref(eulas), id, title)

# TODO FIXME: this a workaround, remove before RC/GM!!
display_beta_warning(addon.label)
# display info file if present
display_optional_info(File.join(tmpdir, "info.txt"))

# display beta warning if present
display_optional_info(File.join(tmpdir, "README.BETA"))

base_product = false
action = "abort"
Expand Down Expand Up @@ -159,36 +162,10 @@ def remove_country_suffix(code)
code.sub(/_.*\z/, "")
end

# TODO FIXME: this a workaround, remove before RC/GM!!
def display_beta_warning(addon_name)
beta_warning = <<EOF
#{addon_name}
Attention! You are accessing our Beta Distribution. If you install
any package, note that we can NOT GIVE ANY SUPPORT for your system -
no matter if you update from a previous system or do a complete
new installation.
Use this BETA distribution at your own risk! We recommend it for
testing, porting and evaluation purposes but not for any critical
production systems.
Use this distribution at your own risk - and remember to have a
lot of fun! :)
Your SUSE Linux Enterprise Team
EOF

# InstShowInfo reads the text from a file so use a tempfile
file = Tempfile.new("beta-warning-")
begin
file.write(beta_warning)
file.close
Yast::InstShowInfo.show_info_txt(file.path)
ensure
file.unlink
end
# read a file if it exists and display it in a popup
# @param info_file [String] the message is read from this file
def display_optional_info(info_file)
Yast::InstShowInfo.show_info_txt(info_file) if File.exist?(info_file)
end

end
Expand Down

0 comments on commit 0633b73

Please sign in to comment.