diff --git a/debian/changelog b/debian/changelog index f319469..60f6599 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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: diff --git a/pbuilder-dist b/pbuilder-dist index d75fade..e1bbbd5 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -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 diff --git a/pbuilder-dist.bash_completion b/pbuilder-dist.bash_completion index 3be8723..a00b951 100644 --- a/pbuilder-dist.bash_completion +++ b/pbuilder-dist.bash_completion @@ -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 +# adapted to pbuilderdist, the license is GPLv2 or later. +# Copyright 2008 Stephan Hermann 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)