# make fetch all distfiles autoskip



## dkovacevic (Jan 26, 2015)

Hello,

I am attempting to download all ports via


```
cd /usr/ports/ && make fetch
```

This works, but every time I reach a port that requires accepting a license or  that must be downloaded externally, the whole process stops.

What I want is a way to TRY to download all ports (skipping failed ports) and logging the ones that don't work. Perhaps piping error output to a log file?

The first step is continuing the download process when there is a failure (I can figure out the logging later).


----------



## ljboiler (Jan 26, 2015)

`script` and `make -k` are exactly what you need.


----------



## talsamon (Jan 26, 2015)

from `man make`:

```
-k  Continue processing after errors are encountered, but only on
  those targets that do not depend on the target whose creation
  caused the error.
```


----------



## wblock@ (Jan 27, 2015)

dkovacevic said:


> `cd /usr/ports/ && make fetch`



That will fetch every distfile for every port.  Don't do that, it's a terrible waste of time, space, and bandwidth.

To avoid configuration dialogs, see ports(7) about the BATCH variable.  Better is to use ports-mgmt/portmaster to install the leaf ports.  It will fetch all the distfiles in parallel, then show all the configuration dialogs before the build begins.


----------



## dkovacevic (Feb 2, 2015)

wblock@ said:


> That will fetch every distfile for every port.  Don't do that, it's a terrible waste of time, space, and bandwidth.
> 
> To avoid configuration dialogs, see ports(7) about the BATCH variable.  Better is to use ports-mgmt/portmaster to install the leaf ports.  It will fetch all the distfiles in parallel, then show all the configuration dialogs before the build begins.



That's what I wanted to do: fetch every distfile, for every port.

Yes, thanks for the BATCH suggestion- I actually got that on my own.


```
make -v -k fetch BATCH=YES TRYBROKEN=1 DISABLE_VULNERABILITIES=YES
```

Total download size was ~77 GB (`du -sh /usr/ports/distfiles`)


----------

