[Top][All Lists]

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

[Bug-stow] Directories must not be symbolic

From: Vivien Didelot
Subject: [Bug-stow] Directories must not be symbolic
Date: Fri, 04 Dec 2015 20:48:15 -0500
User-agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu)


I'm using Stow to manage my dotfiles as packages. I basically have the
following Stow directory in my $HOME:

    ├── emacs
    │   ├── .emacs
    │   └── .emacs.d
    │       └── .placeholder
    ├── git
    │   └── .gitconfig
    └── mail
        ├── bin
        │   ├── mua
        ├── .emacs.d
        │   ├── notmuch-config.el
        ├── Mail
        │   ├── .notmuch
        │   │   └── hooks
        │   │       ├── post-insert
        │   │       ├── post-new
        │   │       └── pre-new
        │   └── work
        │       └── .placeholder
        ├── .mbsyncrc
        ├── .msmtprc
        └── .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 mkdir 

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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]