info dir conflict installing emacs from source

jeff stern <[email protected]> Sat, 26 Sep 2015 19:01:12 -0700
Newsgroups gmane.comp.gnu.stow.bugs
Message-ID <CALMHRHEW2_SqJ6MJmG7m9EJ1qCcuRQ1u6eqqcj-TO-s94Tm4Gg@mail.gmail.com>
--001a113974108c7fab0520b0f4c7
Content-Type: text/plain; charset=UTF-8

Hello,

Using stow with emacs source installations today, following the
instructions at (*) and (+) was almost a no-brainer for me, except for one
thing: a conflict when trying to run stow.  It turns out stow had a
conflict with dir files (you probably know about this already..?)

   /usr/local/stow/emacs-24.5/share/info/dir  <--- /usr/local/share/info/dir

But stow could not make the above symlink from /usr/local/share/info/dir
because /usr/local/share/info/dir already existed (and I already had info
files in that dir).

Therefore, when I finished compiling emacs successfully and installing
under /usr/local/stow/emacs-24.5, and then ran stow, I got an error:

=========================================================
$ ./configure --with-xft --with-x-toolkit=lucid
$ make
$ sudo make install prefix=/usr/local/stow/emacs-24.5
$ cd /usr/local/stow
$ sudo stow --verbose=3 emacs-24.5
WARNING! stowing emacs-24.5 would cause conflicts:
  * existing target is neither a link nor a directory: share/info/dir
All operations aborted.
$ _
=========================================================

..and it took me most of the afternoon to figure out what it was (me being
a first-time user of stow).

The conflict was not with "share/info/dir" nor with "
/usr/local/stow/share/info/dir". It was with a previously existing "
/usr/local/share/info/dir".  Again, as a first time user of stow, I did not
know this and could not tell easily from the error message because of the
incomplete path listed.

Suggestion #1: It would save me time if the error message were more
explicit in 4 ways:


   1. use full pathnames,
   2. say what action exactly stow was trying to take
   3. mention BOTH the source and the target files involved, and
   4. tell the user what they can now do about it.


For instance, ideally I would have seen an error message like the following:

I cannot symlink /usr/local/share/info/dir to
/usr/local/stow/share/info/dir because /usr/local/share/info/dir already
exists. Please rectify this by hand.


Suggestion #2: Is it possible to merge 2 dir files into 1?

It seems to me that my previously-existing dir file (
/usr/local/share/info/dir) and the new one coming in from the emacs
compilation (/usr/local/stow/share/info/dir) really needed to be merged
into a single file. So..

2a) Can install-info merge two "dir" files? (I don't know enough about
install-info).

2b) If so, would it be possible to enhance stow so that if it sees a dir
file conflict it calls install-info intelligently the background to merge
them?

Thanks,
Let me know if there is any additional information I can provide.

Jeff Stern [email protected]

(*) http://www.emacswiki.org/emacs/BuildingEmacs#toc2
(+) https://gist.github.com/favadi/18438172892bc4178b27

additional system info, per instructions
<http://www.gnu.org/software/stow/manual/stow.html#Reporting-Bugs> ..

   - stow (GNU Stow) version 2.2.0
   - perl v5.18.2) built for x86_64-linux-gnu-thread-multi
   - Linux tonka 3.13.0-63-lowlatency #103-Ubuntu SMP PREEMPT Fri Aug 14
   22:23:32 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

--001a113974108c7fab0520b0f4c7
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,<div><br><div>Using stow with emacs source installat=
ions today, following the instructions at (*) and (+) was almost a no-brain=
er for me, except for one thing: a conflict when trying to run <font face=
=3D"monospace, monospace">stow</font>.=C2=A0 It turns out <font face=3D"mon=
ospace, monospace">stow</font> had a conflict with <font face=3D"monospace,=
 monospace">dir</font> files (you probably know about this already..?)</div=
><div><br></div><div><span style=3D"font-family:monospace,monospace">=C2=A0=
 =C2=A0/usr/local/stow/emacs-24.5/share/info/dir =C2=A0&lt;--- /usr/local/s=
hare/info/dir</span><br></div><div><br></div><div>But stow could not make t=
he above symlink from <font face=3D"monospace, monospace">/usr/local/share/=
info/dir</font> because <font face=3D"monospace, monospace">/usr/local/shar=
e/info/dir</font> already existed (and I already had info files in that dir=
).</div><div><br></div><div>Therefore, when I finished compiling emacs succ=
essfully and installing under <font face=3D"monospace, monospace">/usr/loca=
l/stow/emacs-24.5</font>, and then ran <font face=3D"monospace, monospace">=
stow</font>, I got an error:</div><div><br></div><div>=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
<br></div><div><div><font face=3D"monospace, monospace">$ ./configure --wit=
h-xft=C2=A0</font><span style=3D"font-family:monospace,monospace">--with-x-=
toolkit=3Dlucid</span></div><div><font face=3D"monospace, monospace">$ make=
</font></div><div><font face=3D"monospace, monospace">$ sudo make install p=
refix=3D/usr/local/stow/emacs-24.5<br></font></div><div><font face=3D"monos=
pace, monospace">$ cd /usr/local/stow</font></div><div><font face=3D"monosp=
ace, monospace">$ sudo stow --verbose=3D3 emacs-24.5</font></div><div><font=
 face=3D"monospace, monospace">WARNING! stowing emacs-24.5 would cause conf=
licts:</font></div><div><font face=3D"monospace, monospace">=C2=A0 * existi=
ng target is neither a link nor a directory: share/info/dir</font></div><di=
v><font face=3D"monospace, monospace">All operations aborted.</font></div><=
div><font face=3D"monospace, monospace">$ _</font></div></div><div>=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D<br></div><div><br></div><div>..and it took me most of the a=
fternoon to figure out what it was (me being a first-time user of stow).</d=
iv><div><br></div><div>The conflict was not with &quot;<font face=3D"monosp=
ace, monospace">share/info/dir</font>&quot; nor with &quot;<font face=3D"mo=
nospace, monospace">/usr/local/stow/share/info/dir</font>&quot;. It was wit=
h a previously existing &quot;<font face=3D"monospace, monospace">/usr/loca=
l/share/info/dir</font>&quot;.=C2=A0 Again, as a first time user of <font f=
ace=3D"monospace, monospace">stow</font>, I did not know this and could not=
 tell easily from the error message because of the incomplete path listed.<=
/div><div><br></div><div>Suggestion #1: It would save me time if the error =
message were more explicit in 4 ways:</div><div><br></div><div><ol><li>use =
full pathnames,<br></li><li>say what action exactly stow was trying to take=
<br></li><li>mention BOTH the source and the target files involved, and<br>=
</li><li>tell the user what they can now do about it.<br></li></ol></div><d=
iv><br></div><div>For instance, ideally I would have seen an error message =
like the following:</div><div><br></div></div><blockquote style=3D"margin:0=
px 0px 0px 40px;border:none;padding:0px"><div><div><font face=3D"monospace,=
 monospace">I cannot symlink /usr/local/share/info/dir to /usr/local/stow/s=
hare/info/dir because /usr/local/share/info/dir already exists. Please rect=
ify this by hand.</font></div></div></blockquote><div><div><br></div><div>S=
uggestion #2: Is it possible to merge 2=C2=A0<font face=3D"monospace, monos=
pace">dir</font> files into 1?</div><div><br></div><div>It seems to me that=
 my previously-existing <font face=3D"monospace, monospace">dir</font> file=
 (<font face=3D"monospace, monospace">/usr/local/share/info/dir</font>) and=
 the new one coming in from the emacs compilation (<font face=3D"monospace,=
 monospace">/usr/local/stow/share/info/dir</font>) really needed to be merg=
ed into a single file. So..</div><div><br></div><div>2a) Can <font face=3D"=
monospace, monospace">install-info</font> merge two &quot;<font face=3D"mon=
ospace, monospace">dir</font>&quot; files? (I don&#39;t know enough about <=
font face=3D"monospace, monospace">install-info</font>).</div><div><br></di=
v><div>2b) If so, would it be possible to enhance <font face=3D"monospace, =
monospace">stow</font> so that if it sees a <font face=3D"monospace, monosp=
ace">dir</font> file conflict it calls <font face=3D"monospace, monospace">=
install-info</font>=C2=A0intelligently the background to merge them?</div><=
div><br></div><div>Thanks,</div><div>Let me know if there is any additional=
 information I can provide.</div><div><br></div><div>Jeff Stern <a href=3D"=
mailto:[email protected]">[email protected]</a></div><div><br></div><di=
v>(*)=C2=A0<a href=3D"http://www.emacswiki.org/emacs/BuildingEmacs#toc2">ht=
tp://www.emacswiki.org/emacs/BuildingEmacs#toc2</a></div><div>(+)=C2=A0<a h=
ref=3D"https://gist.github.com/favadi/18438172892bc4178b27">https://gist.gi=
thub.com/favadi/18438172892bc4178b27</a></div></div><div><br></div><div>add=
itional system info, per=C2=A0<a href=3D"http://www.gnu.org/software/stow/m=
anual/stow.html#Reporting-Bugs">instructions</a>=C2=A0..</div><div><ul><li>=
stow (GNU Stow) version 2.2.0<br></li><li>perl v5.18.2) built for x86_64-li=
nux-gnu-thread-multi<br></li><li>Linux tonka 3.13.0-63-lowlatency #103-Ubun=
tu SMP PREEMPT Fri Aug 14 22:23:32 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux<=
/li></ul></div></div>

--001a113974108c7fab0520b0f4c7--