Enough Is Enough

Sergio de Almeida Lenzi lenzi.sergio at gmail.com
Sun Mar 28 14:46:46 UTC 2010


I do not doubt the "power"  of portmaster and portupgrade, but....
in my system (I have a "master" 4core,8Gb  and several "slaves" about 40
of them , that upgrade via portmaster -P -aBdg)
in the master system there are about 1200 packages installed...
so a portmaster -r png will last forever...

I made a  shell script that tests for the existance of the library
in /usr/local/lib/*.so, /usr/local/bin/*
sort it and tells me what ports really need upgrade...

with about 1200 ports, only 120 needed upgrade... (a question of 2
hours) in the "master cpu",
or about 20 minutes in the "slaves"  

this scripts outputs the commands needed to fix the system

watch out
==================================
#!/bin/sh

endp() {
	rm -f $t
	exit $1
}

t=/tmp/$$

if [ $# -ne 1 ]
then
	echo use $0 library
	endp 1
fi

lib=$1

find /usr/local/bin /usr/local/lib -name -type f | \
while read x
do
	grep $lib $x | \
	awk '{print $3}' | \
	while read y
	do
		pkg_info -W $y  >> $t
	done
done
awk '{print $NF}' $t | sort -u > /tmp/buildpkglist
echo nice portmaster -Bdg `cat /tmp/buildpkglist`
endp 0
=========================================


More information about the freebsd-questions mailing list