summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Winkelmann <jw@smts.ch>2006-09-10 19:11:23 +0000
committerJohannes Winkelmann <jw@smts.ch>2006-09-10 19:11:23 +0000
commit318a4a0768112deaa12fb323e92c4891f584b17e (patch)
treeff8b0e00e6374c7e425b5328fb8a447d458f819d
parentfaddee70ffb7398fd4a1156c0f42518ce6b16203 (diff)
downloadprt-get-318a4a0768112deaa12fb323e92c4891f584b17e.tar.gz
prt-get-318a4a0768112deaa12fb323e92c4891f584b17e.tar.xz
prt-get: revert getPkgDest; use fgrep to determine PKGMK_PACKAGE_DIR
git-svn-id: https://crux.nu/svn/tools/prt-get/trunk@1864 0b5ae1c7-2405-0410-a7fc-ba219f786e1e
-rw-r--r--ChangeLog2
-rw-r--r--TODO2
-rw-r--r--src/installtransaction.cpp9
3 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d452f7..014852c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
* 0.5.14 00.00.200x Johannes Winkelmann
- Remove handling of external dependency list
- make InstallTransaction::getPkgDest use pkgmk.conf from install-root
+- revert getPkgDest to ignore install-root
+- determine PKGMK_PACKAGE_DIR using fgrep without sourcing pkgmk.conf
* 0.5.13 08.09.2006 Johannes Winkelmann
- Show undecided versions in diff and sysup when using "prefer higher"
diff --git a/TODO b/TODO
index 81a5238..56af941 100644
--- a/TODO
+++ b/TODO
@@ -1,7 +1,5 @@
- handle 27e < 28 in version comperator
- add --rebuild-set to dependent
-- use `eval $(fgrep -h 'PKGMK_PACKAGE_DIR=' $(which pkgmk) /etc/pkgmk.conf) && echo
-$PKGMK_PACKAGE_DIR` to determine PACKAGE_DIR
- allow dependency injection for sysup, with previews
- prefer toolchain (patch in trac)
- logging: check for non-root owned symlinks
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];

Generated by cgit