Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Paul Barker <paul@pbarker.dev>
To: "João Marcos Costa" <joaomarcos.costa@bootlin.com>,
	openembedded-core@lists.openembedded.org
Cc: thomas.petazzoni@bootlin.com
Subject: Re: [PATCH] classes/archiver: fix tarball content in "original" mode
Date: Thu, 27 Aug 2026 14:12:29 +0100	[thread overview]
Message-ID: <6fc3dd417116cb61641a293fd9a4256774e708b4.camel@pbarker.dev> (raw)
In-Reply-To: <20260818133641.1269741-1-joaomarcos.costa@bootlin.com>

On Tue, 2026-08-18 at 15:36 +0200, João Marcos Costa wrote:
> When ARCHIVER_MODE[src] is set to "original", a tarball is generated with
> the unpacked sources of a given recipe. Prior to it, a tmpdir
> (i.e. from tempfile.mkdtemp()) is created and the sources are unpacked inside:
> 
> (...)/vim/9.2.0340/archiver-work/tmp8pu2nsck
> `-- vim-9.2.0340
>     |-- READMEdir
>     |-- ci
>     |-- lang
> 
> This tmpdir, however, ends up being shipped in the deployed tarball:
> 
> $ tar -tf vim-9.2.0340-r0.tar.xz
> (...)
> tmp8pu2nsck/vim-9.2.0340/ci/config.mk.clang-12.sed
> tmp8pu2nsck/vim-9.2.0340/LICENSE
> tmp8pu2nsck/vim-9.2.0340/.git-blame-ignore-revs
> (...)
> 
> This can be avoided by using "-C" option from tar's command, with which we
> can point to the tmpdir and to the content inside separately:
> 
> tar --exclude=temp --exclude=patches --exclude='.pc' \
> -C (...)/vim/9.1.1683/archiver-work/tmpv0m93p52 -cf - . | \
> xz --memlimit=50% --threads=64 > \
> (...)/vim/9.1.1683/archiver-sources/(...)/vim-9.1.1683-r0/vim-9.1.1683-r0.tar.xz
> 
> and in the result:
> 
> ./
> ./vim-9.1.1683/
> ./vim-9.1.1683/SECURITY.md
> ./vim-9.1.1683/.codecov.yml
> (...)
> 
> Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>

Reading this leaves me wondering why we're creating a tmpdir under
${ARCHIVER_WORKDIR}, why not just unpack the source directly under the
archiver workdir?

If the tmpdir is needed, I think the issue is that we're passing the
tmpdir path to create_tarball() in do_ar_original() instead of the full
path to the extracted sources. I think fixing the call site in
do_ar_original() would be cleaner if we can do that.

Best regards,

-- 
Paul Barker



      reply	other threads:[~2026-08-27 13:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 13:36 [PATCH] classes/archiver: fix tarball content in "original" mode João Marcos Costa
2026-08-27 13:12 ` Paul Barker [this message]

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=6fc3dd417116cb61641a293fd9a4256774e708b4.camel@pbarker.dev \
    --to=paul@pbarker.dev \
    --cc=joaomarcos.costa@bootlin.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=thomas.petazzoni@bootlin.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