public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] linux-custom: Sync provides value with build profiles
@ 2025-11-10 11:06 Anton Mikanovich
  2025-11-10 11:20 ` 'Isaac True' via isar-users
  0 siblings, 1 reply; 4+ messages in thread
From: Anton Mikanovich @ 2025-11-10 11:06 UTC (permalink / raw)
  To: isar-users; +Cc: Anton Mikanovich

Packages linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross were
added to PROVIDES variable unconditionally, while those packages are
not really built until KERNEL_LIBC_DEV_DEPLOY enabled (which is set to
"0" by default).

Add libc-dev packages to PROVIDES only if there are no 'nolibcdev'
Debian build profile used so PROVIDES will be always in sync with real
set of packages being built.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta/recipes-kernel/linux/linux-custom.inc | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index f2892921..cc12725b 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -144,13 +144,24 @@ RECIPE_PROVIDES:class-kbuildtarget = " \
 DEPENDS:class-kbuildtarget = "${BPN}"
 ISAR_CROSS_COMPILE:class-kbuildtarget = "0"
 
+# Provide linux-libc-dev packages unless nolibcdev profile used
+def get_libc_dev_provides(d):
+    additional_profiles = get_additional_build_profiles(d)
+    if 'nolibcdev' not in additional_profiles:
+        return d.getVar("RECIPE_PROVIDES_LIBC_DEV")
+    return ""
+
+RECIPE_PROVIDES_LIBC_DEV = " \
+    linux-libc-dev \
+    linux-libc-dev-${DISTRO_ARCH}-cross \
+"
+
 # Make bitbake know we will be producing linux-image and linux-headers packages
 # Also make it know about other packages from control
 RECIPE_PROVIDES = " \
     linux-image-${KERNEL_NAME_PROVIDED} \
     linux-headers-${KERNEL_NAME_PROVIDED} \
-    linux-libc-dev \
-    linux-libc-dev-${DISTRO_ARCH}-cross \
+    ${@get_libc_dev_provides(d)} \
     linux-image-${KERNEL_NAME_PROVIDED}-dbg \
     linux-kbuild-${KERNEL_NAME_PROVIDED} \
     ${BPN}-pseudo-native \
-- 
2.34.1

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20251110110626.309753-1-amikan%40ilbers.de.

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

* Re: [PATCH] linux-custom: Sync provides value with build profiles
  2025-11-10 11:06 [PATCH] linux-custom: Sync provides value with build profiles Anton Mikanovich
@ 2025-11-10 11:20 ` 'Isaac True' via isar-users
  2025-11-10 11:39   ` Anton Mikanovich
  0 siblings, 1 reply; 4+ messages in thread
From: 'Isaac True' via isar-users @ 2025-11-10 11:20 UTC (permalink / raw)
  To: Anton Mikanovich, isar-users

Hi,

This could be simplified down to something like this which would avoid 
creating new functions and be consistent with other places in 
linux-custom.inc:

RECIPE_PROVIDES:append = " ${@ bb.utils.contains('DEB_BUILD_PROFILES', 
'nolibcdev', '', 'linux-libc-dev linux-libc-dev-${DISTRO_ARCH}-cross', 
d) }"

What do you think?

Cheers,
Isaac

On 10/11/2025 12:06, Anton Mikanovich wrote:
> Packages linux-libc-dev and linux-libc-dev-${DISTRO_ARCH}-cross were
> added to PROVIDES variable unconditionally, while those packages are
> not really built until KERNEL_LIBC_DEV_DEPLOY enabled (which is set to
> "0" by default).
> 
> Add libc-dev packages to PROVIDES only if there are no 'nolibcdev'
> Debian build profile used so PROVIDES will be always in sync with real
> set of packages being built.
> 
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>   meta/recipes-kernel/linux/linux-custom.inc | 15 +++++++++++++--
>   1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
> index f2892921..cc12725b 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -144,13 +144,24 @@ RECIPE_PROVIDES:class-kbuildtarget = " \
>   DEPENDS:class-kbuildtarget = "${BPN}"
>   ISAR_CROSS_COMPILE:class-kbuildtarget = "0"
>   
> +# Provide linux-libc-dev packages unless nolibcdev profile used
> +def get_libc_dev_provides(d):
> +    additional_profiles = get_additional_build_profiles(d)
> +    if 'nolibcdev' not in additional_profiles:
> +        return d.getVar("RECIPE_PROVIDES_LIBC_DEV")
> +    return ""
> +
> +RECIPE_PROVIDES_LIBC_DEV = " \
> +    linux-libc-dev \
> +    linux-libc-dev-${DISTRO_ARCH}-cross \
> +"
> +
>   # Make bitbake know we will be producing linux-image and linux-headers packages
>   # Also make it know about other packages from control
>   RECIPE_PROVIDES = " \
>       linux-image-${KERNEL_NAME_PROVIDED} \
>       linux-headers-${KERNEL_NAME_PROVIDED} \
> -    linux-libc-dev \
> -    linux-libc-dev-${DISTRO_ARCH}-cross \
> +    ${@get_libc_dev_provides(d)} \
>       linux-image-${KERNEL_NAME_PROVIDED}-dbg \
>       linux-kbuild-${KERNEL_NAME_PROVIDED} \
>       ${BPN}-pseudo-native \

-- 
Isaac True
emlix GmbH, https://www.emlix.com
Fon +49 228 94 77 96 94
Bachstraße 6, 53115 Bonn, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsfuehrung: Heike Jordan, Dr. Uwe Kracke
Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/48c754c9-6d5c-4612-b314-39cfc0cb0b75%40emlix.com.

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

* Re: [PATCH] linux-custom: Sync provides value with build profiles
  2025-11-10 11:20 ` 'Isaac True' via isar-users
