Skip to content

Commit

Permalink
use for cfa and execute real switched scr
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Mar 22, 2017
1 parent 8417126 commit bf22c7d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 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
6 changes: 3 additions & 3 deletions package/yast2.spec
Expand Up @@ -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 bf22c7d

Please sign in to comment.