* [PATCH] archiver.bbclass: warn about sources which are not archived
@ 2026-10-30 13:14 ecordonnier
2026-10-30 16:55 ` Paul Barker
0 siblings, 1 reply; 2+ messages in thread
From: ecordonnier @ 2026-10-30 13:14 UTC (permalink / raw)
To: openembedded-core; +Cc: Etienne Cordonnier
From: Etienne Cordonnier <ecordonnier@snap.com>
In the original mode, do_ar_original archives a source if the fetcher's
localpath is a file, or a directory. Any other source is silently skipped,
and the source archive is incomplete without any notice. This happened for
example for shallow git fetches, whose localpath is the clone in
DL_DIR/git2, which is not created when the shallow tarball is used.
No fetcher has a valid case for a localpath which is neither a file nor a
directory after do_fetch, so warn about it.
AI-Generated: Claude Opus 5.5
Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
---
meta/classes/archiver.bbclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 0400d6e373..3ba5a39d11 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -231,6 +231,8 @@ python do_ar_original() {
bb.fatal("Cannot determine archive names for original source because 'name=' URL parameter '%s' is used twice. Make it unique in: %s %s" % (name, tarball_suffix[name], url))
tarball_suffix[name] = url
create_tarball(d, tmpdir + '/.', name, ar_outdir)
+ else:
+ bb.warn("Not archiving %s: its local path %s is neither a file nor a directory" % (url, local))
# Emit patch series files for 'original'
bb.note('Writing patch series files...')
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] archiver.bbclass: warn about sources which are not archived
2026-10-30 13:14 [PATCH] archiver.bbclass: warn about sources which are not archived ecordonnier
@ 2026-10-30 16:55 ` Paul Barker
0 siblings, 0 replies; 2+ messages in thread
From: Paul Barker @ 2026-10-30 16:55 UTC (permalink / raw)
To: ecordonnier, openembedded-core
On Fri, 2026-10-30 at 14:14 +0100, ecordonnier@snap.com wrote:
> From: Etienne Cordonnier <ecordonnier@snap.com>
>
> In the original mode, do_ar_original archives a source if the fetcher's
> localpath is a file, or a directory. Any other source is silently skipped,
> and the source archive is incomplete without any notice. This happened for
> example for shallow git fetches, whose localpath is the clone in
> DL_DIR/git2, which is not created when the shallow tarball is used.
>
> No fetcher has a valid case for a localpath which is neither a file nor a
> directory after do_fetch, so warn about it.
Hi Etienne,
The archiver class is used for license compliance and to ensure sources
are available for later rebuilds or debug. If it fails to archive
something it is supposed to, that should be a fatal error, i.e.
bb.fatal().
Best regards,
--
Paul Barker
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-30 16:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-30 13:14 [PATCH] archiver.bbclass: warn about sources which are not archived ecordonnier
2026-10-30 16:55 ` Paul Barker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox