<snip> # How to determine what version it was installed against? - measily eval $(/bin/fgrep KV=2 ${ROOT}/var/db/pkg/net-misc/${PF}/environment |\ /bin/head -1) </snip> No-op, enviroment file in bzip-ed (environment.bz2). No idea how reliable is it otherwise, once fixed. :)
try it - it is actually unzipped before removal
the phrase "total crapshot" comes to mind. Need a better method then this; portage decompressing that file is just portage being inefficient, it's not guranteed to remain, nor is it guranteed that file must even *exist* (both environment.bz2 and it)