From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6647450695491387392 X-Received: by 2002:a1c:6708:: with SMTP id b8mr1197952wmc.5.1547730224816; Thu, 17 Jan 2019 05:03:44 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:b754:: with SMTP id h81ls107115wmf.7.canary-gmail; Thu, 17 Jan 2019 05:03:44 -0800 (PST) X-Google-Smtp-Source: ALg8bN5JSHws1QVt65pAyQZx4ABtUCIXjb0PAJ5U6ntPQgNceuXHtheM7oSEemu5UZqsbPoAZq6j X-Received: by 2002:a1c:1889:: with SMTP id 131mr111136wmy.5.1547730224423; Thu, 17 Jan 2019 05:03:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547730224; cv=none; d=google.com; s=arc-20160816; b=FGcG31yV1Bq28rs+PHeLKBWULxQlvBq128PEfSAqfZQR2cd4NeMOnXR2r3W5gWT/Ru l6geBN2Y9f1Kdx22JEIRhx3BDqa0YVtcGhLdttPKU7fW6J3tFha4Jn1AjlWpYhr4N17l kVyNavzsf61+0H5hwUn7FiS2SMWQ6RfIf47igtDBpNBt8CwTRX2AMqJifbBykG86t4BL wGBnQL6elprXM7iKETYe/YCtM4HYtC74FBvz7SMuTDMfIFLZDf/FH9qJg5LPG6CRFkMT Yq3KLTpfWmGT7oN1/vnIxB0u+nrXPUHJSzrTkn7jIGcw8YYY8CBy6PXAoW+UR1VZawfY kO5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=90Fq4cCxe9sR7wFCZ7hB/9HCf3j7jqtGrH3rK2H40Lo=; b=LPoJ0+Ekjrfx7Yj71bW4aqis7HFtpvrKBVh/52GX7z8YMx2COYeA5ZErp3L+kILqae 4QPpUzDugKoMf87SzMwH7pzYmjS1wXyUt/8HxF2bkN0bRfmg80rKq9VCUS62QfKcFiXf P3ZBC9btHnSoeqhwexAu4QrjMrafKr3NAD5zuZ6xvjstBuRIGZnyrH1+FhmU/HtkCakK zfh3VHXkO4lHodDfYvRhQF5R1tE2mRGrv2pqNA3M6Zj+3g1evAEoroPp9mVzi+8qR6E0 hwaGK8JZSjNNQpMoLbj6xbsV3VuazJhBgBnUxm3R50dOoOE1YAxM1UNtis4vNuEydhAY YaJg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id z207si1563601wmc.2.2019.01.17.05.03.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 05:03:44 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id x0HD3hkS017700 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 17 Jan 2019 14:03:44 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.69.119]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x0HD3hRW031210; Thu, 17 Jan 2019 14:03:43 +0100 From: Henning Schild To: isar-users Cc: Henning Schild Subject: [PATCH] linux-custom: skip linux-libc-dev deployment on downgrade Date: Thu, 17 Jan 2019 14:03:42 +0100 Message-Id: <20190117130342.15743-1-henning.schild@siemens.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: PshsL8ltHiwp From: Henning Schild 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 --- 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..e4a5d30 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 } -- 2.19.2