Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2 for openSUSE:Factory checked 
in at 2023-11-02 20:20:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Thu Nov  2 20:20:55 2023 rev:554 rq:1121597 version:5.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes      2023-10-25 
18:02:42.586189244 +0200
+++ /work/SRC/openSUSE:Factory/.yast2.new.17445/yast2.changes   2023-11-02 
20:21:00.550818499 +0100
@@ -1,0 +2,6 @@
+Wed Nov  1 08:35:38 UTC 2023 - Ladislav Slezák <lsle...@suse.com>
+
+- Added Repository#refresh method (related to bsc#1215884)
+- 5.0.3
+
+-------------------------------------------------------------------

Old:
----
  yast2-5.0.2.tar.bz2

New:
----
  yast2-5.0.3.tar.bz2

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

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.Da71Yn/_old  2023-11-02 20:21:01.490853089 +0100
+++ /var/tmp/diff_new_pack.Da71Yn/_new  2023-11-02 20:21:01.490853089 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        5.0.2
+Version:        5.0.3
 
 Release:        0
 Summary:        YaST2 Main Package

++++++ yast2-5.0.2.tar.bz2 -> yast2-5.0.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-5.0.2/library/packages/src/lib/y2packager/repository.rb 
new/yast2-5.0.3/library/packages/src/lib/y2packager/repository.rb
--- old/yast2-5.0.2/library/packages/src/lib/y2packager/repository.rb   
2023-10-25 15:31:25.000000000 +0200
+++ new/yast2-5.0.3/library/packages/src/lib/y2packager/repository.rb   
2023-11-01 11:59:32.000000000 +0100
@@ -253,6 +253,29 @@
       true
     end
 
+    # Refresh the repository metadata on disk.
+    #
+    # If the repository is loaded in memory you need to reload the repositories
+    # again to activate the changes.
+    #
+    # During refresh the progress callbacks might be executed.
+    #
+    # @param force [Boolean] Force refreshing the data unconditionally.
+    #   Disabled by default, libzypp checks the metadata time
+    #   stamp and skips refresh if the repository has been refreshed not long 
ago.
+    #   See the "repo.refresh.delay" option in /etc/zypp/zypp.conf file.
+    # @return [Boolean] true on success, false otherwise
+    #
+    # @see Yast::Pkg.SourceRefreshNow
+    # @see Yast::Pkg.SourceForceRefreshNow
+    def refresh(force: false)
+      if force
+        Yast::Pkg.SourceForceRefreshNow(repo_id)
+      else
+        Yast::Pkg.SourceRefreshNow(repo_id)
+      end
+    end
+
     # Change the repository URL
     #
     # The URL will be changed only in memory. Calling to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-5.0.2/library/packages/test/repository_test.rb 
new/yast2-5.0.3/library/packages/test/repository_test.rb
--- old/yast2-5.0.2/library/packages/test/repository_test.rb    2023-10-25 
15:31:25.000000000 +0200
+++ new/yast2-5.0.3/library/packages/test/repository_test.rb    2023-11-01 
11:59:32.000000000 +0100
@@ -289,6 +289,23 @@
     end
   end
 
+  describe "#refresh" do
+    it "runs the refresh only when needed if called without parameters" do
+      expect(Yast::Pkg).to receive(:SourceRefreshNow).with(repo.repo_id)
+      repo.refresh
+    end
+
+    it "runs the refresh only when needed if the force parameter is false" do
+      expect(Yast::Pkg).to receive(:SourceRefreshNow).with(repo.repo_id)
+      repo.refresh(force: false)
+    end
+
+    it "always runs the refresh if the force parameter is true" do
+      expect(Yast::Pkg).to receive(:SourceForceRefreshNow).with(repo.repo_id)
+      repo.refresh(force: true)
+    end
+  end
+
   describe "#products" do
     let(:products_data) { [product] }
     let(:product) do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-5.0.2/package/yast2.changes 
new/yast2-5.0.3/package/yast2.changes
--- old/yast2-5.0.2/package/yast2.changes       2023-10-25 15:31:25.000000000 
+0200
+++ new/yast2-5.0.3/package/yast2.changes       2023-11-01 11:59:32.000000000 
+0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Wed Nov  1 08:35:38 UTC 2023 - Ladislav Slezák <lsle...@suse.com>
+
+- Added Repository#refresh method (related to bsc#1215884)
+- 5.0.3
+
+-------------------------------------------------------------------
 Wed Oct 25 11:16:21 UTC 2023 - Knut Anderssen <kanders...@suse.com>
 
 - Fix firewalld zones reader adapting it to the new firewall-cmd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-5.0.2/package/yast2.spec 
new/yast2-5.0.3/package/yast2.spec
--- old/yast2-5.0.2/package/yast2.spec  2023-10-25 15:31:25.000000000 +0200
+++ new/yast2-5.0.3/package/yast2.spec  2023-11-01 11:59:32.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        5.0.2
+Version:        5.0.3
 
 Release:        0
 Summary:        YaST2 Main Package

Reply via email to