FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 08-16-2012, 08:19 PM
Michał Górny
 
Default Convert simple uses to dointo/newinto.

I will provide patches for more if the functions are accepted.
---
eutils.eclass | 24 ++++++------------------
1 file changed, 6 insertions(+), 18 deletions(-)

diff --git a/eutils.eclass b/eutils.eclass
index 119fc32..f59b7ae 100644
--- a/eutils.eclass
+++ b/eutils.eclass
@@ -871,12 +871,8 @@ make_desktop_entry() {
fi
[[ -n ${fields} ]] && printf '%b
' "${fields}" >> "${desktop}"

- (
- # wrap the env here so that the 'insinto' call
- # doesn't corrupt the env of the caller
- insinto /usr/share/applications
- doins "${desktop}"
- ) || die "installing desktop file failed"
+ dointo /usr/share/applications "${desktop}"
+ || die "installing desktop file failed"
}

# @FUNCTION: validate_desktop_entries
@@ -932,12 +928,7 @@ make_session_desktop() {
Type=XSession
EOF

- (
- # wrap the env here so that the 'insinto' call
- # doesn't corrupt the env of the caller
- insinto /usr/share/xsessions
- doins "${desktop}"
- )
+ dointo /usr/share/xsessions "${desktop}"
}

# @FUNCTION: domenu
@@ -973,12 +964,9 @@ domenu() {
# @DESCRIPTION:
# Like all other new* functions, install the specified menu as newname.
newmenu() {
- (
- # wrap the env here so that the 'insinto' call
- # doesn't corrupt the env of the caller
- insinto /usr/share/applications
- newins "$@"
- )
+ [[ ${#} -eq 2 ]] || die 'Synopsis: newmenu <menu> <newname>'
+
+ newinto /usr/share/applications "${@}"
}

# @FUNCTION: _iconins
--
1.7.11.1
 

Thread Tools




All times are GMT. The time now is 01:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org