All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] pm-graph: fix time format parse error
@ 2019-08-02  3:00 Liwei Song
  2019-08-02  3:17 ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Liwei Song @ 2019-08-02  3:00 UTC (permalink / raw)
  To: openembedded-devel

Time format in dmesg has been changed from "%Y-%m-%d %H:%M:%S" to
"%Y-%m-%dT%H:%M:%S", backport an upstream patch to fix this error.

Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
 .../pm-graph/pm-graph/0001-bootgraph.py.patch | 32 +++++++++++++++++++
 .../recipes-kernel/pm-graph/pm-graph_5.3.bb   |  4 ++-
 2 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-kernel/pm-graph/pm-graph/0001-bootgraph.py.patch

diff --git a/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-bootgraph.py.patch b/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-bootgraph.py.patch
new file mode 100644
index 000000000000..79685d612abe
--- /dev/null
+++ b/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-bootgraph.py.patch
@@ -0,0 +1,32 @@
+From 0c94e32b218c31f31a7988577fb9bec595034e7b Mon Sep 17 00:00:00 2001
+From: Todd Brandt <todd.e.brandt@linux.intel.com>
+Date: Fri, 10 May 2019 15:10:35 -0700
+Subject: [PATCH] bootgraph.py: - handle boot time start grep better, the regex
+ needs more complexity
+
+Upstream-Status: Backport
+
+Signed-off-by: Liwei Song <liwei.song@windriver.com>
+---
+ bootgraph.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/bootgraph.py b/bootgraph.py
+index a2b1b1897307..d7f4bd152bf1 100755
+--- a/bootgraph.py
++++ b/bootgraph.py
+@@ -333,9 +333,9 @@ def parseKernelLog():
+ 			if(not sysvals.stamp['kernel']):
+ 				sysvals.stamp['kernel'] = sysvals.kernelVersion(msg)
+ 			continue
+-		m = re.match('.* setting system clock to (?P<t>.*) UTC.*', msg)
++		m = re.match('.* setting system clock to (?P<d>[0-9\-]*)[ A-Z](?P<t>[0-9:]*) UTC.*', msg)
+ 		if(m):
+-			bt = datetime.strptime(m.group('t'), '%Y-%m-%d %H:%M:%S')
++			bt = datetime.strptime(m.group('d')+' '+m.group('t'), '%Y-%m-%d %H:%M:%S')
+ 			bt = bt - timedelta(seconds=int(ktime))
+ 			data.boottime = bt.strftime('%Y-%m-%d_%H:%M:%S')
+ 			sysvals.stamp['time'] = bt.strftime('%B %d %Y, %I:%M:%S %p')
+-- 
+2.22.0
+
diff --git a/meta-oe/recipes-kernel/pm-graph/pm-graph_5.3.bb b/meta-oe/recipes-kernel/pm-graph/pm-graph_5.3.bb
index ea12e054d3ab..a9f540ab8605 100644
--- a/meta-oe/recipes-kernel/pm-graph/pm-graph_5.3.bb
+++ b/meta-oe/recipes-kernel/pm-graph/pm-graph_5.3.bb
@@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
 
 SRCREV = "5be9a16547234cef5aca8bfaccd920490ea1cfa7"
 SRC_URI = "git://github.com/intel/pm-graph.git \
-           file://0001-Makefile-fix-multilib-build-failure.patch"
+           file://0001-Makefile-fix-multilib-build-failure.patch \
+           file://0001-bootgraph.py.patch \
+"
 S = "${WORKDIR}/git"
 
 COMPATIBLE_HOST='(i.86|x86_64).*'
-- 
2.22.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [meta-oe][PATCH] pm-graph: fix time format parse error
  2019-08-02  3:00 [meta-oe][PATCH] pm-graph: fix time format parse error Liwei Song
@ 2019-08-02  3:17 ` Khem Raj
  2019-08-02  3:39   ` Liwei Song
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2019-08-02  3:17 UTC (permalink / raw)
  To: Liwei Song; +Cc: openembedded-devel

