ref: refs/heads/master
commit 17aaf2d8b60caad06ed75618e0762dd10f5ce835
Author: Michael Andres
Date: Fri Sep 4 12:15:47 2009 +0200
Provide the target root via ZConfig::systemRoot.
---
zypp/ZConfig.cc | 6 ++++++
zypp/ZConfig.h | 5 +++++
2 files changed, 11 insertions(+), 0 deletions(-)
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();
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org