From a8d104aa0eda11f36aaa20256353bf6ce6543065 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sun, 25 Sep 2022 09:49:06 +0200 Subject: unpacker.eclass: Fix handling GNU ar archives in handwoven impl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the hand-weaved implementation of ar unpacking that is used on Prefix to handle slash-terminated filenames of GNU ar format correctly. Signed-off-by: Michał Górny --- eclass/unpacker.eclass | 2 ++ 1 file changed, 2 insertions(+) (limited to 'eclass/unpacker.eclass') diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass index 370f00a83bba..100f11428622 100644 --- a/eclass/unpacker.eclass +++ b/eclass/unpacker.eclass @@ -282,6 +282,8 @@ unpack_deb() { local f timestamp uid gid mode size magic while read f timestamp uid gid mode size magic ; do [[ -n ${f} && -n ${size} ]] || continue # ignore empty lines + # GNU ar uses / as filename terminator (and .deb permits that) + f=${f%/} if [[ ${f} = "data.tar"* ]] ; then head -c "${size}" > "${f}" else -- cgit v1.2.3-65-gdbad