# updated ports compile question



## nedry (Jan 13, 2017)

hi is there a command that will only compile and install preinstalled ports just ones that have been updated. i have done a: `portsnap fetch` and a `portsnap update` but i dont want to spend hours doing a `make deinstall` and `make install` if there is one command that checks all ports for a new release, then compiles them and then installs them. I know i could use commands to install binaries, but i prefer compiling.
nedry


----------



## Sevendogs (Jan 14, 2017)

ports-mgt/portmaster is what you need. After you update the ports tree, postmaster can check to see what is updated by looking at what you have installed. Works great. Read the docs for switches.

EDIT: I should have included some basic switches, sorry. `portmaster -a` will check all installed ports and update as necessary. You can use this little script I put together on advice from wblock (http://www.wonkity.com/~wblock/docs/html/portupgrade.html). Adjust your shell as necessary:


```
#! /bin/tcsh

portmaster -L --index-only | egrep '(ew|ort) version|total install'
echo -n "Last update: "
date -r `pkg query %t | sort | tail -n1` "+%Y%m%d"
```

I just called the script "checkupdate" and put it in root's $HOME and $PATH so it can be easily run after I update the ports tree.


----------



## nedry (Jan 14, 2017)

I have run `portmaster -af` however it stops at pkgconf-1.1.1 with the error, has known vulnerabilities, I know i can just `cd` into the port directory and do a `make DISABLE_VULNERABILITIES=yes install` however i dont want to do this for every port that has this flag, will take me ages. I tried adding the -f flag to `portmaster` however it still stops at known vulnerabilities. Is there a switch in `portmaster` that i can use that will automatically build and install src with the vulnerabilities flag? or do i have to do this manually and then run `portmaster` again?
nedry


----------



## nedry (Jan 14, 2017)

so far every port listed after running `portmaster -a` is flagged vulnerable, and i have to manually reinstall it. would be great if there is an update to portmaster that would automate applying the 
	
	



```
make DISABLE_VULNERABILITIES=yes reinstall
```
 part of the portmaster  options.


----------



## ljboiler (Jan 14, 2017)

Add `DISABLE_VULNERABILITIES=yes` to /etc/make.conf to have it applied to _everything_ you build.


----------



## nedry (Jan 14, 2017)

After doing a `portmaster -a` I also keep getting 
	
	



```
echo: write error on stdout
```
 but it keeps continuing.


----------



## Sevendogs (Jan 14, 2017)

What version of Freebsd are you running?


----------



## nedry (Jan 14, 2017)

Freebsd 11 p1, i rebooted and not getting the error message now.


----------

