linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] depmod: Handle X.Y kernel versions
@ 2011-05-30 13:58 Michal Marek
  2011-05-30 14:43 ` Kay Sievers
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michal Marek @ 2011-05-30 13:58 UTC (permalink / raw)
  To: Jon Masters; +Cc: linux-modules, linux-kernel, Linus Torvalds

What a stupid check.

Signed-off-by: Michal Marek <mmarek@suse.cz>
---

Jon, could you please apply this patch and release a new
module-init-tools?  Depmod otherwise fails when building a kernel with
version 3.0 (without the third number).

Linus, I'm affraid this ruins the plan for Linux 3.0. Except if you want
to force users to upgrade module-init-tools, with the excuse that 3.0
is a huge step forward and breakage has to be expected ;-).

Michal
---
 depmod.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/depmod.c b/depmod.c
index abfb11e..98a5efa 100644
--- a/depmod.c
+++ b/depmod.c
@@ -247,7 +247,7 @@ static int is_version_number(const char *version)
 {
 	unsigned int dummy;
 
-	return (sscanf(version, "%u.%u.%u", &dummy, &dummy, &dummy) == 3);
+	return (sscanf(version, "%u.%u", &dummy, &dummy) == 2);
 }
 
 static int old_module_version(const char *version)
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] depmod: Handle X.Y kernel versions
  2011-05-30 13:58 [PATCH] depmod: Handle X.Y kernel versions Michal Marek
@ 2011-05-30 14:43 ` Kay Sievers
  2011-05-30 14:54   ` Michal Marek
  2011-05-30 18:05 ` david
  2011-05-31  9:07 ` Michal Marek
  2 siblings, 1 reply; 7+ messages in thread
From: Kay Sievers @ 2011-05-30 14:43 UTC (permalink / raw)
  To: Michal Marek; +Cc: Jon Masters, linux-modules, linux-kernel, Linus Torvalds

On Mon, May 30, 2011 at 15:58, Michal Marek <mmarek@suse.cz> wrote:
> What a stupid check.

> Jon, could you please apply this patch and release a new
> module-init-tools?  Depmod otherwise fails when building a kernel with
> version 3.0 (without the third number).
>
> Linus, I'm affraid this ruins the plan for Linux 3.0. Except if you want
> to force users to upgrade module-init-tools, with the excuse that 3.0
> is a huge step forward and breakage has to be expected ;-).

Maybe get rid of the entire check? We could remove the (not too
useful) 'epoch' some day and just increase the major number with every
release and leave Greg both remaining digits :)

Kay

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] depmod: Handle X.Y kernel versions
  2011-05-30 14:43 ` Kay Sievers
@ 2011-05-30 14:54   ` Michal Marek
  2011-05-31  0:46     ` Jon Masters
  0 siblings, 1 reply; 7+ messages in thread
From: Michal Marek @ 2011-05-30 14:54 UTC (permalink / raw)
  To: Kay Sievers; +Cc: Jon Masters, linux-modules, linux-kernel, Linus Torvalds

On 30.5.2011 16:43, Kay Sievers wrote:
> On Mon, May 30, 2011 at 15:58, Michal Marek<mmarek@suse.cz>  wrote:
>> What a stupid check.
>
> Maybe get rid of the entire check?

Why not. It tries to distinguish between
depmod da.da.da (kernel version)
and
depmod /path/to/module.ko ... (only generate tables for listed modules)

Either we can check for slashes in the second use case, or just drop 
support for it.

Michal

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] depmod: Handle X.Y kernel versions
  2011-05-30 13:58 [PATCH] depmod: Handle X.Y kernel versions Michal Marek
  2011-05-30 14:43 ` Kay Sievers
@ 2011-05-30 18:05 ` david
  2011-05-31  9:07 ` Michal Marek
  2 siblings, 0 replies; 7+ messages in thread
From: david @ 2011-05-30 18:05 UTC (permalink / raw)
  To: Michal Marek; +Cc: Jon Masters, linux-modules, linux-kernel, Linus Torvalds

On Mon, 30 May 2011, Michal Marek wrote:

> Jon, could you please apply this patch and release a new
> module-init-tools?  Depmod otherwise fails when building a kernel with
> version 3.0 (without the third number).
>
> Linus, I'm affraid this ruins the plan for Linux 3.0. Except if you want
> to force users to upgrade module-init-tools, with the excuse that 3.0
> is a huge step forward and breakage has to be expected ;-).

it just means you need to do 3.0.0 (with -stable doing 3.0.1) instead of 
3.0 -> 3.0.1

David Lang

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] depmod: Handle X.Y kernel versions
  2011-05-30 14:54   ` Michal Marek
