Skip to content

Commit

Permalink
bitbake: Add fetch workaround for L4T 32.7.1 debs unpack
Browse files Browse the repository at this point in the history
Tegra firmware debs fail to unpack after fetch in L4T 32.7.1
so we use a workaround in our local poky mirror to overcome this.

Upstream-status: Inappropriate [configuration]
Signed-off-by: Alexandru Costache <alexandru@balena.io>
  • Loading branch information
acostach committed Apr 8, 2022
1 parent 43cfa13 commit f9bcb85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bitbake/lib/bb/fetch2/__init__.py
Expand Up @@ -1506,7 +1506,10 @@ def unpack(self, urldata, rootdir, data):
raise UnpackError("Unable to unpack deb/ipk package - does not contain data.tar.* file", urldata.url)
else:
raise UnpackError("Unable to unpack deb/ipk package - could not list contents", urldata.url)
cmd = 'ar x %s %s && tar --no-same-owner -xpf %s && rm %s' % (file, datafile, datafile, datafile)
if datafile.endswith('.tzst') or datafile.endswith('.tar.zst'):
cmd = 'ar x %s %s && tar --use-compress-program=unzstd --no-same-owner -xpf %s && rm %s' % (file, datafile, datafile, datafile)
else:
cmd = 'ar x %s %s && tar --no-same-owner -xpf %s && rm %s' % (file, datafile, datafile, datafile)

# If 'subdir' param exists, create a dir and use it as destination for unpack cmd
if 'subdir' in urldata.parm:
Expand Down

0 comments on commit f9bcb85

Please sign in to comment.