Hi Philip,

On 5/2/24 4:27 PM, Philip Lorenz via lists.openembedded.org wrote:
[You don't often get email from [email protected]. 
Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

The chosen payload compression algorithm can be changed by overriding
`OPKGBUILDCMD`. Ensure that package extraction deals with this by
globbing for "data.tar.*" to select the actual payload tarball.

Signed-off-by: Philip Lorenz <[email protected]>
---
  meta/lib/oe/package_manager/ipk/__init__.py | 8 +++++++-
  1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/package_manager/ipk/__init__.py 
b/meta/lib/oe/package_manager/ipk/__init__.py
index 8cc9953a027..0f0038d00d9 100644
--- a/meta/lib/oe/package_manager/ipk/__init__.py
+++ b/meta/lib/oe/package_manager/ipk/__init__.py
@@ -4,6 +4,7 @@
  # SPDX-License-Identifier: GPL-2.0-only
  #

+import glob
  import re
  import shutil
  import subprocess
@@ -134,11 +135,16 @@ class OpkgDpkgPM(PackageManager):
          tmp_dir = tempfile.mkdtemp()
          current_dir = os.getcwd()
          os.chdir(tmp_dir)
-        data_tar = 'data.tar.zst'

          try:
              cmd = [ar_cmd, 'x', pkg_path]
              output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+            data_tar = glob.glob("data.tar.*")

What happens if we have two consecutive builds with the same build directory but different compression algorithms? Would we have two data.tar.* matches?

Basically, I'm wondering here if we shouldn't have a way to extract the compression algorithm from a variable instead of trying to guess?

Cheers,
Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198929): 
https://lists.openembedded.org/g/openembedded-core/message/198929
Mute This Topic: https://lists.openembedded.org/mt/105863603/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to