lkml.org 
[lkml]   [2021]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [GIT PULL] Devicetree updates for v5.12
On Mon, Feb 22, 2021 at 10:52:09AM -0800, Linus Torvalds wrote:
> On Mon, Feb 22, 2021 at 9:35 AM Rob Herring <robh@kernel.org> wrote:
> >
> > Please pull DT updates for v5.12.
>
> Ugh.
>
> This causes "git status" to be unhappy, because there's a new
> generated file (scripts/dtc/fdtoverlay) without a gitignore entry.

Sorry about that.

> This was added by commit 79edff12060f ("scripts/dtc: Update to
> upstream version v1.6.0-51-g183df9e9c2b9"), and then enabled in commit
> 0da6bcd9fcc0 ("scripts: dtc: Build fdtoverlay tool"). But it was
> already referenced before it was even added (by commit b775f49fbc8b:
> "scripts: dtc: Fetch fdtoverlay.c from external DTC project", which
> didn't actually fetch that thing at all!)

Commit b775f49fbc8b is updating the update script we run that does the
copy. The script takes just the pieces we need from the dtc upstream.
Commit 79edff12060f is the result of running the script.

> And that commit 79edff12060f is all kinds of strange anyway, in that
> it *claims* to have taken some (other) gitignore updates from the
> upstream dtc code, but it very clearly does no such thing.

Upstream dtc has its own gitignore which we don't copy over, so the
gitignore references are for upstream commits. I suppose we could just
take upstream's gitignore, but it has a lot of crap we don't need.

> So I have to say - that whole thing was done very very badly. Actively
> incorrect commit messages, complete mess about when things were added,
> and the end result isn't great.
>
> Sadly, I only noticed after I had pulled and pushed out.
>
> Please fix. Not just the current mess with the incomplete .gitignore
> file, but the whole clearly broken workflow.

A fix is below.

I've added a note so hopefully any future updates won't forget
gitignore. I am wondering if we could automate this as it seems to be
somewhat frequent problem. Some sort of check that ensures every
hostprogs entry has a gitignore entry.

Rob

8<---------------------------------------------------------------------
From 23e61200cfb1d7e8d7f85012b47955387a17435a Mon Sep 17 00:00:00 2001
From: Rob Herring <robh@kernel.org>
Date: Mon, 22 Feb 2021 13:52:46 -0600
Subject: [PATCH] scripts/dtc: Add missing fdtoverlay to gitignore

Commit 0da6bcd9fcc0 ("scripts: dtc: Build fdtoverlay tool") enabled
building fdtoverlay, but failed to add it to .gitignore.

Also add a note to keep hostprogs in sync with .gitignore.

Fixes: 0da6bcd9fcc0 ("scripts: dtc: Build fdtoverlay tool")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
---
scripts/dtc/.gitignore | 1 +
scripts/dtc/Makefile | 1 +
2 files changed, 2 insertions(+)

diff --git a/scripts/dtc/.gitignore b/scripts/dtc/.gitignore
index b814e6076bdb..8a8b62bf3d3c 100644
--- a/scripts/dtc/.gitignore
+++ b/scripts/dtc/.gitignore
@@ -1,2 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-only
dtc
+fdtoverlay
diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
index c8c21e0f2531..95aaf7431bff 100644
--- a/scripts/dtc/Makefile
+++ b/scripts/dtc/Makefile
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
# scripts/dtc makefile

+# *** Also keep .gitignore in sync when changing ***
hostprogs-always-$(CONFIG_DTC) += dtc fdtoverlay
hostprogs-always-$(CHECK_DT_BINDING) += dtc

--
2.27.0
\
 
 \ /
  Last update: 2021-02-22 21:26    [W:0.048 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site