reports: suppress processing of most symbolic links
commit7ccf8b484b62b6f27003c08dfd61cccdaa8017b7
authorKyle J. McKay <mackyle@gmail.com>
Thu, 21 Dec 2017 02:36:26 +0000 (20 18:36 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Thu, 21 Dec 2017 02:36:26 +0000 (20 18:36 -0800)
treebaa8dafe3fb647725750a3b1d4b425b518777883
parenta4d1d13ceb32c6d7aa3bef8bb2d22be2b4383a86
reports: suppress processing of most symbolic links

Prior to the update to change "find" into "find -L" (just about
everywhere), symbolic links were ignored by the reports.

Girocco allows symbolic links to be placed under the reporoot to
provide project name aliases to other projects under reporoot.  This
can be helpful when a project gets renamed so that old links quietly
continue to function.

It's also possible to place a symbolic link under reporoot to
somewhere outside of reporoot so that it can be managed by Girocco.
The switch to "find -L" facilitates this.

However, if project name alias symbolic links are present the aliases
would be processed as additional "orphan" projects.  This unnecessarily
increases the processing time and causes erroneous output (the same
project gets processed multiple times).

Fix this by testing the prospective project and if it is a symbolic
link to somewhere else under reporoot just ignore it (this matches
the previous behavior prior to switching to "find -L").

If it's a symbolic link to somewhere outside reporoot then also
ignore it unless it's explicitly listed as one of Girocco's projects
in the group file.

This provides the best of both worlds.  Symbolic link project name
aliases are properly ignored but Girocco-owned projects living
outside reporoot are still processed (as they should be).

Since project-fsck-status already strictly limits its processing
to those projects known to Girocco, the changes for it are mostly
superfluous, but they will now prevent a symbolic link project name
that has been added to Girocco's group file for some reason from
being processed more than once.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
toolbox/reports/project-disk-use.sh
toolbox/reports/project-fsck-status.sh