public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Moessbauer, Felix (T CED SES-DE)" <felix.moessbauer@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Cc: "vijaikumar.kanagarajan@gmail.com" <vijaikumar.kanagarajan@gmail.com>
Subject: Re: [PATCH v5 2/3] refactor linux-custom.inc to use ISAR's DEB_BUILD_PROFILES support
Date: Mon, 31 Jan 2022 08:29:16 +0100	[thread overview]
Message-ID: <95781e0b-07a3-5956-a210-7b3dd14aedce@siemens.com> (raw)
In-Reply-To: <AM9PR10MB4869CE050242911D2164CB4D89219@AM9PR10MB4869.EURPRD10.PROD.OUTLOOK.COM>

On 27.01.22 16:51, Moessbauer, Felix (T CED SES-DE) wrote:
>> -----Original Message-----
>> From: Kiszka, Jan (T CED) <jan.kiszka@siemens.com>
>> Sent: Thursday, January 27, 2022 10:29 AM
>> To: Moessbauer, Felix (T CED SES-DE) <felix.moessbauer@siemens.com>; isar-
>> users@googlegroups.com
>> Cc: vijaikumar.kanagarajan@gmail.com
>> Subject: Re: [PATCH v5 2/3] refactor linux-custom.inc to use ISAR's
>> DEB_BUILD_PROFILES support
>>
>> On 12.01.22 15:39, Felix Moessbauer wrote:
>>> This patch replaces the manual setup of the DEB_BUILD_PROFILES
>>> environment variable in the linux-custom.inc recipe.
>>> Instead, the recently introduced DEB_BUILD_PROFILES infrastructure of
>>> ISAR is used.
>>>
>>> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
>>> ---
>>>    meta/recipes-kernel/linux/linux-custom.inc | 13 ++++++++-----
>>>    1 file changed, 8 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/meta/recipes-kernel/linux/linux-custom.inc
>>> b/meta/recipes-kernel/linux/linux-custom.inc
>>> index ed89aa09..59d42c84 100644
>>> --- a/meta/recipes-kernel/linux/linux-custom.inc
>>> +++ b/meta/recipes-kernel/linux/linux-custom.inc
>>> @@ -117,6 +117,14 @@ def config_fragments(d):
>>>                fragments.append(local)
>>>        return fragments
>>>
>>> +def get_additional_build_profiles(d):
>>> +    profiles = d.getVar('BASE_DISTRO', True)
>>> +    if d.getVar('KERNEL_LIBC_DEV_DEPLOY', True) != '1':
>>> +        profiles += ' nolibcdev'
>>> +    return profiles
>>> +
>>> +DEB_BUILD_PROFILES += "${@get_additional_build_profiles(d)}"
>>> +
>>>    do_prepare_build_prepend() {
>>>      # copy meta-data over to source tree
>>>      rm -rf ${S}/debian
>>> @@ -176,10 +184,5 @@ dpkg_configure_kernel() {
>>>    }
>>>
>>>    dpkg_runbuild_prepend() {
>>> -   profiles="${BASE_DISTRO}"
>>> -   if [ "${KERNEL_LIBC_DEV_DEPLOY}" != "1" ]; then
>>> -           profiles="${profiles} nolibcdev"
>>> -   fi
>>> -   export DEB_BUILD_PROFILES="${profiles}"
>>>      dpkg_configure_kernel
>>>    }
>>
>> After local experiments, it looks like this patch must be folded into patch 1 in
>> order to avoid that linux-libc-dev gets built accidentally when it shouldn't.
> 
> I just sent out a v6 with all commits squashed.
> 
> While we are at it:
> Without sbuilder, removing packages due to conflicting build dependencies is a recipe for disaster.
> The do_install_builddeps and do_dpkg_build steps are not atomic, so another package might remove build deps in between the two tasks.

They are atomic (do_install_builddeps[lockfiles] vs. read-lock in 
do_dpkg_build), don't worry about that.

But, yes, this can cause troubles if undesired packages are being pushed 
into the buildchroot and/or dependencies were not properly expressed.

> 
> We should at least scan the do_install_builddeps log and search for "[1-9]+ to remove" and issue a warning if we find such a line.

On partial rebuild, you do want to see those messages.

Jan

> 
> But don't know when sbuilder will be ready, and if we should put time into this check.
> Opinions?
> 
> Felix
> 
>>
>> Jan
>>
>> --
>> Siemens AG, Technology
>> Competence Center Embedded Linux

-- 
Siemens AG, Technology
Competence Center Embedded Linux

  reply	other threads:[~2022-01-31  7:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 14:39 [PATCH v5 0/3] add support for debian build profiles Felix Moessbauer
2022-01-12 14:39 ` [PATCH v5 1/3] add support for debian build profiles and options Felix Moessbauer
2022-01-12 14:39 ` [PATCH v5 2/3] refactor linux-custom.inc to use ISAR's DEB_BUILD_PROFILES support Felix Moessbauer
2022-01-27  9:28   ` Jan Kiszka
2022-01-27 15:51     ` Moessbauer, Felix
2022-01-31  7:29       ` Jan Kiszka [this message]
2022-01-12 14:39 ` [PATCH v5 3/3] Use DEB_BUILD_OPTIONS bb variable in hello.bb example Felix Moessbauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95781e0b-07a3-5956-a210-7b3dd14aedce@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=vijaikumar.kanagarajan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox