summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-07-03 22:28:56 +0200
committerDave Reisner <dreisner@archlinux.org>2011-07-04 22:14:14 +0200
commit0c2c3f4c79b7660be01dc0838a6fe88ddefc0cd9 (patch)
tree5b5cd14d55e12dd0cf6c762d5b8038163cbe2e47
parente2baf85790da3147b2638c5ce47998ae6e6bd558 (diff)
downloadmkinitcpio-0c2c3f4c79b7660be01dc0838a6fe88ddefc0cd9.tar.gz
mkinitcpio-0c2c3f4c79b7660be01dc0838a6fe88ddefc0cd9.tar.xz
fix module installation issues with BASEDIR
Broken in 491a99. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xmkinitcpio5
1 files changed, 4 insertions, 1 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 0b2a573..920a537 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -323,7 +323,10 @@ trap ERR
if (( ${#ADDED_MODULES[*]} )); then
mkdir -p "${MODPATHS[@]%/*}"
- cp --parents "${MODPATHS[@]}" "$BUILDROOT"
+
+ pushd "${BASEDIR:-/}" >/dev/null
+ cp --parents "${MODPATHS[@]/#$BASEDIR/.}" "$BUILDROOT"
+ popd >/dev/null
msg "Generating module dependencies"
/sbin/depmod -b "${TMPDIR}/root" "${KERNELVERSION}"