bughelp wanted
Description
Originally reported here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=806915
Summary
The chkstow --list command only works when the stow directory is called 'stow'. This is mentioned in a "FIXME" comment in the current version of the source code.
# FIXME: what if the stow dir is not called 'stow'?
Below is a shell script to reproduce the behavior. The chkstow invocation outputs only
package1
when it should output
package1
package2
Suggested fix: let the chkstow command take a --dir flag like stow does.
Shell script
#! /usr/bin/env bash
mkdir -p target
mkdir -p stow/package1
touch stow/package1/file1
stow --verbose --dir=./stow --target=./target package1
mkdir -p stow2/package2
touch stow2/package2/file2
stow --verbose --dir=./stow2 --target=./target package2
chkstow --target ./target/ --list
Explanation:
There are two files, one in stow/ and one in stow2/, like this:
$ tree stow stow2
stow
└── package1
└── file1
stow2
└── package2
└── file2
which produces a target like this:
$ file target/*
target/file1: symbolic link to ../stow/package1/file1
target/file2: symbolic link to ../stow2/package2/file2
But chkstow only recognizes the symlink pointing to stow/, not the one pointing to stow2/ as well:
$ chkstow --target ./target/ --list
package1