Russ Allbery <r...@debian.org> writes:

> Oh, good catch!  The same thing was true of mine.
>
> I think the dates were when I upgraded Emacs.  Let me take a guess: are
> you also old-school and use su from a regular user account when installing
> new packages?  HOME gets overridden by su, but LOGNAME and USER do not,
> and I suspect something in Emacs is deciding where to write files based on
> USER, and the installation process of emacs-lucid creates the eln-cache
> directory for some reason.

Agreed, nice catch, very glad y'all found this.  And not sure it'd be
appropriate in your case, and you may well know, but adding the "-"
argument to su may avoid the issue for you.

> I'm downgrading the severity of this bug because I suspect the average
> user using sudo may not run into it (although the maintainer should feel
> free to raise the severity again if they disagree).  If I'm right, the
> best place to solve the problem may be in the Debian maintainer scripts,
> overwriting USER (and possibly LOGNAME, not sure if it matters) to some
> safe value like root while performing the installation.  This may also be
> necessary to do when installing Emacs add-on packges; I'm not sure.

Possibly, but I'd assumed the installation processs should expect a
"normal" root environment, and if so, "su" without the dash wouldn't
qualify.  Otherwise, random user .bashrc changes (that su doesn't reset)
could affect the install.

> I've removed the directory with the wrong ownership and upgraded again
> with USER and LOGNAME set to root, and now everything works fine.  (Well,
> my laptop gets extremely hot the first time I start the new Emacs, but I
> assume that's expected for the new compilation system.)

Yes, I believe that should only happen once per .el file, per user[1],
but it's not cheap.

[1] ...until/unless we decide to ship NATIVE_FULL_AOT packages (all
    upstream files precompiled).  But if nothing else, that's not ready
    for broad use yet.

-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

Reply via email to