Solved Non-default distfiles directory?

Greetings all,

what would be the motivation to move the distfiles from the default /usr/ports/distfiles directory? I am asking because ports-mgmt/synth suggests to place the distfiles outside the /usr/ports tree. What would be a preferred/logical location?

The only reason that I could think of, in general, not specifically for ports-mgmt/synth, is some corruption during ports update, which would require to delete and re-fetch the /usr/ports, but to avoid the need to re-download the distfiles.

Kindest regards,

M
 
FWIW, here are two more reasons:
  • To share it with other machines over NFS (though I suppose you could mount it on /usr/ports/distfiles as well then)
  • To share it between different ports tree checkouts
 
Hi tobik@,

thank you for the reply. I understand the first bullet-point, although I do not see why it could not be mounted as you suggested. Just for my education, could you elaborate on the second bullet-point?

Kindest regards,

M
 
Let's assume I have 3 ports tree checkouts with various half-baked ports ideas/fixes etc.
Code:
~/ports/head
~/ports/branch1
~/ports/branch2
Now when I switch ports trees it'll download things into ~/ports/head/distfiles, ~/ports/branch1/distfiles, ~/ports/branch2/distfiles i.e. distfiles will be duplicated for every ports tree.

To prevent that I can set
Code:
DISTDIR=/distfiles
in /etc/make.conf to share a common distfiles directory with all ports trees.
 
Hi tobik@,

thank you once again for the clear explanation.

So what would be a logical place to mount such the distfiles, somewhere under /var?

Kindest regards,

M
 
Hi tingo,

is it really necessary? Should the
Code:
DISTDIR=/path/to/distfiles
take care of the system's knowledge regarding the /distfiles directory?

Kindest regards,

M
 
Back
Top