Skipping *nix hidden folders while indexing
Rainer Müller
raimue at macports.org
Thu Jan 24 03:16:10 PST 2013
On 2013-01-23 01:30, Andrea D'Amore wrote:
> I sometime disable a port in tree and reindex, the natural way to do
> it is to prepend a dot to the portdir name. Is there anything against
> the following?
>
> Index: src/macports1.0/macports.tcl
> ===================================================================
> --- src/macports1.0/macports.tcl (revision 101957)
> +++ src/macports1.0/macports.tcl (working copy)
> @@ -1689,6 +1689,7 @@
> foreach port [lsort -increasing -unique [readdir
> $pathToCategory]] {
> set pathToPort [file join $pathToCategory $port]
> if {[file isdirectory $pathToPort] &&
> + [string index [file tail $pathToPort] 0] != "." &&
> [file exists [file join $pathToPort "Portfile"]]} {
> # Call the function.
> $func [file join $category $port]
>
+0
Nothing against this. Note that we are already skipping paths beginning
with an underscore in the category directory (to support _resources).
The underscore was chosen as path names starting with a dot would not be
displayed in Finder and the directory should still be accessible this
way. While I use the shell for management of my port directory anyway,
would there be a preference by others to use an underscore instead (or
in addition) to the proposed dot?
port lint should be extended to warn if a port name/port directory
starts with a dot/underscore.
Rainer
More information about the macports-dev
mailing list