mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-25 03:22:39 +00:00
scripts/kernel-doc.py: properly handle KBUILD_BUILD_TIMESTAMP
The logic that handles KBUILD_BUILD_TIMESTAMP is wrong, and adds a dependency of a third party module (dateutil). Fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/ffc70a1b741b010365ed82f31611018f24f91ce7.1744106242.git.mchehab+huawei@kernel.org
This commit is contained in:
committed by
Jonathan Corbet
parent
2ab867a494
commit
91d00bd54f
@@ -13,9 +13,6 @@ import logging
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
from dateutil import tz
|
||||
|
||||
from kdoc_parser import KernelDoc
|
||||
from kdoc_output import OutputFormat
|
||||
@@ -137,12 +134,6 @@ class KernelFiles():
|
||||
if out_style is None:
|
||||
out_style = OutputFormat()
|
||||
|
||||
dt = datetime.now()
|
||||
if os.environ.get("KBUILD_BUILD_TIMESTAMP", None):
|
||||
# use UTC TZ
|
||||
to_zone = tz.gettz('UTC')
|
||||
dt = dt.astimezone(to_zone)
|
||||
|
||||
if not werror:
|
||||
kcflags = os.environ.get("KCFLAGS", None)
|
||||
if kcflags:
|
||||
|
||||
Reference in New Issue
Block a user