Skip to content

Commit

Permalink
desktop.eclass: Sanitize insopts
Browse files Browse the repository at this point in the history
Sanitize insopts when calling doins, in order to avoid prior insopts
calls accidentally affecting do*/new* functions defined by the eclass.
  • Loading branch information
mgorny committed Jun 13, 2018
1 parent 028f395 commit 49a3ae2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eclass/desktop.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ make_desktop_entry() {
(
# wrap the env here so that the 'insinto' call
# doesn't corrupt the env of the caller
insopts -m 0644
insinto /usr/share/applications
doins "${desktop}"
) || die "installing desktop file failed"
Expand Down Expand Up @@ -228,6 +229,7 @@ make_session_desktop() {
(
# wrap the env here so that the 'insinto' call
# doesn't corrupt the env of the caller
insopts -m 0644
insinto /usr/share/xsessions
doins "${desktop}"
)
Expand All @@ -243,6 +245,7 @@ domenu() {
# wrap the env here so that the 'insinto' call
# doesn't corrupt the env of the caller
local i j ret=0
insopts -m 0644
insinto /usr/share/applications
for i in "$@" ; do
if [[ -f ${i} ]] ; then
Expand All @@ -269,6 +272,7 @@ newmenu() {
(
# wrap the env here so that the 'insinto' call
# doesn't corrupt the env of the caller
insopts -m 0644
insinto /usr/share/applications
newins "$@"
)
Expand All @@ -282,6 +286,7 @@ _iconins() {
(
# wrap the env here so that the 'insinto' call
# doesn't corrupt the env of the caller
insopts -m 0644
local funcname=$1; shift
local size dir
local context=apps
Expand Down

0 comments on commit 49a3ae2

Please sign in to comment.