On Thu, Aug 1, 2019 at 8:01 PM Liwei Song <liwei.song@windriver.com> wrote:
>
> Time format in dmesg has been changed from "%Y-%m-%d %H:%M:%S" to
> "%Y-%m-%dT%H:%M:%S", backport an upstream patch to fix this error.
>
> Signed-off-by: Liwei Song <liwei.song@windriver.com>
> ---
>  .../pm-graph/pm-graph/0001-bootgraph.py.patch | 32 +++++++++++++++++++
>  .../recipes-kernel/pm-graph/pm-graph_5.3.bb   |  4 ++-
>  2 files changed, 35 insertions(+), 1 deletion(-)
>  create mode 100644 meta-oe/recipes-kernel/pm-graph/pm-graph/0001-bootgraph.py.patch
>
> diff --git a/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-bootgraph.py.patch b/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-bootgraph.py.patch
> new file mode 100644
> index 000000000000..79685d612abe
> --- /dev/null
> +++ b/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-bootgraph.py.patch
> @@ -0,0 +1,32 @@
> +From 0c94e32b218c31f31a7988577fb9bec595034e7b Mon Sep 17 00:00:00 2001
> +From: Todd Brandt <todd.e.brandt@linux.intel.com>
> +Date: Fri, 10 May 2019 15:10:35 -0700
> +Subject: [PATCH] bootgraph.py: - handle boot time start grep better, the regex
> + needs more complexity
> +
> +Upstream-Status: Backport
> +

can you add the link to backport location here ?

Upstream-Status: Backport [ <detail> ]

> +Signed-off-by: Liwei Song <liwei.song@windriver.com>
> +---
> + bootgraph.py | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/bootgraph.py b/bootgraph.py
> +index a2b1b1897307..d7f4bd152bf1 100755
> +--- a/bootgraph.py
> ++++ b/bootgraph.py
> +@@ -333,9 +333,9 @@ def parseKernelLog():
> +                       if(not sysvals.stamp['kernel']):
> +                               sysvals.stamp['kernel'] = sysvals.kernelVersion(msg)
> +                       continue
> +-              m = re.match('.* setting system clock to (?P<t>.*) UTC.*', msg)
> ++              m = re.match('.* setting system clock to (?P<d>[0-9\-]*)[ A-Z](?P<t>[0-9:]*) UTC.*', msg)
> +               if(m):
> +-                      bt = datetime.strptime(m.group('t'), '%Y-%m-%d %H:%M:%S')
> ++                      bt = datetime.strptime(m.group('d')+' '+m.group('t'), '%Y-%m-%d %H:%M:%S')
> +                       bt = bt - timedelta(seconds=int(ktime))
> +                       data.boottime = bt.strftime('%Y-%m-%d_%H:%M:%S')
> +                       sysvals.stamp['time'] = bt.strftime('%B %d %Y, %I:%M:%S %p')
> +--
> +2.22.0
> +
> diff --git a/meta-oe/recipes-kernel/pm-graph/pm-graph_5.3.bb b/meta-oe/recipes-kernel/pm-graph/pm-graph_5.3.bb
> index ea12e054d3ab..a9f540ab8605 100644
> --- a/meta-oe/recipes-kernel/pm-graph/pm-graph_5.3.bb
> +++ b/meta-oe/recipes-kernel/pm-graph/pm-graph_5.3.bb
> @@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
>
>  SRCREV = "5be9a16547234cef5aca8bfaccd920490ea1cfa7"
>  SRC_URI = "git://github.com/intel/pm-graph.git \
> -           file://0001-Makefile-fix-multilib-build-failure.patch"
> +           file://0001-Makefile-fix-multilib-build-failure.patch \
> +           file://0001-bootgraph.py.patch \
> +"
>  S = "${WORKDIR}/git"
>
>  COMPATIBLE_HOST='(i.86|x86_64).*'
> --
> 2.22.0
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-oe][PATCH] pm-graph: fix time format parse error
  2019-08-02  3:17 ` Khem Raj
@ 2019-08-02  3:39   ` Liwei Song
  0 siblings, 0 replies; 3+ messages in thread
From: Liwei Song @ 2019-08-02  3:39 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-devel



