# Maintaining ports correctly?



## Deleted member 2077 (Aug 20, 2010)

Ok, I'm going to start with a fresh 8.1 today.  In the past, all my other systems have ended up with a huge mess in ports with broken dependencies or won't even build.  So hopefully I can start doing this right on 8.1:

1: cvs lastest port tree.

2: read /usr/ports/UPDATING

3: install port like this to recursively build all dependencies:
`portmaster -rv "dir/port name"`

4. upgrading:
The only time I want to upgrade ports if if their is a security advisory.
check: http://www.vuxml.org/freebsd/
Install portaudit.

If security advisory, update a port and all it's dependencies:
Do steps 1, 2 and then if no special instructions:
`portmaster "portname"`

else, do whatever UPDATING says.

5: deleting:
To delete a port an all it's dependencies (that aren't used by other ports:
`portmaster -e "portname"`
`portmaster -s "portname"`



Does that look right?  Will that keep my ports running smooth?

What happens if when I updgrade (as above) and it rebulids a dependencies that is used by another package.  Will that other package be automatically rebuild it, or do I have to manually build it?  How will I know if I need to manually rebuild it?

Should I use the -w option to save old libraries incase another package needs them?  I don't mind having old libs and old packages as long as they don't have any security advisories on them (or bugs that affect me )


----------



## UNIXgod (Aug 20, 2010)

Can't answer your portmaster questions as I'm a portupgrade user. But I can tell you to install portaudit. You can run it by hand or set up perodic. may save you from grepping vuxml daily.


----------



## dbi (Aug 21, 2010)

portA depends on portB and portC.
You install portA by "portmaster category/portA" and it automatically pulls portB and portC as dependencies.
If there is an update for portC you use "portmaster -r category/portC" to rebuild portA along with portC.
In most of the cases when there is an update for portC, port mainters bump the version of all ports that depend on it, so you won't need to manually force rebuilding by the "-r" option.
In short use "portmaster category/port" for initial installation and then "portmaster -a" to keep your software updated.


----------

