stow doesn't ignore files when linking entire directory
Mario Finelli <[email protected]> Tue, 26 Dec 2017 22:03:11 -0500
| Newsgroups | gmane.comp.gnu.stow.bugs |
|---|---|
| Message-ID | <[email protected]> |
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kqI35hwnOoiISnmw6ZYfps8InJkNR0Pel Content-Type: multipart/mixed; boundary="8e3LtiwbifKldk892kU9l1ZzPfZANpkkE"; protected-headers="v1" From: Mario Finelli <[email protected]> To: [email protected] Message-ID: <[email protected]> Subject: stow doesn't ignore files when linking entire directory --8e3LtiwbifKldk892kU9l1ZzPfZANpkkE Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Apologies if this has already been reported, I searched the archives but didn't find anything relevant. Here's my system info: [mario@stig ~]$ stow -V stow (GNU Stow) version 2.2.2 [mario@stig ~]$ perl -v | sed -n 2p This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-thread-multi [mario@stig ~]$ uname -a Linux stig 4.14.8-1-ARCH #1 SMP PREEMPT Wed Dec 20 21:27:44 UTC 2017 x86_64 GNU/Linux The bug manifests when trying to ignore files in a sub-directory that stow would like to link the entire directory. Instead of using the ignore list and linking individual files Stow still links the entire directory which causes unwanted files to be linked. For example with the following project structure: [mario@stig .dotfiles]$ cat test/.stow-local-ignore =2E*file2 [mario@stig .dotfiles]$ ls test/test/ file1 file2 I would expect that running "stow test" that stow would create a directory "test" and then link file1. What actually happens is that stow links the entire directory: [mario@stig .dotfiles]$ stow -vvv test stow dir is /home/mario/.dotfiles stow dir path relative to target /home/mario is .dotfiles cwd now /home/mario cwd restored to /home/mario/.dotfiles cwd now /home/mario Planning stow of package test... Stowing contents of .dotfiles/test (cwd=3D/home/mario) Stowing .dotfiles / test / test LINK: test =3D> .dotfiles/test/test Planning stow of package test... done cwd restored to /home/mario/.dotfiles Processing tasks... cwd now /home/mario cwd restored to /home/mario/.dotfiles Processing tasks... done [mario@stig .dotfiles]$ ls ~/test file1 file2 However, stow behaves correctly if the directory already exists: [mario@stig .dotfiles]$ stow -D test [mario@stig .dotfiles]$ mkdir ~/test [mario@stig .dotfiles]$ touch ~/test/file3 [mario@stig .dotfiles]$ stow -vvv test stow dir is /home/mario/.dotfiles stow dir path relative to target /home/mario is .dotfiles cwd now /home/mario cwd restored to /home/mario/.dotfiles cwd now /home/mario Planning stow of package test... Stowing contents of .dotfiles/test (cwd=3D/home/mario) Stowing .dotfiles / test / test Stowing contents of .dotfiles/test/test (cwd=3D/home/mario) Stowing .dotfiles / test / test/file1 LINK: test/file1 =3D> ../.dotfiles/test/test/file1 Planning stow of package test... done cwd restored to /home/mario/.dotfiles Processing tasks... cwd now /home/mario cwd restored to /home/mario/.dotfiles Processing tasks... done [mario@stig .dotfiles]$ ls ~/test file1 file3 In this case stow correctly links file1 and ignores file2. Am I misusing stow here? Or am I correct that the behavior for this use-case is wrong? I'd be happy to provide more information or help in any way that I can. Mario Finelli --8e3LtiwbifKldk892kU9l1ZzPfZANpkkE-- --kqI35hwnOoiISnmw6ZYfps8InJkNR0Pel Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCAAtFiEEw811sAKXioRoynsfbDrd3jb9owYFAlpDDW8PHG1hcmlvQGZp bmVsLmxpAAoJEGw63d42/aMGxVAQALnEdyb7FJ0B1748K/okNBj3Ncg/To7SC4pf yAFS/J9VyyyYS4xIhIr0g7QWJ7KBafrjBBoqCkBZwfix/4MUiAo8hFXB9EJ7Rap0 PSYcCle7xK+HNGehLhgVb0HreOb1UdhNgMCt1Rg/YON6zxCj1e4syr/rOVH1dnTH tcKmGxRDQaPGvblddpVow3JlkIJax1q2VnflawsdWN2fOCAKkS3+M2Rbe8DbgmvB QnI6f6Hk948w7UVqf5iF5p+dyBbw6yeJ9t4hDdkDSzsZZLUdSjxI1RoyT4/HtDDW +w+lDWVuPLDvTZ4ojT2lW45tW5yOUVa07dPZ1pJhxH9jKYAGkdY8s9Qjty822jIq 7v0JSYphgSxGRP/inJImsOJ9V0iHnraw5Vg/luT9wv3kPP1EPIYdJZLsfIcNThOR Ask01boVvdbda0bB6WqEq+9orrsWPCQ3g5oc/4QZQ4oQC/xBzOGWUke0YLeDCsbx I5hpOnJD0wYlHeZu+Xrv0k7uCibuZVOOQrNVpOHAkUeROeZFld3bjffA8DzoRjSx jkaEpr39tNwd5BRf+hQnPUXXU+aX5oQinHAgkl7nMF4ovQhjt1JKzxa2RbhyfAc9 saqQgDeyA8aU5L2cR7suxc7JQO763IUi3Qlyel8T8+Ske3moL70m/0keRXfWhzyC dE91dSH7 =HpSh -----END PGP SIGNATURE----- --kqI35hwnOoiISnmw6ZYfps8InJkNR0Pel--