Skip to content

Commit

Permalink
Merge pull request #102 from yast/beta_warning_workaround
Browse files Browse the repository at this point in the history
display a fixed Beta warning for all online extensions
  • Loading branch information
lslezak committed Jun 11, 2014
2 parents 4692f59 + 689018c commit 3024cde
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
7 changes: 7 additions & 0 deletions package/yast2-registration.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jun 11 12:42:53 UTC 2014 - lslezak@suse.cz

- display a fixed Beta warning for all online extensions
(temporary workaround for bnc#882034)
- 3.1.70

-------------------------------------------------------------------
Mon Jun 9 11:26:18 UTC 2014 - lslezak@suse.cz

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-registration.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-registration
Version: 3.1.69
Version: 3.1.70
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
39 changes: 39 additions & 0 deletions src/lib/registration/ui/addon_eula_dialog.rb
Expand Up @@ -3,6 +3,9 @@
require "registration/eula_downloader"
require "registration/helpers"

# TODO FIXME: this is used in a workaround, remove before RC/GM!!
require "tempfile"

module Registration
module UI

Expand All @@ -18,6 +21,7 @@ class AddonEulaDialog
Yast.import "ProductLicense"
Yast.import "Report"
Yast.import "Wizard"
Yast.import "InstShowInfo"

# create a new dialog for accepting importing a SSL certificate and run it
def self.run(selected_addons)
Expand Down Expand Up @@ -96,6 +100,9 @@ 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.short_name)

base_product = false
action = "abort"
ret = Yast::ProductLicense.HandleLicenseDialogRet(arg_ref(eulas), base_product, action)
Expand Down Expand Up @@ -152,6 +159,38 @@ 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
end

end
end
end
Expand Down

0 comments on commit 3024cde

Please sign in to comment.