Skip to contentSkip to conversation

kbuild: When checking depmod version, redirect stderr

PATCH Applied Tom Rini 3 participants 5 messages Jul 15, 2005 – Jul 17, 2005 Kbuild

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 kbuild: When checking depmod version, redirect stderr

When running depmod to check for the correct version number, extra output we don't need to see, such as "depmod: QM_MODULES: Function not implemented" may show up. Redirect stderr to /dev/null as the version information that we do care about comes to stdout.

Makefile +1 -1
@@ -875,7 +875,7 @@ modules_install: _modinst_ _modinst_post
 
 .PHONY: _modinst_
 _modinst_:
-	@if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \
+	@if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \
 		echo "Warning: you may need to install module-init-tools"; \
 		echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\
 		sleep 1; \
Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#1 lore raw
Quoted 11 lines · On Fri, 15 Jul 2005 07:56:36 -0700 Tom Rini wrote:

When running depmod to check for the correct version number, extra output we don't need to see, such as "depmod: QM_MODULES: Function not implemented" may show up. Redirect stderr to /dev/null as the version information that we do care about comes to stdout.

Makefile modules_install: _modinst_ _modinst_post · line 881

Quoted 8 lines
Makefile +1 -1
@@ -875,7 +875,7 @@ modules_install: _modinst_ _modinst_post
 
 .PHONY: _modinst_
 _modinst_:
-	@if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \
+	@if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \
 		echo "Warning: you may need to install module-init-tools"; \
 		echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\
 		sleep 1; \

Well, seeing "QM_MODULES" is a great indicator that someone is using modutils instead of module-init-tools, so I'd like to see it stay. IOW, I somewhat disagree with "extra output we don't need to see."

---
~Randy

author
#2 lore raw
Quoted 14 lines · randy_dunlap
Quoted 12 lines · On Fri, 15 Jul 2005 07:56:36 -0700 Tom Rini wrote:

When running depmod to check for the correct version number, extra output we don't need to see, such as "depmod: QM_MODULES: Function not implemented" may show up. Redirect stderr to /dev/null as the version information that we do care about comes to stdout.

Makefile +0 -0
@@ -875,7 +875,7 @@ modules_install: _modinst_ _modinst_post
 
Quoted 11 lines

Makefile modules_install: _modinst_ _modinst_post · line 881

Quoted 7 lines
Makefile +1 -1
 .PHONY: _modinst_
 _modinst_:
-	@if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \
+	@if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \
 		echo "Warning: you may need to install module-init-tools"; \
 		echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\
 		sleep 1; \

Well, seeing "QM_MODULES" is a great indicator that someone is using modutils instead of module-init-tools, so I'd like to see it stay. IOW, I somewhat disagree with "extra output we don't need to see."

This shows up when building a 2.6 kernel with incorrect tools installed. What shows up when building a 2.6 kernel on a 2.4 machine that's properly setup to do both is "depmod: Can't open /lib/modules/.../modules.dep for writing".

Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/
#3 lore raw
Quoted 27 lines · On Fri, 15 Jul 2005 14:38:54 -0700 Tom Rini wrote:
Quoted 14 lines · randy_dunlap
Quoted 12 lines · On Fri, 15 Jul 2005 07:56:36 -0700 Tom Rini wrote:

When running depmod to check for the correct version number, extra output we don't need to see, such as "depmod: QM_MODULES: Function not implemented" may show up. Redirect stderr to /dev/null as the version information that we do care about comes to stdout.

Makefile +0 -0
@@ -875,7 +875,7 @@ modules_install: _modinst_ _modinst_post
 
Quoted 11 lines

Makefile modules_install: _modinst_ _modinst_post · line 881

Quoted 7 lines
Makefile +1 -1
 .PHONY: _modinst_
 _modinst_:
-	@if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \
+	@if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \
 		echo "Warning: you may need to install module-init-tools"; \
 		echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\
 		sleep 1; \

Well, seeing "QM_MODULES" is a great indicator that someone is using modutils instead of module-init-tools, so I'd like to see it stay. IOW, I somewhat disagree with "extra output we don't need to see."

Quoted 4 lines

This shows up when building a 2.6 kernel with incorrect tools installed. What shows up when building a 2.6 kernel on a 2.4 machine that's properly setup to do both is "depmod: Can't open /lib/modules/.../modules.dep for writing".

I see. Thanks for clarifying. No problem then (with the patch).

---
~Randy

Applied
#4 lore raw
In reply to Tom Rini
Quoted 4 lines · Tom Rini

When running depmod to check for the correct version number, extra output we don't need to see, such as "depmod: QM_MODULES: Function not implemented" may show up. Redirect stderr to /dev/null as the version information that we do care about comes to stdout.

Applied, thanks.

Sam