Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-ruby-bindings for 
openSUSE:Factory checked in at 2022-05-25 20:34:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ruby-bindings (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new.2254 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-ruby-bindings"

Wed May 25 20:34:02 2022 rev:118 rq:978964 version:4.5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ruby-bindings/yast2-ruby-bindings.changes  
2022-04-14 17:24:25.163190029 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new.2254/yast2-ruby-bindings.changes
        2022-05-25 20:34:09.644194027 +0200
@@ -1,0 +2,7 @@
+Tue May 24 08:37:42 UTC 2022 - Ladislav Slez??k <lsle...@suse.cz>
+
+- Added experimental infrastructure for managing system in
+  a chroot (bsc#1199840)
+- 4.5.1
+
+-------------------------------------------------------------------

Old:
----
  yast2-ruby-bindings-4.5.0.tar.bz2

New:
----
  yast2-ruby-bindings-4.5.1.tar.bz2

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

Other differences:
------------------
++++++ yast2-ruby-bindings.spec ++++++
--- /var/tmp/diff_new_pack.NmYWuf/_old  2022-05-25 20:34:10.128194703 +0200
+++ /var/tmp/diff_new_pack.NmYWuf/_new  2022-05-25 20:34:10.136194713 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ruby-bindings
-Version:        4.5.0
+Version:        4.5.1
 Release:        0
 URL:            https://github.com/yast/yast-ruby-bindings
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-ruby-bindings-4.5.0.tar.bz2 -> yast2-ruby-bindings-4.5.1.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-4.5.0/package/yast2-ruby-bindings.changes 
new/yast2-ruby-bindings-4.5.1/package/yast2-ruby-bindings.changes
--- old/yast2-ruby-bindings-4.5.0/package/yast2-ruby-bindings.changes   
2022-04-12 13:37:22.000000000 +0200
+++ new/yast2-ruby-bindings-4.5.1/package/yast2-ruby-bindings.changes   
2022-05-24 14:46:08.000000000 +0200
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Tue May 24 08:37:42 UTC 2022 - Ladislav Slez??k <lsle...@suse.cz>
+
+- Added experimental infrastructure for managing system in
+  a chroot (bsc#1199840)
+- 4.5.1
+
+-------------------------------------------------------------------
 Wed Apr 06 13:24:58 UTC 2022 - Ladislav Slez??k <lsle...@suse.cz>
 
 - Bump version to 4.5.0 (bsc#1198109)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-4.5.0/package/yast2-ruby-bindings.spec 
new/yast2-ruby-bindings-4.5.1/package/yast2-ruby-bindings.spec
--- old/yast2-ruby-bindings-4.5.0/package/yast2-ruby-bindings.spec      
2022-04-12 13:37:22.000000000 +0200
+++ new/yast2-ruby-bindings-4.5.1/package/yast2-ruby-bindings.spec      
2022-05-24 14:46:08.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ruby-bindings
-Version:        4.5.0
+Version:        4.5.1
 Release:        0
 URL:            https://github.com/yast/yast-ruby-bindings
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-4.5.0/src/ruby/yast/y2start_helpers.rb 
new/yast2-ruby-bindings-4.5.1/src/ruby/yast/y2start_helpers.rb
--- old/yast2-ruby-bindings-4.5.0/src/ruby/yast/y2start_helpers.rb      
2022-04-12 13:37:22.000000000 +0200
+++ new/yast2-ruby-bindings-4.5.1/src/ruby/yast/y2start_helpers.rb      
2022-05-24 14:46:08.000000000 +0200
@@ -1,3 +1,6 @@
+
+require "yast"
+
 module Yast
   module Y2StartHelpers
     # Configure global environment for YaST
@@ -114,6 +117,16 @@
       left_title + architecture.rjust(78-left_title.size)
     end
 
+    # Open a new SCR instance with chroot
+    #
+    # @param target [String] the chroot target location
+    # @return [Integer] the original SCR handle
+    def self.redirect_scr(target)
+      old_handle = Yast::WFM.SCRGetDefault
+      handle = Yast::WFM.SCROpen("chroot=#{target}:scr", false)
+      Yast::WFM.SCRSetDefault(handle)
+      old_handle
+    end
 
     # client returned special result, this is used as offset (or as generic 
error)
     RES_CLIENT_RESULT = 16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-4.5.0/src/y2start/y2start 
new/yast2-ruby-bindings-4.5.1/src/y2start/y2start
--- old/yast2-ruby-bindings-4.5.0/src/y2start/y2start   2022-04-12 
13:37:22.000000000 +0200
+++ new/yast2-ruby-bindings-4.5.1/src/y2start/y2start   2022-05-24 
14:46:08.000000000 +0200
@@ -55,6 +55,14 @@
 Yast::UI.SetApplicationTitle(
   Yast::Y2StartHelpers.application_title(args[:client_name])) if set_title
 
+target_dir = ENV["YAST_SCR_TARGET"] || ""
+if !target_dir.empty? && target_dir != "/"
+  if File.directory?(target_dir)
+    Yast::Y2StartHelpers.redirect_scr(target_dir)
+  else
+    abort "Cannot set the target, directory #{target_dir} not found"
+  end
+end
 
 exit Yast::Y2StartHelpers.generate_exit_code(
   Yast::WFM.CallFunction(args[:client_name], args[:client_options][:params])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-4.5.0/tests/y2start_helpers_spec.rb 
new/yast2-ruby-bindings-4.5.1/tests/y2start_helpers_spec.rb
--- old/yast2-ruby-bindings-4.5.0/tests/y2start_helpers_spec.rb 2022-04-12 
13:37:22.000000000 +0200
+++ new/yast2-ruby-bindings-4.5.1/tests/y2start_helpers_spec.rb 2022-05-24 
14:46:08.000000000 +0200
@@ -137,4 +137,18 @@
       expect(subject.generate_exit_code(3)).to eq 19
     end
   end
+
+  describe ".redirect_scr" do
+    it "opens a new SCR with chroot option" do
+      target = "/mnt"
+      handle = 42
+
+      allow(Yast::WFM).to receive(:SCRGetDefault)
+      expect(Yast::WFM).to receive(:SCROpen).with("chroot=#{target}:scr", 
false)
+        .and_return(handle)
+      expect(Yast::WFM).to receive(:SCRSetDefault).with(handle)
+
+      subject.redirect_scr(target)
+    end
+  end
 end

Reply via email to