Skip to contentSkip to conversation

kconfig: do not record timestamp in .config

PATCH In review Arnaud Lacombe 2 participants 4 messages May 16, 2011 – May 24, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kconfig: do not record timestamp in .config

Hi Michal,

The following patch removes the timestamp in .config file. This is a prerequiresite for the revised version of the printer merge I sent back in December[0]. The issue is that heading comment generations will be merged in a single function, and that would revert the deterministic change you made in mid-April.

The other options are either to have timestamp always enabled and disable them selectively, but that might be a pain to implement, or to have timestamp disable by default and an environment variable, say KCONFIG_TIMESTAMP, to turn everything on manually.

Regards,
- Arnaud

[0]: https://patchwork.kernel.org/patch/380631/

--

From: Arnaud Lacombe <[email protected]>
Subject: kconfig: do not record timestamp in .config

---
 Documentation/kbuild/kconfig.txt |    5 -----
 scripts/kconfig/confdata.c       |   12 +-----------
 2 files changed, 1 insertions(+), 16 deletions(-)
Documentation/kbuild/kconfig.txt +0 -5
index cca46b1..c313d71 100644
@@ -48,11 +48,6 @@ KCONFIG_OVERWRITECONFIG
 If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
 break symlinks when .config is a symlink to somewhere else.
 
-KCONFIG_NOTIMESTAMP
---------------------------------------------------
-If this environment variable exists and is non-null, the timestamp line
-in generated .config files is omitted.
-
 ______________________________________________________________________
 Environment variables for '{allyes/allmod/allno/rand}config'
 
scripts/kconfig/confdata.c +1 -11
index 834eecb..2bafd9a 100644
@@ -560,8 +560,6 @@ int conf_write(const char *name)
 	const char *basename;
 	const char *str;
 	char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1];
-	time_t now;
-	int use_timestamp = 1;
 	char *env;
 
 	dirname[0] = 0;
@@ -598,19 +596,11 @@ int conf_write(const char *name)
 	if (!out)
 		return 1;
 
-	time(&now);
-	env = getenv("KCONFIG_NOTIMESTAMP");
-	if (env && *env)
-		use_timestamp = 0;
-
 	fprintf(out, _("#\n"
 		       "# Automatically generated make config: don't edit\n"
 		       "# %s\n"
-		       "%s%s"
 		       "#\n"),
-		     rootmenu.prompt->text,
-		     use_timestamp ? "# " : "",
-		     use_timestamp ? ctime(&now) : "");
+		     rootmenu.prompt->text);
 
 	if (!conf_get_changed())
 		sym_clear_all_valid();
Signature · 1 line
1.7.3.4.574.g608b.dirty
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Arnaud Lacombe

Hi Michal,

The following patch removes the timestamp in .config file. This is a prerequiresite for the revised version of the printer merge I sent back in December[0]. The issue is that heading comment generations will be merged in a single function, and that would revert the deterministic change you made in mid-April.

Quoted 4 lines

The other options are either to have timestamp always enabled and disable them selectively, but that might be a pain to implement, or to have timestamp disable by default and an environment variable, say KCONFIG_TIMESTAMP, to turn everything on manually.

I personally am not a big fan of embedded timestamps, so

But I'll wait some time before merging this, in case there are objections from others...

Michal

Quoted 67 lines

Regards,
- Arnaud

[0]: https://patchwork.kernel.org/patch/380631/

--

From: Arnaud Lacombe<[email protected]>
Subject: kconfig: do not record timestamp in .config

---
  Documentation/kbuild/kconfig.txt |    5 -----
  scripts/kconfig/confdata.c       |   12 +-----------
  2 files changed, 1 insertions(+), 16 deletions(-)
Documentation/kbuild/kconfig.txt +0 -5
index cca46b1..c313d71 100644
@@ -48,11 +48,6 @@ KCONFIG_OVERWRITECONFIG
  If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
  break symlinks when .config is a symlink to somewhere else.
 
-KCONFIG_NOTIMESTAMP
---------------------------------------------------
-If this environment variable exists and is non-null, the timestamp line
-in generated .config files is omitted.
-
  ______________________________________________________________________
  Environment variables for '{allyes/allmod/allno/rand}config'
 
scripts/kconfig/confdata.c +1 -11
index 834eecb..2bafd9a 100644
@@ -560,8 +560,6 @@ int conf_write(const char *name)
  	const char *basename;
  	const char *str;
  	char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1];
-	time_t now;
-	int use_timestamp = 1;
  	char *env;
 
  	dirname[0] = 0;
@@ -598,19 +596,11 @@ int conf_write(const char *name)
  	if (!out)
  		return 1;
 
-	time(&now);
-	env = getenv("KCONFIG_NOTIMESTAMP");
-	if (env&&  *env)
-		use_timestamp = 0;
-
  	fprintf(out, _("#\n"
  		       "# Automatically generated make config: don't edit\n"
  		       "# %s\n"
-		       "%s%s"
  		       "#\n"),
-		     rootmenu.prompt->text,
-		     use_timestamp ? "# " : "",
-		     use_timestamp ? ctime(&now) : "");
+		     rootmenu.prompt->text);
 
  	if (!conf_get_changed())
  		sym_clear_all_valid();
#2 lore raw

Hi Michal,

2011/5/16 Michal Marek <[email protected]>:

Quoted 10 lines · Arnaud Lacombe
Quoted 9 lines

Hi Michal,

The following patch removes the timestamp in .config file. This is a prerequiresite for the revised version of the printer merge I sent back in December[0]. The issue is that heading comment generations will be merged in a single function, and that would revert the deterministic change you made in mid-April.

Quoted 9 lines
Quoted 4 lines

The other options are either to have timestamp always enabled and disable them selectively, but that might be a pain to implement, or to have timestamp disable by default and an environment variable, say KCONFIG_TIMESTAMP, to turn everything on manually.

I personally am not a big fan of embedded timestamps, so

Do you intend to merge that patch for .1 (or whatever Linus decides to call the next kernel) ?

- Arnaud

#3 lore raw
Quoted 18 lines · Arnaud Lacombe

Hi Michal,

2011/5/16 Michal Marek <[email protected]>:

Quoted 15 lines · Arnaud Lacombe
Quoted 13 lines

Hi Michal,

The following patch removes the timestamp in .config file. This is a prerequiresite for the revised version of the printer merge I sent back in December[0]. The issue is that heading comment generations will be merged in a single function, and that would revert the deterministic change you made in mid-April.

The other options are either to have timestamp always enabled and disable them selectively, but that might be a pain to implement, or to have timestamp disable by default and an environment variable, say KCONFIG_TIMESTAMP, to turn everything on manually.

Quoted 6 lines
Quoted 4 lines

I personally am not a big fan of embedded timestamps, so

Do you intend to merge that patch for .1 (or whatever Linus decides to call the next kernel) ?

I merged it now.

Michal