From: "'Cedric Hombourger' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Cedric Hombourger <cedric.hombourger@siemens.com>
Subject: [PATCH] deb-src: do not error but warn for missing source packages
Date: Sun, 23 Nov 2025 08:00:29 +0100 [thread overview]
Message-ID: <20251123070029.1674527-1-cedric.hombourger@siemens.com> (raw)
Some package repositories may only provide binary packages and no
source packages. While this is unfortunate, it shouldn't be fatal
either. Collect names and versions and print a warning for each.
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
meta/classes/deb-dl-dir.bbclass | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
index 16ccd426..7ebc3526 100644
--- a/meta/classes/deb-dl-dir.bbclass
+++ b/meta/classes/deb-dl-dir.bbclass
@@ -41,7 +41,8 @@ debsrc_download() {
# since "set -e" is used)
avail=$(mktemp)
wanted=$(mktemp)
- trap "rm -f ${avail} ${wanted}" EXIT
+ missing=$(mktemp)
+ trap "rm -f ${avail} ${wanted} ${missing}" EXIT
# List all packages known to apt
apt-cache -o APT::Architecture=${DISTRO_ARCH} -o Dir=${rootfs} dumpavail \
@@ -80,9 +81,16 @@ debsrc_download() {
-- \
apt-get -o APT::Architecture=${DISTRO_ARCH} \
-o Dir="${rootfs}" -y --download-only \
- --only-source source "${src}=${version}"
+ --only-source source "${src}=${version}" \
+ || echo "${src} ${version}" >> ${missing}
}
done
+
+ # warn for missing source packages
+ sort -u -o ${missing} ${missing}
+ while read pkg ver; do
+ bbwarn "could not find or download sources for ${pkg} ${ver}"
+ done < ${missing}
) 9>"${DEBSRCDIR}/${rootfs_distro}.lock"
}
--
2.47.3
--
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/20251123070029.1674527-1-cedric.hombourger%40siemens.com.
next reply other threads:[~2025-11-23 7:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-23 7:00 'Cedric Hombourger' via isar-users [this message]
2025-11-26 10:03 ` Zhihang Wei
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=20251123070029.1674527-1-cedric.hombourger@siemens.com \
--to=isar-users@googlegroups.com \
--cc=cedric.hombourger@siemens.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