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 > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 06-25-2011, 02:07 AM
Eric Bélanger
 
Default makepkg: Move check for sudo into check_software function

Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
---
scripts/makepkg.sh.in | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index ebe010b..4e15d54 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1449,6 +1449,13 @@ check_software() {
# check for needed software
local ret=0

+ # check for sudo if we will need it during makepkg execution
+ if (( ! ( ASROOT || INFAKEROOT ) && ( DEP_BIN || RMDEPS || INSTALL ) )); then
+ if ! type -p sudo >/dev/null; then
+ warning "$(gettext "Sudo can not be found. Will use su to acquire root privileges.")"
+ fi
+ fi
+
# fakeroot - building as non-root user
if [[ $(check_buildenv fakeroot) = "y" ]] && (( EUID > 0 )); then
if ! type -p fakeroot >/dev/null; then
@@ -1898,13 +1905,6 @@ else
fi
fi

-# check for sudo if we will need it during makepkg execution
-if (( ! ( ASROOT || INFAKEROOT ) && ( DEP_BIN || RMDEPS || INSTALL ) )); then
- if ! type -p sudo >/dev/null; then
- warning "$(gettext "Sudo can not be found. Will use su to acquire root privileges.")"
- fi
-fi
-
unset pkgname pkgbase pkgver pkgrel epoch pkgdesc url license groups provides
unset md5sums replaces depends conflicts backup source install changelog build
unset makedepends optdepends options noextract
--
1.7.5.4
 
Old 06-25-2011, 10:13 AM
Allan McRae
 
Default makepkg: Move check for sudo into check_software function

On 25/06/11 12:07, Eric Bélanger wrote:

Signed-off-by: Eric Bélanger<snowmaniscool@gmail.com>


Signed-off-by: Allan


Although I really need to fish out that patch from over a year ago that
made this configurable...


Allan
 

Thread Tools




All times are GMT. The time now is 02:58 AM.

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