# updating ports with svn



## copper (Jul 17, 2013)

Hi,

I previously would use csup(1) with a supfile to upgrade ports from a fresh install of FreeBSD 8.  The supfile updates specific ports that I was interested in building, and not the whole tree.

The guide seems geared towards checking out your own ports tree and maintaining it.  I am currently installing FreeBSD with ports from distro, then doing this

`cd /usr/ports`
`svn co -r {2012-10-17}  [url=svn://svn.freebsd.org/ports/head/net/isc-dhcp41-server]svn://svn.freebsd.org/ports/head/net/isc-dhcp41-server[/url] net/isc-dhcp41-server`
`svn -R resolve --accept working net/isc-dhcp41-server`
`svn -R revert net/isc-dhcp41-server`

Which seems pretty suboptimal. Is there a simpler/better/smarter way to upgrade specific ports to a specific version without checking out a new tree?

Thanks!


----------



## SirDice (Jul 17, 2013)

Save yourself a lot of headaches and just check-out a complete tree.


----------



## gkontos (Jul 17, 2013)

Better yet use portsnap(8) it is much faster and easier to use.


----------



## wblock@ (Jul 17, 2013)

portsnap(8) is not always faster.  I think it depends on how often you update.  Daily, or well, several times daily, `svn up` is faster for me.

But yes, the ports are meant to work as a unit.  After a full checkout, updates are not appreciably slower than with csup(1).  If the concern is with space, see net/svnup.


----------



## gkontos (Jul 18, 2013)

I find it very easy to just use a crontab like:


```
0 3 * * * root portsnap -I cron update && pkg_version -vIL=
```


----------



## copper (Jul 19, 2013)

Ok, I went with a small tree, details below in case someone else cares. 


```
/usr/local/bin/svn checkout --depth empty svn://svn.freebsd.org/ports/head  /my/tmp/ports/tree

cd /my/tmp/ports/tree

/usr/local/bin/svn update -r '{2012-10-17}' --set-depth files Mk Templates Tools net dns security sysutils devel
/usr/local/bin/svn update -r '{2012-10-17}' net/isc-dhcp41-server/ net/isc-dhcp41-relay/ net/isc-dhcp41-client/ net/mpd5/ net/dhcp6 net/wol dns/dnsmasq sysutils/mbmon security/ipsec-tools devel/libtool net/sixxs-aiccu devel/gmake security/gnutls

export PORTSDIR=/my/tmp/ports/tree
```


----------

