diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-09-25 09:49:06 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-09-27 22:28:06 +0200 |
commit | a8d104aa0eda11f36aaa20256353bf6ce6543065 (patch) | |
tree | a73d5ea1a0803c6b62feb3adf04df9417e1da948 /eclass/unpacker.eclass | |
parent | unpacker.eclass: Support lbzip2 as parallel bz2 decompressor (diff) | |
download | gentoo-a8d104aa0eda11f36aaa20256353bf6ce6543065.tar.gz gentoo-a8d104aa0eda11f36aaa20256353bf6ce6543065.tar.bz2 gentoo-a8d104aa0eda11f36aaa20256353bf6ce6543065.zip |
unpacker.eclass: Fix handling GNU ar archives in handwoven impl
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 <mgorny@gentoo.org>
Diffstat (limited to 'eclass/unpacker.eclass')
-rw-r--r-- | eclass/unpacker.eclass | 2 |
1 files changed, 2 insertions, 0 deletions
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 |