* [PATCH v2 0/2] Fix u-boot-script packages conflict
@ 2022-01-14 13:57 Anton Mikanovich
2022-01-14 13:57 ` [PATCH v2 1/2] dpkg: Introduce any kernel variables Anton Mikanovich
2022-01-14 13:57 ` [PATCH v2 2/2] u-boot-script: Depend on any kernel package Anton Mikanovich
0 siblings, 2 replies; 7+ messages in thread
From: Anton Mikanovich @ 2022-01-14 13:57 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
When trying to execute do_prepare_build task of u-boot-script package
for some targets 'multiple execution' occurs:
$ bitbake mc:bananapi-buster:u-boot-script:do_prepare_build mc:de0-nano-soc-buster:u-boot-script:do_prepare_build
ERROR: Detect multiple executions of do_prepare_build in /build/tmp/work/debian-buster-armhf/u-boot-script/1.1-r0
ERROR: Rerun a clean build with empty STAMPCLEAN and compare the sigdata files
This is caused by different u-boot-script packages building in the same
directory. The difference between those two output debs is dependency on
linux-image-${KERNEL_NAME}.
Now we can depend on any kernel and make u-boot-script packages equal.
Anton Mikanovich (2):
dpkg: Introduce any kernel variables
u-boot-script: Depend on any kernel package
meta/classes/dpkg-base.bbclass | 7 +++++++
meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb | 2 +-
meta/recipes-kernel/linux/files/debian/control.tmpl | 2 ++
3 files changed, 10 insertions(+), 1 deletion(-)
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] dpkg: Introduce any kernel variables
2022-01-14 13:57 [PATCH v2 0/2] Fix u-boot-script packages conflict Anton Mikanovich
@ 2022-01-14 13:57 ` Anton Mikanovich
2022-01-14 16:40 ` Jan Kiszka
2022-01-14 13:57 ` [PATCH v2 2/2] u-boot-script: Depend on any kernel package Anton Mikanovich
1 sibling, 1 reply; 7+ messages in thread
From: Anton Mikanovich @ 2022-01-14 13:57 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
To allow packages to depend on any kernel image or header package add
following variables:
linux-image-generic - any custom Isar compiled kernel image
linux-headers-generic - any custom Isar compiled headers
ANY_DISTRO_KERNEL - any upstream kernel + generic one
ANY_DISTRO_HEADERS - any upstream headers + generic ones
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta/classes/dpkg-base.bbclass | 7 +++++++
meta/recipes-kernel/linux/files/debian/control.tmpl | 2 ++
2 files changed, 9 insertions(+)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index cb5ce4a..4655f70 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -93,6 +93,13 @@ python() {
d.setVarFlag('do_apt_fetch', 'noexec', '1')
d.setVarFlag('do_apt_unpack', 'noexec', '1')
d.setVarFlag('do_cleanall_apt', 'noexec', '1')
+
+ distro_kernels = d.getVar('DISTRO_KERNELS', True) or ""
+ d.setVar('ANY_DISTRO_KERNEL', 'linux-image-generic')
+ d.setVar('ANY_DISTRO_HEADERS', 'linux-headers-generic')
+ for kernel in distro_kernels.split():
+ d.appendVar('ANY_DISTRO_KERNEL', ' | linux-image-' + kernel)
+ d.appendVar('ANY_DISTRO_HEADERS', ' | linux-headers-' + kernel)
}
do_apt_fetch() {
diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
index dd0b624..8647736 100644
--- a/meta/recipes-kernel/linux/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
@@ -8,6 +8,7 @@ Homepage: http://www.kernel.org/
Package: linux-image-${KERNEL_NAME_PROVIDED}
Architecture: any
Depends: ${KERNEL_DEBIAN_DEPENDS}
+Provides: linux-image-generic
Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
This package contains the Linux kernel, modules and corresponding other
files, version: @KR@.
@@ -15,6 +16,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
Package: linux-headers-${KERNEL_NAME_PROVIDED}
Architecture: any
Depends: ${KERNEL_HEADERS_DEBIAN_DEPENDS}, ${perl:Depends}, ${shlib:Depends}
+Provides: linux-headers-generic
Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@
This package provides kernel header files for @KR@ on ${DISTRO_ARCH}
.
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] u-boot-script: Depend on any kernel package
2022-01-14 13:57 [PATCH v2 0/2] Fix u-boot-script packages conflict Anton Mikanovich
2022-01-14 13:57 ` [PATCH v2 1/2] dpkg: Introduce any kernel variables Anton Mikanovich
@ 2022-01-14 13:57 ` Anton Mikanovich
2022-01-14 16:40 ` Jan Kiszka
1 sibling, 1 reply; 7+ messages in thread
From: Anton Mikanovich @ 2022-01-14 13:57 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
Make u-boot-script depend on any installed kernel version to fix
package build conflict for the machines with different KERNEL_NAME
but same distro and arch.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb b/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
index e07deee..db41b75 100644
--- a/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
+++ b/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
@@ -14,7 +14,7 @@ SRC_URI = " \
file://u-boot-script \
file://zz-u-boot-script"
-DEBIAN_DEPENDS = "u-boot-tools, linux-image-${KERNEL_NAME}"
+DEBIAN_DEPENDS = "u-boot-tools, ${ANY_DISTRO_KERNEL}"
do_install() {
install -v -d ${D}/usr/sbin
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] u-boot-script: Depend on any kernel package
2022-01-14 13:57 ` [PATCH v2 2/2] u-boot-script: Depend on any kernel package Anton Mikanovich
@ 2022-01-14 16:40 ` Jan Kiszka
2022-01-14 17:23 ` Jan Kiszka
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2022-01-14 16:40 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
On 14.01.22 14:57, Anton Mikanovich wrote:
> Make u-boot-script depend on any installed kernel version to fix
> package build conflict for the machines with different KERNEL_NAME
> but same distro and arch.
>
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
> meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb b/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
> index e07deee..db41b75 100644
> --- a/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
> +++ b/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
> @@ -14,7 +14,7 @@ SRC_URI = " \
> file://u-boot-script \
> file://zz-u-boot-script"
>
> -DEBIAN_DEPENDS = "u-boot-tools, linux-image-${KERNEL_NAME}"
> +DEBIAN_DEPENDS = "u-boot-tools, ${ANY_DISTRO_KERNEL}"
>
Did you also check if we could drop the dependency? If not, I will do
that before we settle of this. Would be simpler if it works.
Jan
> do_install() {
> install -v -d ${D}/usr/sbin
--
Siemens AG, Technology
Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] dpkg: Introduce any kernel variables
2022-01-14 13:57 ` [PATCH v2 1/2] dpkg: Introduce any kernel variables Anton Mikanovich
@ 2022-01-14 16:40 ` Jan Kiszka
0 siblings, 0 replies; 7+ messages in thread
From: Jan Kiszka @ 2022-01-14 16:40 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
On 14.01.22 14:57, Anton Mikanovich wrote:
> To allow packages to depend on any kernel image or header package add
> following variables:
>
> linux-image-generic - any custom Isar compiled kernel image
> linux-headers-generic - any custom Isar compiled headers
> ANY_DISTRO_KERNEL - any upstream kernel + generic one
> ANY_DISTRO_HEADERS - any upstream headers + generic ones
>
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
> meta/classes/dpkg-base.bbclass | 7 +++++++
> meta/recipes-kernel/linux/files/debian/control.tmpl | 2 ++
> 2 files changed, 9 insertions(+)
>
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
> index cb5ce4a..4655f70 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -93,6 +93,13 @@ python() {
> d.setVarFlag('do_apt_fetch', 'noexec', '1')
> d.setVarFlag('do_apt_unpack', 'noexec', '1')
> d.setVarFlag('do_cleanall_apt', 'noexec', '1')
> +
> + distro_kernels = d.getVar('DISTRO_KERNELS', True) or ""
> + d.setVar('ANY_DISTRO_KERNEL', 'linux-image-generic')
> + d.setVar('ANY_DISTRO_HEADERS', 'linux-headers-generic')
Provided we need this (see patch 2):
As you wrote yourself (IIRC), "generic" is used by Ubuntu. We should
avoid name clashes. "linux-image-any"?
Jan
> + for kernel in distro_kernels.split():
> + d.appendVar('ANY_DISTRO_KERNEL', ' | linux-image-' + kernel)
> + d.appendVar('ANY_DISTRO_HEADERS', ' | linux-headers-' + kernel)
> }
>
> do_apt_fetch() {
> diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
> index dd0b624..8647736 100644
> --- a/meta/recipes-kernel/linux/files/debian/control.tmpl
> +++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
> @@ -8,6 +8,7 @@ Homepage: http://www.kernel.org/
> Package: linux-image-${KERNEL_NAME_PROVIDED}
> Architecture: any
> Depends: ${KERNEL_DEBIAN_DEPENDS}
> +Provides: linux-image-generic
> Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
> This package contains the Linux kernel, modules and corresponding other
> files, version: @KR@.
> @@ -15,6 +16,7 @@ Description: ${KERNEL_NAME_PROVIDED} Linux kernel, version @KR@
> Package: linux-headers-${KERNEL_NAME_PROVIDED}
> Architecture: any
> Depends: ${KERNEL_HEADERS_DEBIAN_DEPENDS}, ${perl:Depends}, ${shlib:Depends}
> +Provides: linux-headers-generic
> Description: ${KERNEL_NAME_PROVIDED} Linux kernel headers for @KR@
> This package provides kernel header files for @KR@ on ${DISTRO_ARCH}
> .
--
Siemens AG, Technology
Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] u-boot-script: Depend on any kernel package
2022-01-14 16:40 ` Jan Kiszka
@ 2022-01-14 17:23 ` Jan Kiszka
2022-01-15 9:57 ` Anton Mikanovich
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2022-01-14 17:23 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
On 14.01.22 17:40, Jan Kiszka wrote:
> On 14.01.22 14:57, Anton Mikanovich wrote:
>> Make u-boot-script depend on any installed kernel version to fix
>> package build conflict for the machines with different KERNEL_NAME
>> but same distro and arch.
>>
>> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
>> ---
>> meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
>> b/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
>> index e07deee..db41b75 100644
>> --- a/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
>> +++ b/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
>> @@ -14,7 +14,7 @@ SRC_URI = " \
>> file://u-boot-script \
>> file://zz-u-boot-script"
>> -DEBIAN_DEPENDS = "u-boot-tools, linux-image-${KERNEL_NAME}"
>> +DEBIAN_DEPENDS = "u-boot-tools, ${ANY_DISTRO_KERNEL}"
>
> Did you also check if we could drop the dependency? If not, I will do
> that before we settle of this. Would be simpler if it works.
>
Checked: We can drop this series in favor of "u-boot-script: Drop
runtime dependency on a kernel".
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] u-boot-script: Depend on any kernel package
2022-01-14 17:23 ` Jan Kiszka
@ 2022-01-15 9:57 ` Anton Mikanovich
0 siblings, 0 replies; 7+ messages in thread
From: Anton Mikanovich @ 2022-01-15 9:57 UTC (permalink / raw)
To: Jan Kiszka, isar-users
Thanks for checking. This is much better solution, so the the original
fix can be dropped.
14.01.2022 20:23, Jan Kiszka wrote:
> On 14.01.22 17:40, Jan Kiszka wrote:
>> On 14.01.22 14:57, Anton Mikanovich wrote:
>>> Make u-boot-script depend on any installed kernel version to fix
>>> package build conflict for the machines with different KERNEL_NAME
>>> but same distro and arch.
>>>
>>> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
>>> ---
>>> meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
>>> b/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
>>> index e07deee..db41b75 100644
>>> --- a/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
>>> +++ b/meta/recipes-bsp/u-boot-script/u-boot-script_1.1.bb
>>> @@ -14,7 +14,7 @@ SRC_URI = " \
>>> file://u-boot-script \
>>> file://zz-u-boot-script"
>>> -DEBIAN_DEPENDS = "u-boot-tools, linux-image-${KERNEL_NAME}"
>>> +DEBIAN_DEPENDS = "u-boot-tools, ${ANY_DISTRO_KERNEL}"
>>
>> Did you also check if we could drop the dependency? If not, I will do
>> that before we settle of this. Would be simpler if it works.
>>
>
> Checked: We can drop this series in favor of "u-boot-script: Drop
> runtime dependency on a kernel".
>
> Jan
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-01-15 9:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 13:57 [PATCH v2 0/2] Fix u-boot-script packages conflict Anton Mikanovich
2022-01-14 13:57 ` [PATCH v2 1/2] dpkg: Introduce any kernel variables Anton Mikanovich
2022-01-14 16:40 ` Jan Kiszka
2022-01-14 13:57 ` [PATCH v2 2/2] u-boot-script: Depend on any kernel package Anton Mikanovich
2022-01-14 16:40 ` Jan Kiszka
2022-01-14 17:23 ` Jan Kiszka
2022-01-15 9:57 ` Anton Mikanovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox