diff options
Diffstat (limited to 'src/installtransaction.cpp')
-rw-r--r-- | src/installtransaction.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/installtransaction.cpp b/src/installtransaction.cpp index 9339e30..a561c9e 100644 --- a/src/installtransaction.cpp +++ b/src/installtransaction.cpp @@ -582,11 +582,16 @@ InstallTransaction::calcDependencies( ) return SUCCESS; } + +/* + * getPkgDest assumes that you're in the build directory already + */ string InstallTransaction::getPkgDest(const string& installRoot) { string pkgdest = ""; - string cmd = ". %s/etc/pkgmk.conf && echo $PKGMK_PACKAGE_DIR"; - StringHelper::replaceAll(cmd, "%s", installRoot); + string cmd = "eval $(fgrep -h 'PKGMK_PACKAGE_DIR=' " + "/usr/bin/pkgmk /etc/pkgmk.conf) " + "&& echo $PKGMK_PACKAGE_DIR"; FILE* p = popen(cmd.c_str(), "r"); if ( p ) { char line[256]; |