[email protected] wrote:
> Revision: 49087
> http://trac.macports.org/changeset/49087
> Author: [email protected]
> Date: 2009-04-03 04:34:32 -0700 (Fri, 03 Apr 2009)
> Log Message:
> -----------
> port1.0:
> Create namespaces for the packages in port1.0, stop polluting the global
> namespace with many local helper functions.
[...]
> Modified: trunk/base/src/port1.0/portfetch.tcl
> ===================================================================
> --- trunk/base/src/port1.0/portfetch.tcl 2009-04-03 11:19:09 UTC (rev
> 49086)
> +++ trunk/base/src/port1.0/portfetch.tcl 2009-04-03 11:34:32 UTC (rev
> 49087)
[...]
> # Given a distname, return a suffix based on the use_zip / use_bzip2 /
> use_dmg / extract.suffix options
> -proc suffix {distname} {
> +proc portfetch::suffix {distname} {
> global extract.suffix fetch.type
> switch -- "${fetch.type}" {
> cvs -
> @@ -181,6 +189,9 @@
> default { return "${distname}${extract.suffix}" }
> }
> }
> +# XXX import suffix into the global namespace as it is currently used from
> +# Portfiles, but should better go somewhere else
> +namespace import portfetch::suffix
What should I do with this suffix proc? It is currently used in
Portfiles, so we still need to have this in the global namespace.
So It is not namespace internal, so having it in portfetch:: and then
importing it into the global namespace is not really appropriate. But as
it is hard tied to the supported fetch types, I don't want to move it to
portutil or similar.
Would it be okay to have this as a global namespace proc in portfetch.tcl?
Rainer
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev