summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-03-04 22:46:55 +0100
committerDave Reisner <dreisner@archlinux.org>2012-03-04 22:53:22 +0100
commit1ac0adf4052ff7e0258fcf5f745f19551de3faa5 (patch)
tree80865421e9b124fe47251f8c45d0902c1c8b705b
parent51b80faab94b01e195fc8e731a116fd44ff83738 (diff)
downloadmkinitcpio-0.8.4.tar.gz
mkinitcpio-0.8.4.tar.xz
mkinitcpio: dedupe MODPATHS array before installation0.8.4
The only reason this has to be done is because of the Kconfig option that reuses the ext4 module for ext[23], thereby aliasing ext[23] to ext4. This is (currently) the only case in the whole kernel where valid module names magically become aliases. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xmkinitcpio3
1 files changed, 2 insertions, 1 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 9f39d56..c6528e9 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -358,7 +358,8 @@ parse_hook
trap '(( ++builderrors ))' ERR
if (( ${#ADDED_MODULES[*]} )); then
- cp "${MODPATHS[@]}" "$BUILDROOT/lib/modules/$KERNELVERSION/kernel"
+ printf '%s\0' "${MODPATHS[@]}" | sort -zu |
+ xargs -0 cp -t "$BUILDROOT/lib/modules/$KERNELVERSION/kernel"
# unzip modules prior to recompression
gzip -dr "$BUILDROOT/lib/modules/$KERNELVERSION/kernel"