Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 771708 | Differences between
and this patch

Collapse All | Expand All

(-)a/eclass/desktop.eclass (-4 / +10 lines)
Lines 1-4 Link Here
1
# Copyright 1999-2020 Gentoo Authors
1
# Copyright 1999-2021 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
3
4
# @ECLASS: desktop.eclass
4
# @ECLASS: desktop.eclass
Lines 162-169 make_desktop_entry() { Link Here
162
	else
162
	else
163
		local desktop_name="${PN}-${slot}"
163
		local desktop_name="${PN}-${slot}"
164
	fi
164
	fi
165
	local desktop="${exec%%[[:space:]]*}"
165
	local desktop_exec="${exec%%[[:space:]]*}"
166
	desktop="${T}/${desktop##*/}-${desktop_name}.desktop"
166
	desktop_exec="${desktop_exec##*/}"
167
168
	# Prevent collisions if a file with the same name already exists #771708
169
	local desktop="${desktop_exec}-${desktop_name}" count=0
170
	while [[ -e ${ED}/usr/share/applications/${desktop}.desktop ]]; do
171
		desktop="${desktop_exec}-$((++count))-${desktop_name}"
172
	done
173
	desktop="${T}/${desktop}.desktop"
167
174
168
	# Don't append another ";" when a valid category value is provided.
175
	# Don't append another ";" when a valid category value is provided.
169
	type=${type%;}${type:+;}
176
	type=${type%;}${type:+;}
170
- 

Return to bug 771708