'dot-' prefix and preexisiting directories
Black Lamb <[email protected]> Fri, 02 Aug 2019 19:08:55 -0400
| Newsgroups | gmane.comp.gnu.stow.bugs |
|---|---|
| Message-ID | <[email protected]> |
--=-AeB8sHkfm01oUV430GLB
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Stow version: 2.3.1
Perl version: 5.30.0
System information: Linux archlinux 5.2.4-arch1-1-ARCH #1 SMP PREEMPT
Sun Jul 28 10:52:46 UTC 2019 x86_64 GNU/Linux
Bug Description: stow fails to link files within dot-directories when
using 'dot-' prefix with the --dotfile option if the dot-directory
already exists in the target directory
Commands (assume no .stowrc):
$ cd ~
$ mkdir .foo
$ mkdir dotfiles
$ cd dotfiles
$ mkdir -p foobar/dot-foo
$ touch foobar/dot-foo/bar
$ stow --dotfiles --verbose=3 foobar # exit code 2
stow dir is /home/$USER/dotfiles
stow dir path relative to target /home/$USER is dotfiles
cwd now /home/$USER
cwd restored to /home/$USER/dotfiles
cwd now /home/$USER
Planning stow of package foobar...
Stowing contents of dotfiles/foobar (cwd=/home/$USER)
Stowing dotfiles / foobar / .foo
Stowing contents of dotfiles/foobar/.foo (cwd=/home/$USER)
stow: ERROR: stow_contents() called with non-directory path:
dotfiles/foobar/.foo
$ mv foobar/{dot-foo,.foo}
$ stow --verbose=3 foobar # works when not using 'dot-' preprocessing
stow dir is /home/$USER/dotfiles
stow dir path relative to target /home/$USER is dotfiles
cwd now /home/$USER
cwd restored to /home/$USER/dotfiles
cwd now /home/$USER
Planning stow of package foobar...
Stowing contents of dotfiles/foobar (cwd=/home/$USER)
Stowing dotfiles / foobar / .foo
Stowing contents of dotfiles/foobar/.foo (cwd=/home/$USER)
Stowing dotfiles / foobar / .foo/bar
LINK: .foo/bar => ../dotfiles/foobar/.foo/bar
Planning stow of package foobar... done
cwd restored to /home/$USER/dotfiles
Processing tasks...
cwd now /home/$USER
cwd restored to /home/$USER/dotfiles
Processing tasks... done
--=-AeB8sHkfm01oUV430GLB
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
<html dir=3D"ltr"><head></head><body style=3D"text-align:left; direction:lt=
r;"><div>Stow version: 2.3.1</div><div>Perl version: 5.30.0</div><div>Syste=
m information: Linux archlinux 5.2.4-arch1-1-ARCH #1 SMP PREEMPT Sun Jul 28=
10:52:46 UTC 2019 x86_64 GNU/Linux</div><div><br></div><div>Bug Descriptio=
n: stow fails to link files within dot-directories when using 'dot-' prefix=
with the --dotfile option if the dot-directory already exists in the targe=
t directory</div><div>Commands (assume no .stowrc):</div><div>$ cd ~</div><=
div>$ mkdir .foo</div><div>$ mkdir dotfiles</div><div>$ cd dotfiles</div><d=
iv>$ mkdir -p foobar/dot-foo</div><div>$ touch foobar/dot-foo/bar</div><div=
>$ stow --dotfiles --verbose=3D3 foobar # exit code 2</div><div>=
stow dir is /home/$USER/dotfiles</div><div>stow dir path relative to target=
/home/$USER is dotfiles</div><div>cwd now /home/$USER</div><div>cwd restor=
ed to /home/$USER/dotfiles</div><div>cwd now /home/$USER</div><div>Planning=
stow of package foobar...</div><div>Stowing contents of dotfiles/foobar (c=
wd=3D/home/$USER)</div><div>Stowing dotfiles / foobar / .foo</div><div>Stow=
ing contents of dotfiles/foobar/.foo (cwd=3D/home/$USER)</div><div>stow: ER=
ROR: stow_contents() called with non-directory path: dotfiles/foobar/.foo</=
div><div>$ mv foobar/{dot-foo,.foo}</div><div>$ stow --verbose=3D3 foobar&n=
bsp; # works when not using 'dot-' preprocessing</div><div>stow dir is=
/home/$USER/dotfiles</div><div>stow dir path relative to target /home/$USE=
R is dotfiles</div><div>cwd now /home/$USER</div><div>cwd restored to /home=
/$USER/dotfiles</div><div>cwd now /home/$USER</div><div>Planning stow of pa=
ckage foobar...</div><div>Stowing contents of dotfiles/foobar (cwd=3D/home/=
$USER)</div><div>Stowing dotfiles / foobar / .foo</div><div>Stowing content=
s of dotfiles/foobar/.foo (cwd=3D/home/$USER)</div><div>Stowing dotfiles / =
foobar / .foo/bar</div><div>LINK: .foo/bar =3D> ../dotfiles/foobar/.foo/=
bar</div><div>Planning stow of package foobar... done</div><div>cwd restore=
d to /home/$USER/dotfiles</div><div>Processing tasks...</div><div>cwd now /=
home/$USER</div><div>cwd restored to /home/$USER/dotfiles</div><div>Process=
ing tasks... done</div><div></div><div></div></body></html>
--=-AeB8sHkfm01oUV430GLB--