Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-online-update for 
openSUSE:Factory checked in at 2021-08-25 20:56:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-online-update (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-online-update.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-online-update"

Wed Aug 25 20:56:37 2021 rev:110 rq:913827 version:4.4.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-online-update/yast2-online-update.changes  
2021-05-02 18:36:22.596881187 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-online-update.new.1899/yast2-online-update.changes
        2021-08-25 20:57:18.393232216 +0200
@@ -1,0 +2,8 @@
+Mon Aug 23 12:53:57 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz>
+
+- Improved openSUSE/SLE detection (bsc#1184243)
+- Improved detecting the update repositories, check the "is_update_repo"
+  repository flag
+- 4.4.1
+
+-------------------------------------------------------------------

Old:
----
  yast2-online-update-4.4.0.tar.bz2

New:
----
  yast2-online-update-4.4.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-online-update.spec ++++++
--- /var/tmp/diff_new_pack.U7Sjnn/_old  2021-08-25 20:57:18.849231617 +0200
+++ /var/tmp/diff_new_pack.U7Sjnn/_new  2021-08-25 20:57:18.849231617 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-online-update
-Version:        4.4.0
+Version:        4.4.1
 Release:        0
 URL:            https://github.com/yast/yast-online-update
 Summary:        YaST2 - Online Update (YOU)

++++++ yast2-online-update-4.4.0.tar.bz2 -> yast2-online-update-4.4.1.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-online-update-4.4.0/package/yast2-online-update.changes 
new/yast2-online-update-4.4.1/package/yast2-online-update.changes
--- old/yast2-online-update-4.4.0/package/yast2-online-update.changes   
2021-04-30 18:18:09.000000000 +0200
+++ new/yast2-online-update-4.4.1/package/yast2-online-update.changes   
2021-08-23 16:33:14.000000000 +0200
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Mon Aug 23 12:53:57 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz>
+
+- Improved openSUSE/SLE detection (bsc#1184243)
+- Improved detecting the update repositories, check the "is_update_repo"
+  repository flag
+- 4.4.1
+
+-------------------------------------------------------------------
 Tue Apr 20 13:51:55 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz>
 
 - 4.4.0 (bsc#1185510)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-online-update-4.4.0/package/yast2-online-update.spec 
new/yast2-online-update-4.4.1/package/yast2-online-update.spec
--- old/yast2-online-update-4.4.0/package/yast2-online-update.spec      
2021-04-30 18:18:09.000000000 +0200
+++ new/yast2-online-update-4.4.1/package/yast2-online-update.spec      
2021-08-23 16:33:14.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-online-update
-Version:        4.4.0
+Version:        4.4.1
 Release:        0
 Url:            https://github.com/yast/yast-online-update
 Summary:        YaST2 - Online Update (YOU)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-online-update-4.4.0/src/clients/online_update.rb 
new/yast2-online-update-4.4.1/src/clients/online_update.rb
--- old/yast2-online-update-4.4.0/src/clients/online_update.rb  2021-04-30 
18:18:09.000000000 +0200
+++ new/yast2-online-update-4.4.1/src/clients/online_update.rb  2021-08-23 
16:33:14.000000000 +0200
@@ -23,8 +23,13 @@
 # Authors:     Gabriele Strattner <g...@suse.de>
 #              Stefan Schubert <sch...@suse.de>
 #              Cornelius Schumacher <csc...@suse.de>
+
+require "y2packager/resolvable"
+
 module Yast
   class OnlineUpdateClient < Client
+    include Yast::Logger
+
     def main
       Yast.import "Pkg"
 
@@ -107,7 +112,7 @@
           OnlineUpdate.simple_mode = true
         elsif @arg == path(".auto.get") || @arg == ".auto.get"
           Builtins.y2warning(
-            ".auto.get parameter for online_update is OBSOLETE, use zypper or 
rug instead."
+            ".auto.get parameter for online_update is OBSOLETE, use zypper 
instead."
           )
         end
         @arg_n = Ops.add(@arg_n, 1)
@@ -178,30 +183,24 @@
       Progress.NextStage
 
       if !OnlineUpdate.cd_update # CD for cd update was not initialized yet
-        is_available = false
-        # FIXME bnc#459527
-        # current update repositories are still not tagged with is_update_repo
-        # foreach (map source, Pkg::SourceEditGet (), {
-        #      integer srcid   = source["SrcId"]:-1;
-        #      map data        = Pkg::SourceGeneralData (srcid);
-        #      if (data["is_update_repo"]:false)
-        #      {
-        #          is_available        = true;
-        #          break;
-        #      }
-        # });
-        # old way: check if there is any patch for installation
-        Builtins.foreach(Pkg.ResolvableProperties("", :patch, "")) do |patch|
-          if Ops.get_symbol(patch, "status", :none) == :available
-            is_available = true
-            raise Break
-          end
+        # an update repository is available?
+        is_available = Pkg.SourceGetCurrent(true).any? do |repo|
+          source_data = Pkg.SourceGeneralData(repo)
+          update_repo = source_data["is_update_repo"]
+          log.info("Update repository found: #{source_data["url"]}") if 
update_repo
+          update_repo
+        end
+
+        # that repository flag might not be reliable, check if a patch is 
available
+        if !is_available
+          is_available = Y2Packager::Resolvable.any?(kind: :patch, status: 
:available)
+          log.info("Patch is available: #{is_available}")
         end
 
         if !is_available
           # inst_scc is able to register the system and add update repos for 
SLE,
           # for openSUSE, let's use repository manager
-          client = (Product.short_name == "openSUSE") ? "repositories" : 
"inst_scc"
+          client = Product.short_name.match?(/openSUSE/i) ? "repositories" : 
"inst_scc"
 
           if WFM.ClientExists(client)
             if Popup.YesNo(

Reply via email to