@ 2025-11-10 11:39   ` Anton Mikanovich
  2025-11-10 11:55     ` 'Jan Kiszka' via isar-users
  0 siblings, 1 reply; 4+ messages in thread
From: Anton Mikanovich @ 2025-11-10 11:39 UTC (permalink / raw)
  To: Isaac True, isar-users

10/11/2025 13:20, Isaac True wrote:
> Hi,
>
> This could be simplified down to something like this which would avoid 
> creating new functions and be consistent with other places in 
> linux-custom.inc:
>
> RECIPE_PROVIDES:append = " ${@ bb.utils.contains('DEB_BUILD_PROFILES', 
> 'nolibcdev', '', 'linux-libc-dev linux-libc-dev-${DISTRO_ARCH}-cross', 
> d) }"
>
> What do you think?
>
> Cheers,
> Isaac
Hello Isaac,

The motivation was to keep the same format of deps declare as previously
(multi-line list), so it will be easier to maintain in the future.
So maybe something hybrid should be better, like:

RECIPE_PROVIDES:append = " ${@ bb.utils.contains('DEB_BUILD_PROFILES', 
'nolibcdev', '', d.getVar('RECIPE_PROVIDES_LIBC_DEV'), d) }"

I'm also not happy with RECIPE_PROVIDES_LIBC_DEV naming, but didn't came up
with better one.

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/9ccf5d6d-2f67-4f03-ad30-3d94b8676c00%40ilbers.de.

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

* Re: [PATCH] linux-custom: Sync provides value with build profiles
  2025-11-10 11:39   ` Anton Mikanovich
@ 2025-11-10 11:55     ` 'Jan Kiszka' via isar-users
  0 siblings, 0 replies; 4+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-11-10 11:55 UTC (permalink / raw)
  To: Anton Mikanovich, isar-users, Isaac True

On 10.11.25 12:39, Anton Mikanovich wrote:
> 10/11/2025 13:20, Isaac True wrote:
>> Hi,
>>
>> This could be simplified down to something like this which would avoid
>> creating new functions and be consistent with other places in linux-
>> custom.inc:
>>
>> RECIPE_PROVIDES:append = " ${@ bb.utils.contains('DEB_BUILD_PROFILES',
>> 'nolibcdev', '', 'linux-libc-dev linux-libc-dev-${DISTRO_ARCH}-cross',
>> d) }"
>>
>> What do you think?
>>
>> Cheers,
>> Isaac
> Hello Isaac,
> 
> The motivation was to keep the same format of deps declare as previously
> (multi-line list), so it will be easier to maintain in the future.
> So maybe something hybrid should be better, like:
> 
> RECIPE_PROVIDES:append = " ${@ bb.utils.contains('DEB_BUILD_PROFILES',
> 'nolibcdev', '', d.getVar('RECIPE_PROVIDES_LIBC_DEV'), d) }"
> 
> I'm also not happy with RECIPE_PROVIDES_LIBC_DEV naming, but didn't came up
> with better one.
> 

OVERRIDES:append = "${@bb.utils.contains('DEB_BUILD_PROFILES', 'nolibcdev', '', ''libcdev')}"

RECIPE_PROVIDES:append:libcdev = " \
    linux-libc-dev \
    linux-libc-dev-${DISTRO_ARCH}-cross"

That would be truly aligned with the other bits in the file.

Jan

-- 
Siemens AG, Foundational Technologies
Linux Expert Center

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/347a4cad-0f49-42d4-a1dc-0db69754f55b%40siemens.com.

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

end of thread, other threads:[~2025-11-10 11:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-10 11:06 [PATCH] linux-custom: Sync provides value with build profiles Anton Mikanovich
2025-11-10 11:20 ` 'Isaac True' via isar-users
2025-11-10 11:39   ` Anton Mikanovich
2025-11-10 11:55     ` 'Jan Kiszka' via isar-users

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox