summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-14 00:12:59 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-14 00:12:59 +0000
commiteec6a3dae49d666daf7c958f1cb539a4d1278fed (patch)
treee820eddbc296ecc232c4f31b55bc6b0dc59e9984 /bin
parentcb71e4a251889434b0aa498a08b986218eac8dbf (diff)
downloadportage-eec6a3dae49d666daf7c958f1cb539a4d1278fed.tar.gz
portage-eec6a3dae49d666daf7c958f1cb539a4d1278fed.tar.bz2
portage-eec6a3dae49d666daf7c958f1cb539a4d1278fed.zip
add support for ROOT by Joel Martin #122728
svn path=/main/trunk/; revision=2708
Diffstat (limited to 'bin')
-rwxr-xr-xbin/quickpkg9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/quickpkg b/bin/quickpkg
index 872d15c7e..8f57f5d05 100755
--- a/bin/quickpkg
+++ b/bin/quickpkg
@@ -15,6 +15,9 @@ if [ "`whoami`" != "root" ] ; then
fi
export PORTAGE_DB=$(portageq vdb_path)
+export ROOT=$(portageq envvar ROOT)
+export ROOT=${ROOT%/}/
+
if [ -z "$1" ] || [ $1 == "-h" ] || [ $1 == "--help" ] ; then
echo "QUICKPKG ver 1.2"
echo "USAGE: quickpkg <list of pkgs>"
@@ -67,8 +70,8 @@ do_pkg() {
NF=NF-3
print
}
- }' "${SRCDIR}"/CONTENTS | cut -f2- -d" " - > "${MYDIR}"/filelist
- tar vjcf "${MYDIR}"/bin.tar.bz2 --files-from="${MYDIR}"/filelist --no-recursion
+ }' "${SRCDIR}"/CONTENTS | cut -f2- -d" " - | sed -e 's:^/:./:' > "${MYDIR}"/filelist
+ tar vjcf "${MYDIR}"/bin.tar.bz2 -C "${ROOT}" --files-from="${MYDIR}"/filelist --no-recursion
# join together the basic tbz2 and the pkg info files
xpak "${MYDIR}"/temp "${MYDIR}"/inf.xpak
@@ -109,7 +112,7 @@ for x in "$@" ; do
# lets figure out what they want
else
- DIRLIST=$(portageq match / "${x}")
+ DIRLIST=$(portageq match "${ROOT}" "${x}")
if [ -z "${DIRLIST}" ] ; then
eerror "Could not find anything to match '${x}'; skipping"
export PKGERROR="${PKGERROR} ${x}"