Directories must not be symbolic
Vivien Didelot <[email protected]> Fri, 04 Dec 2015 20:48:15 -0500
| Newsgroups | gmane.comp.gnu.stow.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm using Stow to manage my dotfiles as packages. I basically have the
following Stow directory in my $HOME:
Stow
=E2=94=9C=E2=94=80=E2=94=80 emacs
=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 .emacs
=E2=94=82 =E2=94=94=E2=94=80=E2=94=80 .emacs.d
=E2=94=82 =E2=94=94=E2=94=80=E2=94=80 .placeholder
=E2=94=9C=E2=94=80=E2=94=80 git
=E2=94=82 =E2=94=94=E2=94=80=E2=94=80 .gitconfig
=E2=94=94=E2=94=80=E2=94=80 mail
=E2=94=9C=E2=94=80=E2=94=80 bin
=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 mua
=E2=94=9C=E2=94=80=E2=94=80 .emacs.d
=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 notmuch-config.el
=E2=94=9C=E2=94=80=E2=94=80 Mail
=E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 .notmuch
=E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 hooks
=E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 post-insert
=E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 post-new
=E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 pre-new
=E2=94=82 =E2=94=94=E2=94=80=E2=94=80 work
=E2=94=82 =E2=94=94=E2=94=80=E2=94=80 .placeholder
=E2=94=9C=E2=94=80=E2=94=80 .mbsyncrc
=E2=94=9C=E2=94=80=E2=94=80 .msmtprc
=E2=94=94=E2=94=80=E2=94=80 .notmuch-config
The problem is that if a directory doesn't exist in the target directory
(here it is $HOME), Stow will create a symlink for it, instead of
creating a real directory.
This is bad and unlikely to be wanted, because you may end up flooding
your Stow packages with unwanted files.
For instance, emacs will add some files in ~/.emacs.d
(e.g. auto-save-list, elpa, ido.last), that I wish not to manage. Worst,
my email database synced in ~/Mail/work (about 2.3G) or the notmuch
database in ~/Mail/.notmuch (about 1.8G) got into my mail package.
To workaround this issue, I remember myself to type the following
command from within the Stow directory to ensure each (or a single)
package has the required directories in the target before stowing it:
find * -mindepth 1 -type d | sed "s,^[^/]*,$HOME," | sort -u | xargs mk=
dir -p
IMHO, Stow must only symlink files, and create real directories. This
would ensure a simple and determinist behavior, and remove the need for
placeholders. What do you think?
Best,
-v