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 directory and install a sane sources.list, depending on the releases of Ubuntu
and add --aptconfdir to pbuilder call (LP: #175183) and add --aptconfdir to pbuilder call (LP: #175183)
- add support for gksudo|kdesudo|sudo depending on $DESKTOP_SESSION. - 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) * pbuilder-dist.bash_completion: (LP: #175728)
- added bash_completion instructions - added bash_completion instructions
* debian/rules: * debian/rules:

View File

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

View File

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