office-ext-r1.eclass: remove totally incorrect use of assert

It should have always been die.

From gentoo-historical-2.git,

```
commit 712cd6740c0bfa9d15dfd33ead7a52d5cdd4f87b
Author:     Tomas Chvatal <scarabeus@gentoo.org>
AuthorDate: Sat Mar 23 06:16:57 2013
Commit:     Tomas Chvatal <scarabeus@gentoo.org>
CommitDate: Sat Mar 23 06:16:57 2013

    Add next version of office-ext eclass. This time we can directly deploy libreoffice exts, but ooo crashes so keep backcompat over crashy uno interface for them (it is oo bug and they should fix it).
```

I have many questions. However, the one which is relevant here is: why
did this new eclass *add* new src_unpack logic to actually unpack files,
which called a single simple command, `unzip`, and then uses assert to
catch pipe errors in it.

Same issue as myspell-r2.eclass in the previous commit.

assert is banned in EAPI 9, so it has to go anyway. Take this
opportunity to perform a 14 year old cleanliness fix.

Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
This commit is contained in:
Eli Schwartz
2026-01-26 20:20:58 -05:00
parent 709284531e
commit fe81ea0302

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: office-ext-r1.eclass
@@ -108,8 +108,7 @@ office-ext-r1_src_unpack() {
mkdir -p "${WORKDIR}/${i}/" || die
pushd "${WORKDIR}/${i}/" > /dev/null || die
einfo "Unpacking "${OFFICE_EXTENSIONS_LOCATION}/${i}" to ${PWD}"
unzip -qo ${OFFICE_EXTENSIONS_LOCATION}/${i}
assert "failed unpacking ${OFFICE_EXTENSIONS_LOCATION}/${i}"
unzip -qo ${OFFICE_EXTENSIONS_LOCATION}/${i} || die "failed unpacking ${OFFICE_EXTENSIONS_LOCATION}/${i}"
popd > /dev/null || die
;;
*) unpack ${i} ;;