fetch2: add support for .debs containing uncompressed data tarballs
PATCH 1/1 fetch2: add support for .debs containing uncompressed data tarballs
Some .deb files contain uncompressed data tarballs which do not have an additional file extension after .tar. Add support for such cases while preserving the existing behaviour.
--- lib/bb/fetch2/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/bb/fetch2/__init__.py +2 -2
@@ -1569,11 +1569,11 @@ class FetchMethod(object): datafile = None if output: for line in output.decode().splitlines(): - if line.startswith('data.tar.'): + if line.startswith('data.tar.') or line == 'data.tar': datafile = line break else: - raise UnpackError("Unable to unpack deb/ipk package - does not contain data.tar.* file", urldata.url) + 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 && %s -p -f %s && rm %s' % (file, datafile, tar_cmd, datafile, datafile)
Signature · 1 line
2.39.5
I think git-send-email did something strange with the text encoding here so I've attached the .patch here additionally as a file.
From 5b49b71591d5a062eeb41010ca1a48b225bfcbc1 Mon Sep 17 00:00:00 2001
From: Isaac True <[email protected]>
Date: Mon, 26 May 2025 13:18:26 +0200
Subject: [PATCH] fetch2: add support for .debs containing uncompressed data
tarballs
Some .deb files contain uncompressed data tarballs which do not have an additional file extension after .tar. Add support for such cases while preserving the existing behaviour.
--- lib/bb/fetch2/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/bb/fetch2/__init__.py +2 -2
@@ -1569,11 +1569,11 @@ class FetchMethod(object): datafile = None if output: for line in output.decode().splitlines(): - if line.startswith('data.tar.'): + if line.startswith('data.tar.') or line == 'data.tar': datafile = line break else: - raise UnpackError("Unable to unpack deb/ipk package - does not contain data.tar.* file", urldata.url) + 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 && %s -p -f %s && rm %s' % (file, datafile, tar_cmd, datafile, datafile)
Signature · 1 line
2.39.5