[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#202081: tetex-extra: Regeneraters user's ls-R file as owned by root



On 02.08.03 Matijs van Zuijlen (Matijs.van.Zuijlen@xs4all.nl) wrote:
> On Tue, Jul 22, 2003 at 09:45:48AM +0200, Hilmar Preusse wrote:

Hi,

> > drachi:[hille] >sudo -H /usr/bin/mktexlsr
> > mktexlsr: Updating /var/lib/texmf/ls-R.opt...
> > mktexlsr: Updating /var/lib/texmf/ls-R.local...
> > mktexlsr: Updating /var/lib/texmf/ls-R...
> > mktexlsr: Updating /var/spool/texmf/ls-R...
> > mktexlsr: Done.
> > drachi:[hille] >sudo /usr/bin/mktexlsr
> > mktexlsr: Updating /home/hille/.texmf/ls-R...
> > mktexlsr: Updating /var/lib/texmf/ls-R.opt...
> > mktexlsr: Updating /var/lib/texmf/ls-R.local...
> > mktexlsr: Updating /var/lib/texmf/ls-R...
> > mktexlsr: Updating /var/spool/texmf/ls-R...
> > mktexlsr: Done.
> > drachi:[hille] >echo $HOME
> > /home/hille
> > drachi:[hille] >
> > 
> > HOMETEXMF = $HOME/.texmf
> > TEXMF = {!!$HOMETEXMF,!!$TEXMFOPT,!!$TEXMFLOCAL,!!$TEXMFMAIN}
> > 
> > Is that an option for you? Is it OK, if we just document that
> > anywhere?
> 
> Well, it would mean documenting the use of
> 
>   sudo -H aptitude
> 
> which is slightly tedious. I find it odd that sudo and su differ in
> their behaviour in this respect (although man su doesn't mention
> setting $HOME).
> 
No, su will leave your environment variables as long as you don't
call "su -". "su - " will treat your shell as login shell and call
all your profiles. What I don't understand:

drachi:[hille] >su -c /usr/bin/mktexlsr
Password:
mktexlsr: Updating /var/lib/texmf/ls-R.opt...
mktexlsr: Updating /var/lib/texmf/ls-R.local...
mktexlsr: Updating /var/lib/texmf/ls-R...
mktexlsr: Updating /var/spool/texmf/ls-R...
mktexlsr: Done.
drachi:[hille] >su - -c /usr/bin/mktexlsr
Password:
mktexlsr: Updating /var/lib/texmf/ls-R.opt...
mktexlsr: Updating /var/lib/texmf/ls-R.local...
mktexlsr: Updating /var/lib/texmf/ls-R...
mktexlsr: Updating /var/spool/texmf/ls-R...
mktexlsr: Done.
drachi:[hille] >su -c "echo $HOME"
Password:
/home/hille
drachi:[hille] >su - -c "echo $HOME"
Password:
/home/hille
drachi:[hille] >su
Password:
drachi:[hille] >exit
drachi:[hille] >su -
Password:
drachi:[~] #
^^^^^^^^^^^^ different prompt -> PS1 was changed.

drachi:[hille] >su -p -c /usr/bin/mktexlsr
Password:
mktexlsr: Updating /home/hille/.texmf/ls-R...
mktexlsr: Updating /var/lib/texmf/ls-R.opt...
mktexlsr: Updating /var/lib/texmf/ls-R.local...
mktexlsr: Updating /var/lib/texmf/ls-R...
mktexlsr: Updating /var/spool/texmf/ls-R...
mktexlsr: Done.

with -c su seems to behave a little bit different anyway.

> I'm thinking of filing bugs for those packages.
> 
I wouldn't call it a bug.

> That said, it might be a nice (think wishlist) thing, if mktexlsr
> would not change the ownership of the files it updates when it is
> run as root.
> 
The files, which contains the updates are completely new files, IIRC.
I.e. the databases are newly created and then moved over the old
files.

H. 
-- 
sigmentation fault



Reply to: