From 17aaf2d8b60caad06ed75618e0762dd10f5ce835 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Fri, 4 Sep 2009 12:15:47 +0200 Subject: [PATCH] Provide the target root via ZConfig::systemRoot. --- zypp/ZConfig.cc | 6 ++++++ zypp/ZConfig.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/zypp/ZConfig.cc b/zypp/ZConfig.cc index 8a2cebe..299ee31 100644 --- a/zypp/ZConfig.cc +++ b/zypp/ZConfig.cc @@ -499,6 +499,12 @@ namespace zypp ZConfig::~ZConfig( ) {} + Pathname ZConfig::systemRoot() const + { + Target_Ptr target( getZYpp()->getTarget() ); + return target ? target->root() : Pathname(); + } + /////////////////////////////////////////////////////////////////// // // system architecture diff --git a/zypp/ZConfig.h b/zypp/ZConfig.h index c5bb921..a2f4e11 100644 --- a/zypp/ZConfig.h +++ b/zypp/ZConfig.h @@ -65,6 +65,11 @@ namespace zypp public: + /** The target root directory. */ + Pathname systemRoot() const; + + public: + /** The autodetected system architecture. */ static Arch defaultSystemArchitecture(); -- 2.7.4