Bug#624692: suggested patch

2011-04-30 Thread Alexander Wuerstlein

--- hook-functions.old  2011-04-30 19:20:23.0 +0200
+++ hook-functions  2011-04-30 20:04:11.0 +0200
@@ -42,10 +42,20 @@
 # Add dependent modules + eventual firmware
 manual_add_modules()
 {
-   local kmod firmware
+   local kmods kmod firmware
 
-   for kmod in $(modprobe --set-version=${version} --ignore-install \
-   --quiet --show-depends ${1} | awk '/^insmod/ { print $2 }'); do
+   kmods=$(modprobe --set-version=${version} --ignore-install \
+   --quiet --show-depends ${1})
+
+   if [ $? != 0 ]  [ ${verbose} = y ] ; then
+   echo W: Getting dependencies for module ${1} failed, module 
will not be included, try running \depmod -a ${version}\ 2
+   elif [ -z ${kmods} ]  [ ${verbose} = y ] ; then
+   echo W: Got emtpy dependency list for module ${1}, module will 
not be included 2
+   fi 
+
+kmods=$(echo ${kmods} | awk '/^insmod/ { print $2 }')
+
+   for kmod in ${kmods}; do
# Prune duplicates
if [ -e ${DESTDIR}/${kmod} ]; then
continue




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#624692: suggested patch

2011-04-30 Thread maximilian attems
which module-init-tools do you use?

and why not emmit the warning there properly.
to have that fixed for dractu too.

thanks

-- 
maks



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#624692: suggested patch

2011-04-30 Thread Alexander Wuerstlein
On 11-04-30 21:41, maximilian attems m...@debian.org wrote:
 which module-init-tools do you use?

3.12-1

 and why not emmit the warning there properly.
 to have that fixed for dractu too.

Yes, that would be possible, too, but:

modprobe emits an error that is suppressed by the --quiet parameter:
| # modprobe --set-version=2.6.32.39 --ignore-install  --show-depends r8168
| FATAL: Module r8168 not found.

Problem is that this warning is not very helpful since the module does
indeed exists, just modules.dep does not contain a reference to it. So
if modprobe were to emit a proper warning (like Module r8168 not found
in modules.dep, try depmod -a $version) , the --quiet would still have
to be removed from the call to modprobe.



Ciao,

Alexander Wuerstlein.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#624692: suggested patch

2011-04-30 Thread Ben Hutchings
On Sat, 2011-04-30 at 22:34 +0200, Alexander Wuerstlein wrote:
 On 11-04-30 21:41, maximilian attems m...@debian.org wrote:
  which module-init-tools do you use?
 
 3.12-1
 
  and why not emmit the warning there properly.
  to have that fixed for dractu too.
 
 Yes, that would be possible, too, but:
 
 modprobe emits an error that is suppressed by the --quiet parameter:
 | # modprobe --set-version=2.6.32.39 --ignore-install  --show-depends r8168
 | FATAL: Module r8168 not found.
 
 Problem is that this warning is not very helpful since the module does
 indeed exists, just modules.dep does not contain a reference to it.
[...]

I think the current error message in modprobe is fine; it is not the job
of modprobe to provide a tutorial on how to install modules.

I think mkinitramfs should warn about any module that can't be found by
modprobe, but there may be some exceptions where we want the quiet
behaviour.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.


signature.asc
Description: This is a digitally signed message part