* [PATCH] perf: fail if src path does not exist
@ 2018-08-10 14:27 Mikko Rapeli
2018-08-11 12:58 ` Martin Jansa
2018-08-13 9:32 ` Mikko.Rapeli
0 siblings, 2 replies; 3+ messages in thread
From: Mikko Rapeli @ 2018-08-10 14:27 UTC (permalink / raw)
To: openembedded-core
A missing src directory from a broken kernel recipe resulted
only in a warning:
WARNING: copyfile: stat of /home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch failed ([Errno 2] No such file or directory: '/home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch')
With this change it's an error which can not be missed:
ERROR: perf-1.0-r9 do_configure: Path does not exist: /home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch
ERROR: perf-1.0-r9 do_configure: Function failed: copy_perf_source_from_kernel
ERROR: Logfile of failure stored in: /home/builder/src/tmp-glibc/work/target-linux/perf/1.0-r9/temp/log.do_configure.21083
NOTE: recipe perf-1.0-r9: task do_configure: Failed
ERROR: Task (/home/builder/src/poky/meta/recipes-kernel/perf/perf.bb:do_configure) failed with exit code '1'
Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
---
meta/recipes-kernel/perf/perf.bb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 2c6bbb4..c07afeb 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -147,6 +147,8 @@ python copy_perf_source_from_kernel() {
for s in sources:
src = oe.path.join(src_dir, s)
dest = oe.path.join(dest_dir, s)
+ if not os.path.exists(src):
+ bb.fatal("Path does not exist: %s" % src)
if os.path.isdir(src):
oe.path.copyhardlinktree(src, dest)
else:
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf: fail if src path does not exist
2018-08-10 14:27 [PATCH] perf: fail if src path does not exist Mikko Rapeli
@ 2018-08-11 12:58 ` Martin Jansa
2018-08-13 9:32 ` Mikko.Rapeli
1 sibling, 0 replies; 3+ messages in thread
From: Martin Jansa @ 2018-08-11 12:58 UTC (permalink / raw)
To: mikko.rapeli; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 2441 bytes --]
I think this will break support for older kernels added in:
http://git.openembedded.org/openembedded-core/commit/?id=19fb2d11a8bb3c6dfdd5edc1b9155d642dc0f5e0
kernel-source/tools/arch and kernel-source/tools/build are missing in 3.16
kernel even when it's not completely broken.
I'm not completely against this change, maybe just add to commit message
that for older kernels you need to add .bbappend which removes the
directories which really doesn't exist in your kernel version from PERF_SRC.
On Fri, Aug 10, 2018 at 4:55 PM Mikko Rapeli <mikko.rapeli@bmw.de> wrote:
> A missing src directory from a broken kernel recipe resulted
> only in a warning:
>
> WARNING: copyfile: stat of
> /home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch
> failed ([Errno 2] No such file or directory:
> '/home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch')
>
> With this change it's an error which can not be missed:
>
> ERROR: perf-1.0-r9 do_configure: Path does not exist:
> /home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch
> ERROR: perf-1.0-r9 do_configure: Function failed:
> copy_perf_source_from_kernel
> ERROR: Logfile of failure stored in:
> /home/builder/src/tmp-glibc/work/target-linux/perf/1.0-r9/temp/log.do_configure.21083
> NOTE: recipe perf-1.0-r9: task do_configure: Failed
> ERROR: Task (/home/builder/src/poky/meta/recipes-kernel/perf/perf.bb:do_configure)
> failed with exit code '1'
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
> ---
> meta/recipes-kernel/perf/perf.bb | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/
> perf.bb
> index 2c6bbb4..c07afeb 100644
> --- a/meta/recipes-kernel/perf/perf.bb
> +++ b/meta/recipes-kernel/perf/perf.bb
> @@ -147,6 +147,8 @@ python copy_perf_source_from_kernel() {
> for s in sources:
> src = oe.path.join(src_dir, s)
> dest = oe.path.join(dest_dir, s)
> + if not os.path.exists(src):
> + bb.fatal("Path does not exist: %s" % src)
> if os.path.isdir(src):
> oe.path.copyhardlinktree(src, dest)
> else:
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[-- Attachment #2: Type: text/html, Size: 3555 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf: fail if src path does not exist
2018-08-10 14:27 [PATCH] perf: fail if src path does not exist Mikko Rapeli
2018-08-11 12:58 ` Martin Jansa
@ 2018-08-13 9:32 ` Mikko.Rapeli
1 sibling, 0 replies; 3+ messages in thread
From: Mikko.Rapeli @ 2018-08-13 9:32 UTC (permalink / raw)
To: martin.jansa; +Cc: openembedded-core
Martin Jansa wrote:
> I think this will break support for older kernels added in:
> http://git.openembedded.org/openembedded-core/commit/?id=19fb2d11a8bb3c6dfdd5edc1b9155d642dc0f5e0
>
> kernel-source/tools/arch and kernel-source/tools/build are missing in 3.16
> kernel even when it's not completely broken.
>
> I'm not completely against this change, maybe just add to commit message
> that for older kernels you need to add .bbappend which removes the
> directories which really doesn't exist in your kernel version from PERF_SRC.
Exactly. For older kernels like 4.1 the recipe did not work at all and the
failure was a total one at compile time. Once error was clear, solution
was to create a perf.bbappend for the kernel which overwrites
the PERF_SRC variable with needed directories from kernel source tree.
I can document this in the commit message and send a v2.
-Mikko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-13 9:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-10 14:27 [PATCH] perf: fail if src path does not exist Mikko Rapeli
2018-08-11 12:58 ` Martin Jansa
2018-08-13 9:32 ` Mikko.Rapeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox