Skip to contentSkip to conversation

classes/archiver: fix tarball content in "original" mode

PATCH Joao Marcos Costa 2 participants 3 messages Sep 18 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello, folks

Quoted 43 lines · João Marcos Costa

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 pointing to the subdir where the sources are unpacked, rather than to tmpdir, when calling create_tarball().

The subdir's name can be inferred from 'BP', so we will use 'tmp8pu2nsck/vim-9.2.0340/.' instead of 'tmp8pu2nsck/.' as input.

e.g. and in the result:

./
./vim-9.2.0304/
./vim-9.2.0304/SECURITY.md
./vim-9.2.0304/.codecov.yml
(...)

---
  meta/classes/archiver.bbclass | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/archiver.bbclass +0 -0
index b274c53e79..c824718a1d 100644

meta/classes/archiver.bbclass python do_ar_original() { · line 236

Quoted 8 lines
meta/classes/archiver.bbclass +1 -1
@@ -230,7 +230,7 @@ python do_ar_original() {
                      else:
                          bb.fatal("Cannot determine archive names for original source because 'name=' URL parameter '%s' is used twice. Make it unique in: %s %s" % (tarball_suffix[name], url))
              tarball_suffix[name] = url
-            create_tarball(d, tmpdir + '/.', name, ar_outdir)
+            create_tarball(d, os.path.join(tmpdir, d.getVar('BP'), '.'), name, ar_outdir)
 
      # Emit patch series files for 'original'
      bb.note('Writing patch series files...')

Gentle ping: would there by any updates on this one? Thanks!

Signature · 2 lines
Best regards,
João Marcos Costa
#2 lore raw
Quoted 52 lines · Joao Marcos Costa via lists.openembedded.org

Hello, folks

Quoted 49 lines · João Marcos Costa

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 pointing to the subdir where the sources are unpacked, rather than to tmpdir, when calling create_tarball().

The subdir's name can be inferred from 'BP', so we will use 'tmp8pu2nsck/vim-9.2.0340/.' instead of 'tmp8pu2nsck/.' as input.

e.g. and in the result:

./
./vim-9.2.0304/
./vim-9.2.0304/SECURITY.md
./vim-9.2.0304/.codecov.yml
(...)

---
  meta/classes/archiver.bbclass | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/archiver.bbclass +1 -1
index b274c53e79..c824718a1d 100644
@@ -230,7 +230,7 @@ python do_ar_original() {
                      else:
                          bb.fatal("Cannot determine archive names for original source because 'name=' URL parameter '%s' is used twice. Make it unique in: %s %s" % (tarball_suffix[name], url))
              tarball_suffix[name] = url
-            create_tarball(d, tmpdir + '/.', name, ar_outdir)
+            create_tarball(d, os.path.join(tmpdir, d.getVar('BP'), '.'), name, ar_outdir)
 
Quoted 5 lines

meta/classes/archiver.bbclass python do_ar_original() { · line 236

Quoted 2 lines
meta/classes/archiver.bbclass +0 -0
      # Emit patch series files for 'original'
      bb.note('Writing patch series files...')

Gentle ping: would there by any updates on this one? Thanks!

Hello João,

I think there was a mail issue with the patch, it is not on lore (and, so, invisible to patchwork and most tools):
https://lore.kernel.org/all/[email protected]/

Quoted 1 line

[parent not found: <[email protected]>]

I think you should RESEND it.

Regards,

Signature · 2 lines
Yoann Congal
Smile ECS
#3 lore raw

Hello, Yoann

On 9/18/26 10:18 AM, Yoann Congal wrote:
(...)

Quoted 9 lines

I think there was a mail issue with the patch, it is not on lore (and, so, invisible to patchwork and most tools):
https://lore.kernel.org/all/[email protected]/

Quoted 1 line

[parent not found: <[email protected]>]

I think you should RESEND it.

Regards,

Oh, that's odd. Thanks for the heads up! I'll resend it.

Signature · 2 lines
Best regards,
João Marcos Costa