@ 2011-05-31  0:46     ` Jon Masters
  2011-05-31  6:02       ` Jon Masters
  0 siblings, 1 reply; 7+ messages in thread
From: Jon Masters @ 2011-05-31  0:46 UTC (permalink / raw)
  To: Michal Marek
  Cc: Kay Sievers, linux-modules, linux-kernel, Linus Torvalds,
	Kyle McMartin

On Mon, 2011-05-30 at 16:54 +0200, Michal Marek wrote:
> On 30.5.2011 16:43, Kay Sievers wrote:
> > On Mon, May 30, 2011 at 15:58, Michal Marek<mmarek@suse.cz>  wrote:
> >> What a stupid check.
> >
> > Maybe get rid of the entire check?

> Why not. It tries to distinguish between
> depmod da.da.da (kernel version)
> and
> depmod /path/to/module.ko ... (only generate tables for listed modules)
> 
> Either we can check for slashes in the second use case, or just drop 
> support for it.

Well, for tonight I'm just killing off the 3 number check and taking the
patch from Michal that matches on two numbers (thanks Kyle for sending
another version earlier in the day too but we don't need to be quite so
cleaver, just distinguish between a version and module path passed in).
I'll post a separate email announcing a new release with this fix.

I know it's a silly check, but it's probably not the only silly check
out there in the wild world yonder. Part of me thinks it'd be better to
just keep it as 3.0.0 so that we don't have an ongoing series of script
explosions. Another part of me is just so excited to finally see a 3.0
release that I've forgotten about 2.6 entirely (that's /so/ last week).

Jon.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] depmod: Handle X.Y kernel versions
  2011-05-31  0:46     ` Jon Masters
@ 2011-05-31  6:02       ` Jon Masters
  0 siblings, 0 replies; 7+ messages in thread
From: Jon Masters @ 2011-05-31  6:02 UTC (permalink / raw)
  To: Michal Marek
  Cc: Kay Sievers, linux-modules, linux-kernel, Linus Torvalds,
	Kyle McMartin

On Mon, 2011-05-30 at 20:46 -0400, Jon Masters wrote:

> Well, for tonight I'm just killing off the 3 number check and taking the
> patch from Michal that matches on two numbers (thanks Kyle for sending
> another version earlier in the day too but we don't need to be quite so
> cleaver, just distinguish between a version and module path passed in).
> I'll post a separate email announcing a new release with this fix.

FYI, I pushed 3.13 up to hera earlier but it's not yet syncing. I'll
have updates out for Fedora (rawhide) and F15 testing by the morning.

Jon.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] depmod: Handle X.Y kernel versions
  2011-05-30 13:58 [PATCH] depmod: Handle X.Y kernel versions Michal Marek
  2011-05-30 14:43 ` Kay Sievers
  2011-05-30 18:05 ` david
@ 2011-05-31  9:07 ` Michal Marek
  2 siblings, 0 replies; 7+ messages in thread
From: Michal Marek @ 2011-05-31  9:07 UTC (permalink / raw)
  To: Jon Masters; +Cc: linux-modules, linux-kernel, Linus Torvalds

On 30.5.2011 15:58, Michal Marek wrote:
> Linus, I'm affraid this ruins the plan for Linux 3.0. Except if you want
> to force users to upgrade module-init-tools, with the excuse that 3.0
> is a huge step forward and breakage has to be expected ;-).

For reference, http://marc.info/?l=linux-kernel&m=130676710124446&w=2 
has a workaround, so 3.0 should work even with older m-i-t.

Michal

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-05-31  9:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-30 13:58 [PATCH] depmod: Handle X.Y kernel versions Michal Marek
2011-05-30 14:43 ` Kay Sievers
2011-05-30 14:54   ` Michal Marek
2011-05-31  0:46     ` Jon Masters
2011-05-31  6:02       ` Jon Masters
2011-05-30 18:05 ` david
2011-05-31  9:07 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).