Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   dpkg-reconfigure affected by environment variables (http://www.linux-archive.org/debian-user/313422-dpkg-reconfigure-affected-environment-variables.html)

Vincent Lefevre 01-22-2010 03:03 PM

dpkg-reconfigure affected by environment variables
 
Is it normal that dpkg-reconfigure can be affected by environment
variables?

For instance, I have PERL5LIB set to /home/vlefevre/lib/site_perl,
and when I do a "su", this variable is kept in the environment,
and in the strace output on a dpkg-reconfigure, I could see that
$PERL5LIB was searched for Perl modules.

--
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

"Boyd Stephen Smith Jr." 01-22-2010 03:32 PM

dpkg-reconfigure affected by environment variables
 
On Friday 22 January 2010 10:03:07 Vincent Lefevre wrote:
> Is it normal that dpkg-reconfigure can be affected by environment
> variables?

That's pretty normal. Most programs don't go out of their way to ignore your
environment settings.

dpkg-reconfigure also uses things like LANG and LC_* for when it invokes
debconf.

> For instance, I have PERL5LIB set to /home/vlefevre/lib/site_perl,
> and when I do a "su", this variable is kept in the environment,
> and in the strace output on a dpkg-reconfigure, I could see that
> $PERL5LIB was searched for Perl modules.

You can use (su -) to get a "clean" environment. sudo also has features for
cleaning the environment when changing users.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/


All times are GMT. The time now is 04:19 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.