Differences between version 10 and predecessor to the previous major change of KnowledgeBase/FreeBSD/UpdatePorts.
Other diffs: Previous Revision, Previous Author
| Newer page: | version 10 | Last edited on Sunday, 29 August 2010 5:40:19 | by CyberLeo | Revert | 
| Older page: | version 9 | Last edited on Sunday, 21 March 2010 15:11:18 | by CyberLeo | Revert | 
version 10
Note: I just use  ports-mgmt/portmaster now
ports-mgmt/portmaster now
Sync ports tree
csup ports-supfile
Update INDEXes
portsdb -Uu pkgdb -u
Get a list of out-of-date ports
pkg_version -vl '<' | cut -d' ' -f1
Pull dependency information for each out-of-date port (Children must be rebuilt/reinstalled as well)
pkg_info -Rq
Do this recursively, keeping track of the depth. Once you hit bottom on all the ports and their descendants, squash the depgraph, placing deeper dependencies later. I.e.:
A -B -C --D E -B -D =becomes= A E B C D ==
bdeptree() {
  port="${1##/usr/ports/}"
  printf "%${2}s%s\n" "" "${port}"
  ( cd /usr/ports/${port}
    ( make build-depends-list
      [ "${depth}" -gt 0 ] && make run-depends-list
    ) | sort -u | while read port
    do
      bdeptree "${port}" $(( ${2:-0} + 1 ))
    done
  )
}
rdeptree() {
  port="${1##/usr/ports/}"
  printf "%${2}s%s\n" "" "${port}"
  ( cd /usr/ports/${port}
    make run-depends-list | sort -u | while read port
    do
      rdeptree "${port}" $(( ${2:-0} + 1 ))
    done
  )
}
BASH script is at CheckPorts.sh
Once you have a list of ports to install, and their order, you can use a convenience function in sh to build a package
makepkg() {
 rm *.tbz
 make all deinstall install package clean && mv -v *.tbz /build/pkg/
}
