From: Quentin Schulz <quentin.schulz@cherry.de>
To: Philip Lorenz <philip.lorenz@bmw.de>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] ipk: Do not hardcode payload compression algorithm
Date: Fri, 3 May 2024 16:55:15 +0200 [thread overview]
Message-ID: <14513887-7fa9-47b9-9903-ce4336f46b5f@cherry.de> (raw)
In-Reply-To: <a0cff382-4302-4f27-96b6-ec41c243588b@bmw.de>
Hi Philip,
On 5/2/24 8:00 PM, Philip Lorenz wrote:
> Hi Quentin,
>
> On 02.05.24 19:19, Quentin Schulz wrote:
>> Sent from outside the BMW organization - be CAUTIOUS, particularly
>> with links and attachments.
>> Absender außerhalb der BMW Organisation - Bitte VORSICHT beim Öffnen
>> von Links und Anhängen.
>> -----------------------------------------------------------------------------------------------
>>
>> Hi Philip,
>>
>> On 5/2/24 4:27 PM, Philip Lorenz via lists.openembedded.org wrote:
>>> [You don't often get email from
>>> philip.lorenz=bmw.de@lists.openembedded.org. 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 <philip.lorenz@bmw.de>
>>> ---
>>> 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?
>
> Each call to extract() creates a new temporary directory into which the
> content of that particular IPK are extracted. IPKs should contain only
> one data tarball and as such the described scenario should never occur
> (and the length check I added is a merely a safety measure).
>
This makes sense, thanks for taking the time to explain.
Cheers,
Quentin
prev parent reply other threads:[~2024-05-03 14:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 14:27 [PATCH] ipk: Do not hardcode payload compression algorithm Philip Lorenz
2024-05-02 17:19 ` [OE-core] " Quentin Schulz
2024-05-02 18:00 ` Philip Lorenz
2024-05-03 14:55 ` Quentin Schulz [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=14513887-7fa9-47b9-9903-ce4336f46b5f@cherry.de \
--to=quentin.schulz@cherry.de \
--cc=openembedded-core@lists.openembedded.org \
--cc=philip.lorenz@bmw.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).