Skip to content

Commit

Permalink
Merge pull request #556 from yast/cfa_switched_scr
Browse files Browse the repository at this point in the history
Cfa switched scr
  • Loading branch information
jreidinger committed Mar 23, 2017
2 parents 6d543e1 + 36408d6 commit 0afaf65
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
5 changes: 1 addition & 4 deletions library/system/src/lib/yast2/execute.rb
Expand Up @@ -23,8 +23,6 @@
require "yast"
require "cheetah"

Yast.import "Installation"

module Yast
# Module for executing scripts/programs in safe way. Uses cheetah as backend,
# but adds support for chrooting in installation.
Expand All @@ -39,8 +37,7 @@ class Execute
# @see http://www.rubydoc.info/github/openSUSE/cheetah/Cheetah.run parameter docs
# @raise Cheetah::ExecutionFailed
def self.on_target(*args)
root = "/"
root = Yast::Installation.destdir if Yast::WFM.scr_chrooted?
root = Yast::WFM.scr_root

if args.last.is_a? ::Hash
args.last[:chroot] = root
Expand Down
5 changes: 1 addition & 4 deletions library/system/src/lib/yast2/target_file.rb
Expand Up @@ -24,8 +24,6 @@

require "cfa/base_model"

Yast.import "Installation"

module Yast
# A file handler suitable for CFA::BaseModel (from config_files_api.gem)
# that respects Yast::Installation.destdir. When this class is `require`d,
Expand All @@ -42,8 +40,7 @@ def self.write(path, content)
end

def self.final_path(path)
root = "/"
root = Yast::Installation.destdir if Yast::WFM.scr_chrooted?
root = Yast::WFM.scr_root

::File.join(root, path)
end
Expand Down
8 changes: 8 additions & 0 deletions package/yast2.changes
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Mar 22 16:53:07 UTC 2017 - jreidinger@suse.com

- Use for Yast::TargetFile and Yast::Execute real path where scr
operates. It allows easier switching scr in unit tests.
(needed for testing fix for bsc#1023204)
- 3.2.21

-------------------------------------------------------------------
Wed Mar 22 15:37:51 UTC 2017 - ancor@suse.com

Expand Down
8 changes: 4 additions & 4 deletions package/yast2.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2
Version: 3.2.20
Version: 3.2.21
Release: 0
Summary: YaST2 - Main Package
License: GPL-2.0
Expand All @@ -43,8 +43,8 @@ BuildRequires: rubygem(%{rb_default_ruby_abi}:rspec)
BuildRequires: yast2-core >= 2.18.12
BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: yast2-pkg-bindings >= 2.20.3
# To have Yast::CoreExt::AnsiString
BuildRequires: yast2-ruby-bindings >= 3.1.36
# To have Yast::WFM.scr_root
BuildRequires: yast2-ruby-bindings >= 3.2.8
BuildRequires: yast2-testsuite
BuildRequires: yast2-ycp-ui-bindings >= 3.1.8
# for the PackageExtractor tests, just make sure they are present,
Expand Down Expand Up @@ -76,7 +76,7 @@ Requires: yast2-hardware-detection
Requires: yast2-perl-bindings
# changed StartPackage callback signature
Requires: yast2-pkg-bindings >= 2.20.3
Requires: yast2-ruby-bindings >= 3.1.33
Requires: yast2-ruby-bindings >= 3.2.8
Requires: yast2-xml
# new UI::SetApplicationIcon
Requires: yast2-ycp-ui-bindings >= 3.1.8
Expand Down

0 comments on commit 0afaf65

Please sign in to comment.