mirror_sites.tcl and `:nosubdir` tag

Joshua Root jmr at macports.org
Tue May 5 20:56:29 PDT 2015

On 2015-5-6 03:14 , petr wrote:
> Hi all,
> in ticket #47571 (https://trac.macports.org/ticket/47571) I am proposing a small addition to mirror_sites.tcl. However, I do not fully understand the function and use of the tag `:nosubdir`. There is some comment in the file
> {{{
> # Appending :nosubdir as a tag to a mirror, means that
> # the portfetch target will NOT append a subdirectory to
> # the mirror site.
> }}}
> but I still do not understand which effect it will have if this tag was appended. Can anybody comment on this!

Perhaps this is best answered with an example. If we set up a port like

name		testport1
version		1.0
master_sites	apache

then we are using the apache mirror set, which is defined (in part) like

set portfetch::mirror_sites::sites(apache) {

'port distfiles testport1' then shows us that the distfile will be
downloaded from (among others) this URL:


Notice that the port's name has been added as a subdir.

If we then change master_sites to:

master_sites	freebsd

which is defined like this:

set portfetch::mirror_sites::sites(freebsd) {

we then see this from 'port distfiles':


Which, as the name of the tag suggests, has no added subdir.

- Josh

More information about the macports-dev mailing list