On 08/02/2019 11:17 AM, Khem Raj wrote:
> On Thu, Aug 1, 2019 at 8:01 PM Liwei Song <liwei.song@windriver.com> wrote:
>>
>> Time format in dmesg has been changed from "%Y-%m-%d %H:%M:%S" to
>> "%Y-%m-%dT%H:%M:%S", backport an upstream patch to fix this error.
>>
>> Signed-off-by: Liwei Song <liwei.song@windriver.com>
>> ---
>>  .../pm-graph/pm-graph/0001-bootgraph.py.patch | 32 +++++++++++++++++++
>>  .../recipes-kernel/pm-graph/pm-graph_5.3.bb   |  4 ++-
>>  2 files changed, 35 insertions(+), 1 deletion(-)
>>  create mode 100644 meta-oe/recipes-kernel/pm-graph/pm-graph/0001-bootgraph.py.patch
>>
>> diff --git a/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-bootgraph.py.patch b/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-bootgraph.py.patch
>> new file mode 100644
>> index 000000000000..79685d612abe
>> --- /dev/null
>> +++ b/meta-oe/recipes-kernel/pm-graph/pm-graph/0001-bootgraph.py.patch
>> @@ -0,0 +1,32 @@
>> +From 0c94e32b218c31f31a7988577fb9bec595034e7b Mon Sep 17 00:00:00 2001
>> +From: Todd Brandt <todd.e.brandt@linux.intel.com>
>> +Date: Fri, 10 May 2019 15:10:35 -0700
>> +Subject: [PATCH] bootgraph.py: - handle boot time start grep better, the regex
>> + needs more complexity
>> +
>> +Upstream-Status: Backport
>> +
> 
> can you add the link to backport location here ?

Got it, will change it in v2:
Upstream-Status: Backport [https://github.com/intel/pm-graph/commit/0c94e32b218c31f31a7988577fb9bec595034e7b]

Thanks,
Liwei.


> 
> Upstream-Status: Backport [ <detail> ]
> 
>> +Signed-off-by: Liwei Song <liwei.song@windriver.com>
>> +---
>> + bootgraph.py | 4 ++--
>> + 1 file changed, 2 insertions(+), 2 deletions(-)
>> +
>> +diff --git a/bootgraph.py b/bootgraph.py
>> +index a2b1b1897307..d7f4bd152bf1 100755
>> +--- a/bootgraph.py
>> ++++ b/bootgraph.py
>> +@@ -333,9 +333,9 @@ def parseKernelLog():
>> +                       if(not sysvals.stamp['kernel']):
>> +                               sysvals.stamp['kernel'] = sysvals.kernelVersion(msg)
>> +                       continue
>> +-              m = re.match('.* setting system clock to (?P<t>.*) UTC.*', msg)
>> ++              m = re.match('.* setting system clock to (?P<d>[0-9\-]*)[ A-Z](?P<t>[0-9:]*) UTC.*', msg)
>> +               if(m):
>> +-                      bt = datetime.strptime(m.group('t'), '%Y-%m-%d %H:%M:%S')
>> ++                      bt = datetime.strptime(m.group('d')+' '+m.group('t'), '%Y-%m-%d %H:%M:%S')
>> +                       bt = bt - timedelta(seconds=int(ktime))
>> +                       data.boottime = bt.strftime('%Y-%m-%d_%H:%M:%S')
>> +                       sysvals.stamp['time'] = bt.strftime('%B %d %Y, %I:%M:%S %p')
>> +--
>> +2.22.0
>> +
>> diff --git a/meta-oe/recipes-kernel/pm-graph/pm-graph_5.3.bb b/meta-oe/recipes-kernel/pm-graph/pm-graph_5.3.bb
>> index ea12e054d3ab..a9f540ab8605 100644
>> --- a/meta-oe/recipes-kernel/pm-graph/pm-graph_5.3.bb
>> +++ b/meta-oe/recipes-kernel/pm-graph/pm-graph_5.3.bb
>> @@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
>>
>>  SRCREV = "5be9a16547234cef5aca8bfaccd920490ea1cfa7"
>>  SRC_URI = "git://github.com/intel/pm-graph.git \
>> -           file://0001-Makefile-fix-multilib-build-failure.patch"
>> +           file://0001-Makefile-fix-multilib-build-failure.patch \
>> +           file://0001-bootgraph.py.patch \
>> +"
>>  S = "${WORKDIR}/git"
>>
>>  COMPATIBLE_HOST='(i.86|x86_64).*'
>> --
>> 2.22.0
>>
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> 
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-02  3:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-02  3:00 [meta-oe][PATCH] pm-graph: fix time format parse error Liwei Song
2019-08-02  3:17 ` Khem Raj
2019-08-02  3:39   ` Liwei Song

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.