commit:     fe81ea030264dd483a2852114affdd9d139e69cf
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 27 01:20:58 2026 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Thu Mar 12 15:21:03 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe81ea03

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 <AT> gentoo.org>
AuthorDate: Sat Mar 23 06:16:57 2013
Commit:     Tomas Chvatal <scarabeus <AT> 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 <AT> gentoo.org>

 eclass/office-ext-r1.eclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/eclass/office-ext-r1.eclass b/eclass/office-ext-r1.eclass
index 9ee4561f0c11..b9943e8f16d4 100644
--- a/eclass/office-ext-r1.eclass
+++ b/eclass/office-ext-r1.eclass
@@ -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} ;;

Reply via email to