The weird logic in domenu had an explicit separate clause
for unsuccessful return on non-existing files. This worked fine before
EAPI 4 since '|| die' was mandatory. However, since 'doins' started
dying on its own, developers have assumed the same for 'domenu'
and stopped checking the exit status. As a result, missing files
are now silently ignored.
Change the logic to explicitly die when the file does not exist.
To provide the best interoperability and avoid code duplication, just
let 'doins' die on its own.
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: desktop.eclass
insopts -m 0644
insinto /usr/share/applications
for i in "$@" ; do
- if [[ -f ${i} ]] ; then
- doins "${i}"
- ((ret+=$?))
- elif [[ -d ${i} ]] ; then
+ if [[ -d ${i} ]] ; then
for j in "${i}"/*.desktop ; do
doins "${j}"
((ret+=$?))
done
else
- ((++ret))
+ doins "${i}"
+ ((ret+=$?))
fi
done
exit ${ret}