[yast-commit] [ci_new_pac] JFYI yast2-online-update -> sle12
Script 'mail_helper' called by ro Hello packager, This is just FYI. Your package was checked in in distribution "sle12" by autobuild-member: ro. Here comes the log... ---------------------------%<------------------------------ Hi, here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2-online-update -> sle12 Changes: -------- --- /work/SRC/SUSE:SLE-12:GA/yast2-online-update/yast2-online-update.changes 2014-02-11 18:23:01.000000000 +0100 +++ /mounts/work_src_done/SLE12/yast2-online-update/yast2-online-update.changes 2014-03-07 18:14:26.000000000 +0100 @@ -1,0 +2,7 @@ +Fri Mar 7 17:21:05 CET 2014 - locilka@suse.com + +- Reporting products that have reached their end of support when + Online Update module is started (FATE#316172) +- 3.1.3 + +------------------------------------------------------------------- calling whatdependson for sle12-i586 Packages directly triggered for rebuild: - yast2-online-update - yast2-schema ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/SUSE:SLE-12:GA/yast2-online-update (Old) and /mounts/work_src_done/SLE12/yast2-online-update (BS:build ID:34084 MAIL:yast-commit@opensuse.org) (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-online-update", Maintainer is "yast-commit@opensuse.org" Old: ---- yast2-online-update-3.1.2.tar.bz2 New: ---- yast2-online-update-3.1.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-online-update.spec ++++++ --- /var/tmp/diff_new_pack.3lXw52/_old 2014-03-10 16:13:10.000000000 +0100 +++ /var/tmp/diff_new_pack.3lXw52/_new 2014-03-10 16:13:10.000000000 +0100 @@ -17,8 +17,9 @@ Name: yast2-online-update -Version: 3.1.2 +Version: 3.1.3 Release: 0 +Url: https://github.com/yast/yast-online-update BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %{name}-%{version}.tar.bz2 @@ -28,8 +29,8 @@ BuildRequires: gcc-c++ libtool update-desktop-files yast2-packager BuildRequires: yast2-devtools >= 3.1.10 BuildRequires: rubygem-rspec -# patch contents -Requires: yast2-pkg-bindings >= 2.23.0 +# Product EOL tag +Requires: yast2-pkg-bindings >= 3.1.6 # Kernel::InformAboutKernelChange Requires: yast2 >= 2.23.8 # PackageCallbacks::FormatPatchName ++++++ yast2-online-update-3.1.2.tar.bz2 -> yast2-online-update-3.1.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-online-update-3.1.2/package/yast2-online-update.changes new/yast2-online-update-3.1.3/package/yast2-online-update.changes --- old/yast2-online-update-3.1.2/package/yast2-online-update.changes 2014-02-11 09:23:16.000000000 +0100 +++ new/yast2-online-update-3.1.3/package/yast2-online-update.changes 2014-03-07 18:09:39.000000000 +0100 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Mar 7 17:21:05 CET 2014 - locilka@suse.com + +- Reporting products that have reached their end of support when + Online Update module is started (FATE#316172) +- 3.1.3 + +------------------------------------------------------------------- Mon Feb 10 10:44:16 CET 2014 - locilka@suse.com - Added functionality which informs user that some of the selected diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-online-update-3.1.2/package/yast2-online-update.spec new/yast2-online-update-3.1.3/package/yast2-online-update.spec --- old/yast2-online-update-3.1.2/package/yast2-online-update.spec 2014-02-11 09:23:16.000000000 +0100 +++ new/yast2-online-update-3.1.3/package/yast2-online-update.spec 2014-03-07 18:09:39.000000000 +0100 @@ -17,8 +17,9 @@ Name: yast2-online-update -Version: 3.1.2 +Version: 3.1.3 Release: 0 +Url: https://github.com/yast/yast-online-update BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %{name}-%{version}.tar.bz2 @@ -28,8 +29,8 @@ BuildRequires: gcc-c++ libtool update-desktop-files yast2-packager BuildRequires: yast2-devtools >= 3.1.10 BuildRequires: rubygem-rspec -# patch contents -Requires: yast2-pkg-bindings >= 2.23.0 +# Product EOL tag +Requires: yast2-pkg-bindings >= 3.1.6 # Kernel::InformAboutKernelChange Requires: yast2 >= 2.23.8 # PackageCallbacks::FormatPatchName diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-online-update-3.1.2/src/clients/online_update_select.rb new/yast2-online-update-3.1.3/src/clients/online_update_select.rb --- old/yast2-online-update-3.1.2/src/clients/online_update_select.rb 2014-02-11 09:23:16.000000000 +0100 +++ new/yast2-online-update-3.1.3/src/clients/online_update_select.rb 2014-03-07 18:09:39.000000000 +0100 @@ -71,6 +71,9 @@ return :abort if @canceled end + # FATE#316172: Report products that have reached their end of life + OnlineUpdateDialogs.report_eol_products + @restart_yast = false @reboot_needed = false @relogin_needed = false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-online-update-3.1.2/src/modules/OnlineUpdateDialogs.rb new/yast2-online-update-3.1.3/src/modules/OnlineUpdateDialogs.rb --- old/yast2-online-update-3.1.2/src/modules/OnlineUpdateDialogs.rb 2014-02-11 09:23:16.000000000 +0100 +++ new/yast2-online-update-3.1.3/src/modules/OnlineUpdateDialogs.rb 2014-03-07 18:09:39.000000000 +0100 @@ -496,6 +496,22 @@ confirm_rebooting_patches end + # Reports products that have reached their end of life (EOL) support + # + # @return [Boolean] whether all products are still alive + def report_eol_products + products_to_report = eol_products + return true if products_to_report.empty? + + product_names = products_to_report.map do |product| + log.warn "Product out of support: #{product.inspect}" + product["display_name"] || product["name"] || product["short_name"] + end + + show_eol_products(product_names) + false + end + publish :function => :IgnoreWarningPopup, :type => "symbol (string, string)" publish :function => :IgnorePopup, :type => "symbol (string, string)" publish :function => :SkipPopup, :type => "symbol (string, string)" @@ -505,6 +521,57 @@ publish :function => :DisplayMsgYouOk, :type => "boolean (string, string, string)" publish :function => :MessagePopup, :type => "boolean (list <map>, boolean)" publish :function => :validate_selected_patches, :type => "boolean ()" + publish :function => :report_eol_products, :type => "boolean ()" + + private + + MAX_PRODUCTS_WIDGET_HEIGHT = 12 + + def show_eol_products(products) + # 2 is an additional constant for borders + min_richtext_heigth = [products.size, MAX_PRODUCTS_WIDGET_HEIGHT].min + 2 + + dialog_description = HBox( + HSpacing(2), + VBox( + HSpacing(65), + # Dialog label above a list of products (out of support) + Left(Label(_( + "These products have reached their end of general support\n" + + "and thus do not provide new updates anymore.\n\n" + + "In case that your subscription contains extended support,\n" + + "please make sure that you have activated the extension.\n\n" + + "Contact us if you need further assistance." + ))), + MinHeight( + min_richtext_heigth, + RichText(Opt(:vstretch), products.sort.join("<br>")) + ), + PushButton(Id(:ok), Opt(:default), Label.OKButton), + ), + HSpacing(2) + ) + + UI.OpenDialog(dialog_description) + user_ret = UI.UserInput + UI.CloseDialog + end + + # Returns all products over the end of life support + def eol_products + time_now = Time.now.to_i + + installed_products.select do |p| + p["eol"] && p["eol"].to_i < time_now + end + end + + # Returns all installed products + def installed_products + Pkg.ResolvableProperties("", :product, "").select do |p| + p["status"] == :installed + end + end end OnlineUpdateDialogs = OnlineUpdateDialogsClass.new diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-online-update-3.1.2/test/online_update_dialogs_test.rb new/yast2-online-update-3.1.3/test/online_update_dialogs_test.rb --- old/yast2-online-update-3.1.2/test/online_update_dialogs_test.rb 2014-02-11 09:23:16.000000000 +0100 +++ new/yast2-online-update-3.1.3/test/online_update_dialogs_test.rb 2014-03-07 18:09:39.000000000 +0100 @@ -8,18 +8,20 @@ Yast.import "Pkg" Yast.import "UI" -DEFAULT_PATCH = { +def default_patch +{ "status" => :selected, "name" => "patch_#{$patch_id}", "reboot_needed" => false, "description" => "...", "arch" => "noarch", } +end def patch(args = {}) $patch_id ||= 0 $patch_id += 1 - DEFAULT_PATCH.merge(args) + default_patch.merge(args) end # Two patches have "reboot_needed" => true @@ -28,6 +30,53 @@ # All patches are "reboot_needed" => false PATCHES_WITHOUT_REBOOTING = Array.new(4){ patch } +def default_product +{ + "arch" => "x86_64", + "category" => "base", + "description" => "...", + "display_name" => "openSUSE v#{$product_id}", + "download_size" => 0, + "flags" => [], + "flavor" => "dvd-promo", + "inst_size" => 0, + "locked" => false, + "medium_nr" => 0, + "name" => "openSUSE", + "product_file" => "/etc/products.d/openSUSE.prod", + "register_release" => "", + "register_target" => "openSUSE-800.#{$product_id}-x86_64", + "relnotes_url" => "http://doc.opensuse.org/release-notes/x86_64/openSUSE/800.#{$product_id}/release-notes-openSUSE.rpm", + "relnotes_urls" => ["http://doc.opensuse.org/release-notes/x86_64/openSUSE/800.#{$product_id}/release-notes-openSUSE.rpm"], + "short_name" => "openSUSE", + "source" => -1, + "status" => :unknown, + "summary" => "openSUSE Product #{$product_id}", + "transact_by" => :solver, + "type" => "base", + "update_urls" => [], + "upgrades" => [], + "vendor" => "openSUSE", + "version" => "800.#{$product_id}-1.123456" +} +end + +def product(args = {}) + $product_id ||= 0 + $product_id += 1 + default_product.merge(args) +end + +AVAILABLE_PRODUCTS = Array.new(2){ product("status" => :available) } + +# Products after end of life +EOL_TIME = Time.now.to_i - 123456 +EOL_PRODUCTS = Array.new(2){ product("status" => :installed, "eol" => EOL_TIME) } + +# Products before end of life +NON_EOL_TIME = Time.now.to_i + 123456 +NON_EOL_PRODUCTS = Array.new(2){ product("status" => :installed, "eol" => NON_EOL_TIME) } + describe "OnlineUpdateDialogs" do before(:each) do Yast::Pkg.stub(:ResolvableProperties).and_return(PATCHES) @@ -106,4 +155,27 @@ expect { Yast::OnlineUpdateDialogs.confirm_rebooting_patches }.to raise_error end end + + describe "#report_eol_products" do + it "reports all products that have ended their support" do + Yast::UI.stub(:OpenDialog).and_return(true) + Yast::UI.stub(:UserInput).and_return(:ok) + Yast::UI.stub(:CloseDialog).and_return(true) + + # These products are still alive + Yast::Pkg.stub(:ResolvableProperties).and_return(AVAILABLE_PRODUCTS + NON_EOL_PRODUCTS) + expect(Yast::OnlineUpdateDialogs.report_eol_products).to be_true + + # Some of these products have reached their EOL + Yast::Pkg.stub(:ResolvableProperties).and_return(AVAILABLE_PRODUCTS + EOL_PRODUCTS + NON_EOL_PRODUCTS) + expect(Yast::OnlineUpdateDialogs.report_eol_products).to be_false + end + end + + describe "#eol_products" do + it "returns all products that are out of support" do + Yast::Pkg.stub(:ResolvableProperties).and_return(AVAILABLE_PRODUCTS + EOL_PRODUCTS + NON_EOL_PRODUCTS) + expect(Yast::OnlineUpdateDialogs.send(:eol_products)).to eq(EOL_PRODUCTS) + end + end end continue with "q"... Checked in at Mon Mar 10 16:13:26 CET 2014 by ro Remember to have fun... -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
ro