here: >124 # we do not want some stuff from the plain packages >125 if test -d $DESTDIR/opt ; then >126 rm -f $DESTDIR/opt/$INSTALLDIRNAME >127 rmdir --ignore-fail-on-non-empty $DESTDIR/opt >128 fi I see two issues: 1) why the presumption of the subdirectory $DESTDIR/opt? also, $INSTALLDIRNAME should perhaps be $INSTALLDIR in this context 2) non portable use of rmdir (gnu rmdir) perhaps `rmdir -p $DESTDIR/$INSTALLDIR 2>/dev/null' after adapting the previous lines
Perhaps the intent was something like: ># we do not want some stuff from the plain packages >if test -d $DESTDIR/$INSTALLDIR ; then > rm -rf $DESTDIR/$INSTALLDIRNAME/* > rmdir -p $DESTDIR/$INSTALLDIRNAME 2>/dev/null >fi
Oops, wrong window copied, this is what I meant: ># we do not want some stuff from the plain packages >if test -d $DESTDIR/$INSTALLDIR ; then > rm -f $DESTDIR/$INSTALLDIR/* > rmdir -p $DESTDIR/$INSTALLDIR 2>/dev/null >fi
(In reply to Richard PALO from comment #2) > Oops, wrong window copied, this is what I meant: > ># we do not want some stuff from the plain packages > >if test -d $DESTDIR/$INSTALLDIR ; then > > rm -f $DESTDIR/$INSTALLDIR/* > > rmdir -p $DESTDIR/$INSTALLDIR 2>/dev/null > >fi but with `rm -rf'
apparently the comments weren't clear to me as this is a good way to remove the install files. let's focus on issue 2) and simply correct the rmdir invocation to >rmdir -p $DESTDIR/$INSTALLDIR 2>/dev/null since there is also a portability issue with mktemp in the same file, I'll post a patch to gerrit to deal with both of these.
closing: apparently this bug was resolved by Richard PALO with https://cgit.freedesktop.org/libreoffice/core/commit/?id=b147a77f2e179f474051a4e50fa7ea300cdec8ee