summaryrefslogtreecommitdiffstats
path: root/kernel.spec
diff options
context:
space:
mode:
Diffstat (limited to 'kernel.spec')
-rw-r--r--kernel.spec12
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel.spec b/kernel.spec
index 532bc588d..6824d3dd8 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -1655,6 +1655,7 @@ BuildKernel() {
# Look through all of the modules, and throw any that have a dependency in
# our list into the list as well.
rm -rf dep.list dep2.list
+ rm -rf req.list req2.list
cp %{SOURCE16} .
for dep in `cat modnames`
do
@@ -1667,12 +1668,16 @@ BuildKernel() {
then
continue
else
- echo $dep >> dep.list
+ echo $mod.ko >> req.list
fi
done
done
- for mod in `cat mod-extra.list`
+ sort -u req.list > req2.list
+ sort -u mod-extra.list > mod-extra2.list
+ join -v 1 mod-extra2.list req2.list > mod-extra3.list
+
+ for mod in `cat mod-extra3.list`
do
# get the path for the module
modpath=`grep /$mod modnames`
@@ -1690,7 +1695,8 @@ BuildKernel() {
mv $mod $newpath
done
- rm modnames mod-extra.list dep.list dep2.list
+ rm modnames dep.list dep2.list req.list req2.list
+ rm mod-extra.list mod-extra2.list mod-extra3.list
popd
# remove files that will be auto generated by depmod at rpm -i time