public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: isar-users@googlegroups.com
Cc: adriaan.schmidt@siemens.com,
	Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 1/1] dpkg-prebuilt: ensure fetched packages are valid debian packages
Date: Wed, 26 Jun 2024 13:05:41 +0200	[thread overview]
Message-ID: <20240626110541.94885-1-felix.moessbauer@siemens.com> (raw)

In case of dpkg-prebuilt, we need to check if the fetched packages are
valid debian packages to only deploy valid ones into the sstate cache.
Otherwise broken packages might end up in the cache and break future
builds.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes/dpkg-prebuilt.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/dpkg-prebuilt.bbclass b/meta/classes/dpkg-prebuilt.bbclass
index 7092670b..c6b66c62 100644
--- a/meta/classes/dpkg-prebuilt.bbclass
+++ b/meta/classes/dpkg-prebuilt.bbclass
@@ -19,5 +19,8 @@ python do_unpack:prepend() {
 # also breaks inherited (from dpkg-base) dependency on sbuild_chroot
 do_dpkg_build[depends] = "${PN}:do_unpack"
 do_dpkg_build() {
-    true
+    # ensure all packages we got are valid debian packages
+    if [ -n "$(find ${WORKDIR} -maxdepth 1 -name '*.deb' -print -quit)" ]; then
+        dpkg -I ${WORKDIR}/*.deb
+    fi
 }
-- 
2.39.2


             reply	other threads:[~2024-06-26 11:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26 11:05 Felix Moessbauer [this message]
2024-06-26 13:22 ` MOESSBAUER, Felix

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=20240626110541.94885-1-felix.moessbauer@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=adriaan.schmidt@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