* [PATCH] deb-dl-dir: Fail if "apt-cache dumpavail" returns empty list
@ 2025-08-08 9:45 Anton Mikanovich
2025-09-11 8:58 ` Anton Mikanovich
0 siblings, 1 reply; 2+ messages in thread
From: Anton Mikanovich @ 2025-08-08 9:45 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
For non-host architectures, "apt-cache dumpavail" returns empty output.
Because of this, "debsrc_download" function doesn't download any
source packages without an error.
Make the task fail on empty list so that it could be caught in CI.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta/classes/deb-dl-dir.bbclass | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
index e75e6be5..4780be20 100644
--- a/meta/classes/deb-dl-dir.bbclass
+++ b/meta/classes/deb-dl-dir.bbclass
@@ -71,6 +71,12 @@ debsrc_download() {
apt-cache -o APT::Architecture=${DISTRO_ARCH} -o Dir=${rootfs} dumpavail \
| debsrc_source_version_filter > ${avail}
+ if [ $(cat ${avail} | wc -l) -eq 0 ]; then
+ bberror "No packages were found in apt cache"
+ debsrc_undo_mounts "${rootfs}"
+ return 1
+ fi
+
# Use apt-ftparchive to scan all .deb files found in the download directory
# and get the <source> <version> pairs that we wish to download
apt-ftparchive --md5=no --sha1=no --sha256=no --sha512=no \
--
2.34.1
--
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/20250808094520.3031199-1-amikan%40ilbers.de.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-11 8:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-08 9:45 [PATCH] deb-dl-dir: Fail if "apt-cache dumpavail" returns empty list Anton Mikanovich
2025-09-11 8:58 ` Anton Mikanovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox