|--no||Do not perform any operations that modify the filesystem; merely show what would happen.|
|--dir=DIR||Set the stow directory to DIR instead of the current directory. This also has the effect of making the default target directory be the parent of DIR.|
|--target=DIR||Set the target directory to DIR instead of the parent of the stow directory.|
|--verbose[=N]||Send verbose output to standard error describing what Stow is doing. Verbosity levels are 0, 1, 2, 3, and 4; 0 is the default. Using -v or --verbose increases the verbosity by one; using --verbose=N sets it to N.|
|--stow||Stow the packages that follow this option into the target directory. This is the default action and so can be omitted if you are only stowing packages rather than performing a mixture of stow/delete/restow actions.|
|--delete||Unstow the packages that follow this option from the target directory rather than installing them.|
|--restow||Restow packages (first unstow, then stow again). This is useful for pruning obsolete symlinks from the target tree after updating the software in a package.|
Warning! This behaviour is specifically intended to alter the
contents of your stow directory. If you do not want that, this option
is not for you.
When stowing, if a target is encountered which already exists but is a plain file (and hence not owned by any existing stow package), then normally Stow will register this as a conflict and refuse to proceed. This option changes that behaviour so that the file is moved to the same relative place within the packages installation image within the stow directory, and then stowing proceeds as before. So effectively, the file becomes adopted by the stow package, without its contents changing.
|--no-folding||Disable folding of newly stowed directories when stowing, and refolding of newly foldable directories when unstowing.|
|--ignore=REGEX||Ignore files ending in this Perl regex.|
|--defer=REGEX||Dont stow files beginning with this Perl regex if the file is already stowed to another package.|
|--override=REGEX||Force stowing files beginning with this Perl regex if the file is already stowed to another package.|
|--version||Show Stow version number, and exit.|
|--help||Show Stow command syntax, and exit.|
The default action of Stow is to install a package. This means creating symlinks in the target tree that point into the package tree. Stow attempts to do this with as few symlinks as possible; in other words, if Stow can create a single symlink that points to an entire subtree within the package tree, it will choose to do that rather than create a directory in the target tree and populate it with symlinks.
For example, suppose that no packages have yet been installed in /usr/local; its completely empty (except for the stow subdirectory, of course). Now suppose the Perl package is installed. Recall that it includes the following directories in its installation image: bin; info; lib/perl; man/man1. Rather than creating the directory /usr/local/bin and populating it with symlinks to ../stow/perl/bin/perl and ../stow/perl/bin/a2p (and so on), Stow will create a single symlink, /usr/local/bin, which points to stow/perl/bin. In this way, it still works to refer to /usr/local/bin/perl and /usr/local/bin/a2p, and fewer symlinks have been created. This is called tree folding, since an entire subtree is folded into a single symlink.
To complete this example, Stow will also create the symlink /usr/local/info pointing to stow/perl/info; the symlink /usr/local/lib pointing to stow/perl/lib; and the symlink /usr/local/man pointing to stow/perl/man.
Now suppose that instead of installing the Perl package into an empty target tree, the target tree is not empty to begin with. Instead, it contains several files and directories installed under a different system-administration philosophy. In particular, /usr/local/bin already exists and is a directory, as are /usr/local/lib and /usr/local/man/man1. In this case, Stow will descend into /usr/local/bin and create symlinks to ../stow/perl/bin/perl and ../stow/perl/bin/a2p (etc.), and it will descend into /usr/local/lib and create the tree-folding symlink perl pointing to ../stow/perl/lib/perl, and so on. As a rule, Stow only descends as far as necessary into the target tree when it can create a tree-folding symlink.
The time often comes when a tree-folding symlink has to be undone because another package uses one or more of the folded subdirectories in its installation image. This operation is called splitting open a folded tree. It involves removing the original symlink from the target tree, creating a true directory in its place, and then populating the new directory with symlinks to the newly-installed package and to the old package that used the old symlink. For example, suppose that after installing Perl into an empty /usr/local, we wish to install Emacs. Emacss installation image includes a bin directory containing the emacs and etags executables, among others. Stow must make these files appear to be installed in /usr/local/bin, but presently /usr/local/bin is a symlink to stow/perl/bin. Stow therefore takes the following steps: the symlink /usr/local/bin is deleted; the directory /usr/local/bin is created; links are made from /usr/local/bin to ../stow/emacs/bin/emacs and ../stow/emacs/bin/etags; and links are made from /usr/local/bin to ../stow/perl/bin/perl and ../stow/perl/bin/a2p.
When splitting open a folded tree, Stow makes sure that the symlink it is about to remove points inside a valid package in the current stow directory.
Stow owns everything living in the target tree that points into a package in the stow directory. Anything Stow owns, it can recompute if lost. Note that by this definition, Stow doesnt own anything in the stow directory or in any of the packages.
If Stow needs to create a directory or a symlink in the target tree and it cannot because that name is already in use and is not owned by Stow, then a conflict has arisen. See the Conflicts section in the info manual.
When the -D option is given, the action of Stow is to delete a package from the target tree. Note that Stow will not delete anything it doesnt own. Deleting a package does not mean removing it from the stow directory or discarding the package tree.
To delete a package, Stow recursively scans the target tree, skipping over the stow directory (since that is usually a subdirectory of the target tree) and any other stow directories it encounters (see Multiple stow directories in the info manual). Any symlink it finds that points into the package being deleted is removed. Any directory that contained only symlinks to the package being deleted is removed. Any directory that, after removing symlinks and empty subdirectories, contains only symlinks to a single other package, is considered to be a previously folded tree that was split open. Stow will re-fold the tree by removing the symlinks to the surviving package, removing the directory, then linking the directory back to the surviving package.
The full documentation for stow is maintained as a Texinfo manual. If the info and stow programs are properly installed at your site, the command
should give you access to the complete manual.
Please report bugs in Stow using the Debian bug tracking system.
Currently known bugs include:
o The empty-directory problem.
If package foo includes an empty directory say, foo/bar then if no other package has a bar subdirectory, everythings fine. If another stowed package quux, has a bar subdirectory, then when stowing, targetdir/bar will be split open and the contents of quux/bar will be individually stowed. So far, so good. But when unstowing quux, targetdir/bar will be removed, even though foo/bar needs it to remain. A workaround for this problem is to create a file in foo/bar as a placeholder. If you name that file .placeholder, it will be easy to find and remove such files when this bug is fixed.
o When using multiple stow directories (see Multiple stow directories in the info manual), Stow fails to split open tree-folding symlinks (see Installing packages in the info manual) that point into a stow directory which is not the one in use by the current Stow command. Before failing, it should search the target of the link to see whether any element of the path contains a .stow file. If it finds one, it can learn about the cooperating stow directory to short-circuit the .stow search the next time it encounters a tree-folding symlink.
This man page was originally constructed by Charles Briscoe-Smith from parts of Stows info manual, and then converted to POD format by Adam Spiers. The info manual contains the following notice, which, as it says, applies to this manual page, too. The text of the section entitled GNU General Public License can be found in the file /usr/share/common-licenses/GPL on any Debian GNU/Linux system. If you dont have access to a Debian system, or the GPL is not there, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA.
Copyright (C) 1993, 1994, 1995, 1996 by Bob Glickstein <firstname.lastname@example.org>; 2000, 2001 by Guillaume Morin; 2007 by Kahlil Hodgson; 2011 by Adam Spiers; and others.
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also that the section entitled GNU General Public License is included with the modified manual, and provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.
|perl v5.20.1||IO::FILE=IO(0X81D9F0) (1)||2015-11-09|