Re: Removing .tmp_versions considered harmful

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 24, 2006 at 03:55:27PM -0400, Pavel Roskin wrote:
> Hello, Sam!
> 
> How about following patch?  Something needs to be done before 2.6.17.
> Complaints about .tmp_versions are almost in every list about wireless
> drivers I'm subscribed to.
> 
> I'm not asking to keep *.mod files, just please keep the .tmp_versions
> directory.
> 
> -------------------------------
> Remove *.mod files but not .tmp_versions for external builds
> 
> From: Pavel Roskin <[email protected]>
> 
> When "make install" is run as root, .tmp_versions is re-created and
> becomes owned by root.  Subsequent "make" run by user fails because
> .tmp_versions cannot be removed.

What architecture?
For i386 and x86_64 make install no longer try to compile the kernel.

I have anyway added the following patch:



------------------

Remove *.mod files but not .tmp_versions for external builds

When "make install" is run as root, .tmp_versions is re-created and
becomes owned by root.  Subsequent "make" run by user fails because
.tmp_versions cannot be removed.

Signed-off-by: Pavel Roskin <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
---

diff --git a/Makefile b/Makefile
index 6bf9962..8517f7b 100644
--- a/Makefile
+++ b/Makefile
@@ -796,8 +796,8 @@ prepare2: prepare3 outputmakefile
 prepare1: prepare2 include/linux/version.h include/asm \
                    include/config/MARKER
 ifneq ($(KBUILD_MODULES),)
-	$(Q)rm -rf $(MODVERDIR)
 	$(Q)mkdir -p $(MODVERDIR)
+	$(Q)rm -f $(MODVERDIR)/*
 endif
 
 archprepare: prepare1 scripts_basic
@@ -1086,8 +1086,8 @@ # We are always building modules
 KBUILD_MODULES := 1
 PHONY += crmodverdir
 crmodverdir:
-	$(Q)rm -rf $(MODVERDIR)
 	$(Q)mkdir -p $(MODVERDIR)
+	$(Q)rm -f $(MODVERDIR)/*
 
 PHONY += $(objtree)/Module.symvers
 $(objtree)/Module.symvers:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux