Dealing with GNU Stow conflicts

readlinestow

What is the recommended way of dealing with GNU Stow conflicts?

I tried to stow readline-6.2 and got the following warning:

> stow readline-6.2
Loading defaults from /home/josh/.stowrc
WARNING! stowing readline-6.2 would cause conflicts:
  * existing target is stowed to a different package: share/info/dir =>  
../../../stow_dir/stow_2.2.0_canonical_paths/share/info/dir
All operations aborted.

The clash is with the package stow_2.2.0_canonical_paths which is the package dir for stow (this is because I bootstrapped stow).

Here is is what that conflicting target contains:

> cat ~/local/share/info/dir 
This is the file .../info/dir, which contains the
topmost node of the Info hierarchy, called (dir)Top.
The first time you invoke Info you start off looking at this node.

File: dir,      Node: Top       This is the top of the INFO tree

  This (the Directory node) gives a menu of major topics.
  Typing "q" exits, "?" lists all Info commands, "d" returns here,
  "h" gives a primer for first-timers,
  "mEmacs<Return>" visits the Emacs manual, etc.

  In Emacs, you can click mouse button 2 on a menu item or cross reference
  to select it.

* Menu:

System administration
* Stow: (stow).                 GNU Stow.

What would be the recommended way of resolving this conflict?

Best Answer

The dir file is automatically generated/expanded by install-info and contain information about the available documentation of the texinfo documentation system.

You can simply delete this file. If you want to use info system, you can try to merge the dir into the other before. Or you can run a install-info command (e.g. install-info --info-dir=$PWD time.info.gz) in the share/info directory after you have linked all files there with stow.

Another option is to switch to xstow which can merge this file automatically if you add the following to your xstow.ini.

[exec]
match = dir # GNU info index file
exec = merge-info %t %s -o %t
exec-unstow = merge-info -u %t %s -o %t