On Tue, Nov 24, 2009 at 11:44:16AM -0000, Giuseppe Iuculano wrote:
> This doesn't work.
What didn't work? Comparing the diffs, I see a bug in mine that I used the
'filename' variable twice when the first instance should have been
'module_in_tree'; but your version instead introduces new variables
(PACKAGE_NAME?) that aren't defined anywhere in the script. I guess this
comes from the source/dkms.conf; should this value always be the same as the
directory name, or is there ever a reason to prefer one or the other?
Also, the double for loop is needed because we care about counting how many
versions are available for the same module; with your changes, we lose that
information.
On Tue, Nov 24, 2009 at 11:44:16AM -0000, Giuseppe Iuculano wrote:
> This doesn't work.
What didn't work? Comparing the diffs, I see a bug in mine that I used the
'filename' variable twice when the first instance should have been
'module_in_tree'; but your version instead introduces new variables
(PACKAGE_NAME?) that aren't defined anywhere in the script. I guess this
comes from the source/dkms.conf; should this value always be the same as the
directory name, or is there ever a reason to prefer one or the other?
- version_ in_tree= "$filename" in_tree= "$(basename $filename)"
+ version_
This adds an extra fork for each directory. Can be done in shell instead
as:
version_ in_tree= ${filename# #*/} in_tree= ${filename% /*} in_tree= ${module_ in_tree# #*/}
module_
module_
Also, the double for loop is needed because we care about counting how many
versions are available for the same module; with your changes, we lose that
information.
Updated patch attached.