From: Jan Kiszka <jan.kiszka@siemens.com>
To: "[ext] Henning Schild" <henning.schild@siemens.com>,
isar-users@googlegroups.com
Subject: Re: [PATCHv2] linux-custom: skip linux-libc-dev deployment on downgrade
Date: Mon, 28 Jan 2019 12:54:33 +0100 [thread overview]
Message-ID: <619db60f-e21c-2796-242f-38ef76c9b744@siemens.com> (raw)
In-Reply-To: <20190128115108.2386-1-henning.schild@siemens.com>
On 28.01.19 12:51, [ext] Henning Schild wrote:
> From: Henning Schild <henning.schild@siemens.com>
>
> A custom kernel usually deploys linux-libc-dev in the kernels version.
> But some packages in the distribution depend on >= expected upstream
> version of that package. If we deploy a linux-libc-dev in a lower
> version, installing packages like build-essential will not be possible
> anymore.
> That is especially problematic since incremental builds will pull that
> into our buildchroot and break package installation in there.
>
> If detecting a downgrade, do not deploy the package and issue a warning.
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
> meta/recipes-kernel/linux/files/build-kernel.sh | 7 +++++++
> meta/recipes-kernel/linux/linux-custom.inc | 3 +++
> 2 files changed, 10 insertions(+)
>
> diff --git a/meta/recipes-kernel/linux/files/build-kernel.sh b/meta/recipes-kernel/linux/files/build-kernel.sh
> index dbd6162..745c89a 100644
> --- a/meta/recipes-kernel/linux/files/build-kernel.sh
> +++ b/meta/recipes-kernel/linux/files/build-kernel.sh
> @@ -122,3 +122,10 @@ rm -f linux-image-${PV}_${PV}-1_*.deb
> fakeroot dpkg-deb -b ${REPACK_LINUX_HEADERS_DIR} \
> linux-headers-${KERNEL_NAME}_${PV}-1_${KERNEL_NAME}.deb
> rm -f linux-headers-${PV}_${PV}-1_*.deb
> +
> +# linux-libc-dev causes dependency problems if we downgrade
> +# remove it after the build so the downgraded version does not get deployed
> +LINUX_LIBC_DEV_V=$( dpkg-query --show --showformat '${Version}' linux-libc-dev )
> +if dpkg --compare-versions $LINUX_LIBC_DEV_V gt $PV; then
> + rm -f linux-libc-dev_${PV}*.deb
> +fi
> diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
> index f33bb9d..ac37412 100644
> --- a/meta/recipes-kernel/linux/linux-custom.inc
> +++ b/meta/recipes-kernel/linux/linux-custom.inc
> @@ -62,4 +62,7 @@ dpkg_runbuild() {
> export KERNEL_HEADERS_DEBIAN_DEPENDS="${KERNEL_HEADERS_DEBIAN_DEPENDS}"
>
> sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} ${PP}/build-kernel.sh ${PP}/${PPS} ${DISTRO_ARCH}
> + if [ ! -f ${WORKDIR}/linux-libc-dev_${PV}*.deb ]; then
> + bbwarn "Kernel downgrade detected, not deploying linux-libc-dev"
> + fi
> }
>
Thanks, looks good.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2019-01-28 11:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 13:03 [PATCH] " Henning Schild
2019-01-23 17:23 ` Henning Schild
2019-01-23 17:26 ` Jan Kiszka
2019-01-23 17:30 ` Henning Schild
2019-01-23 17:43 ` Jan Kiszka
2019-01-23 18:03 ` Henning Schild
2019-01-23 18:13 ` Henning Schild
2019-01-28 11:51 ` [PATCHv2] " Henning Schild
2019-01-28 11:54 ` Jan Kiszka [this message]
2019-01-30 10:49 ` Maxim Yu. Osipov
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=619db60f-e21c-2796-242f-38ef76c9b744@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.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