pbuilder-dist:

- add support for gksudo|kdesudo|sudo depending on $DESKTOP_SESSION.
      or if $PBUILDAUTH is set to something else, it will be used instead of
      sudo|gksudo|kdesudo (LP: #172943)
This commit is contained in:
Stephan Hermann 2008-01-22 19:12:40 +01:00
parent 84f00a9165
commit cbaaa07dab
3 changed files with 23 additions and 17 deletions

3
debian/changelog vendored
View File

@ -47,7 +47,8 @@ ubuntu-dev-tools (0.25) UNRELEASED; urgency=low
directory and install a sane sources.list, depending on the releases of Ubuntu
and add --aptconfdir to pbuilder call (LP: #175183)
- add support for gksudo|kdesudo|sudo depending on $DESKTOP_SESSION.
(LP: #172943)
or if $PBUILDAUTH is set to something else, it will be used instead of
sudo|gksudo|kdesudo (LP: #172943)
* pbuilder-dist.bash_completion: (LP: #175728)
- added bash_completion instructions
* debian/rules:

View File

@ -232,21 +232,26 @@ EOF
fi
fi
if [ -n $DESKTOP_SESSION ]
if [ -z $PBUILDAUTH ]
then
case $DESKTOP_SESSION in
gnome )
SUDOREPLACE="gksudo -D \"Pbuilder\" "
;;
kde|kde4 )
SUDOREPLACE="kdesudo -d --comment \"Pbuilder\""
;;
* )
SUDOREPLACE="sudo"
;;
esac
if [ -n $DESKTOP_SESSION ]
then
case $DESKTOP_SESSION in
gnome )
SUDOREPLACE="gksudo -D \"Pbuilder\" "
;;
kde|kde4 )
SUDOREPLACE="kdesudo -d --comment \"Pbuilder\""
;;
* )
SUDOREPLACE="sudo"
;;
esac
else
SUDOREPLACE="sudo"
fi
else
SUDOREPLACE="sudo"
SUDOREPLACE=$PBUILDAUTH
fi

View File

@ -4,8 +4,8 @@
# This script can be distributed under the same license as the
# cowdancer or bash packages.
#
# adapted to pbuilder, the license is GPLv2 or later.
# Copyright 2007 Junichi Uekawa <dancer@debian.org>
# adapted to pbuilderdist, the license is GPLv2 or later.
# Copyright 2008 Stephan Hermann <sh@sourcecode.de> for the Ubuntu MOTU Team
have pbuilder-dist &&
_pbuilder-dist()
@ -15,7 +15,7 @@ _pbuilder-dist()
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
options='create update build login execute dumpconfig'
options='create update build login execute'
case $prev in
build)