lkml.org 
[lkml]   [2018]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 2/2] kbuild: Don't mess with the .cache.mk when root
Hi,

On Tue, Mar 13, 2018 at 10:39 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Tue, Mar 13, 2018 at 9:44 AM, Doug Anderson <dianders@chromium.org> wrote:
>>> Is there any issue if I:
>>>
>>> $ make clean
>>> $ make
>>> $ sudo make install
>>> <hack around>
>>> $ make
>>
>> I don't personally know of any problems with the above flow.
>
> This is my workflow, and what I suggest people do - only do "make
> install" as root, everything else as a normal user.
>
> And in fact, it occasionally _has_ broken, when "make install" has
> done more than just install things, and created root-owned files and
> directories (particularly the generated headers).
>
> And then I complain to people, because then things like "make clean"
> as a normal user ends up breaking too when there's some root-owned
> file.
>
> So it can break, but it's pretty rare. Usually it's something like
> "people didn't use the proper sequence to update a file only if it
> changed, and just blindly over-wrote a new version.
>
> Generally, I prefer "make install" not even checking dependencies at
> all, and just blindly copy things. And I'd definitely be ok with an
> error rather than root generating files, although then I'd not
> special-case mkcache, but all the *other* random file changes we do.
>
> If Ingo wants to build as root, maybe we could even make him set some
> environment flag to avoid errors.
>
> (But I don't actually like the patch in question, because I really
> think KBUILD_NOCACHE is much too specific a special case, and it
> should be way more generic).

Please consider the patch abandoned. As per other threads pointed to
in this conversation, Masahiro Yamada is planning to fully gut the
".cache.mk" from the build system anyway. :-)

-Doug

\
 
 \ /
  Last update: 2018-03-14 00:43    [W:0.340 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site