portmaster libevent-2.1.8 problem

During a portmaster -a I get the following error message:
pkg-static: libevent-2.1.8 conflicts with libevent2-2.1.8
I have done a make deinstall in devel/libevent but this just says that the port is not installed.
Any ideas?
Learn to read /usr/ports/UPDATING:
  AFFECTS: devel/libevent2
  AUTHOR: jbeich@FreeBSD.org

  libevent2 has been renamed back to libevent as the default version.
  If you manage out of tree ports make sure to run the following:

    # pkg set -n libevent2:libevent
    # pkg set -o devel/libevent2:devel/libevent
Or use my script...

It's not perfect, I'm still working out a few small caveats. Sometimes you get false positives in the logfiles.



## CONFIG section

# Where the script resides

## INIT section, don't change

udate=`stat -f %Sa -t %Y%m%d $WP/$0.meta`

if [ -n "$udate" ]; then
        ucmd="-d $udate";

if [ "$1" == "new" ]; then
        > $WP/refresh-updating.log;

## MAIN section

portsnap fetch update && portmaster -L | tee portmaster.log && grep New portmaster.log > $WP/$0.log

for a in `cat $WP/$0.log | cut -d ' ' -f5 | cut -d '-' -f1`; do
        pkg updating $ucmd $a >> $WP/$0-updating.log;

touch $WP/$0.meta

And 'update':


portmaster -a\
        | tee /root/updates/$0$1.log
Optionally you can add -x behind all this to exclude some packages from updating.

How does this work?

It's all in 'refresh'. It will update the Ports collection, use Portmaster to scan for new ports and then check those new ports for any occurrences in /usr/ports/UPDATING which entries will then be added to refresh-updating.log in the same directory (assuming you called the script 'refresh' of course).

Place it in a directory, point the script to the directory its in (I know I can automate this, it's on the todo) and then you're ok.

It will generate a so called 'semaphore file' called refresh.meta in order to keep track of the last time and date which the script ran.

It also outposts the full list generated by Portmaster (conveniently called portmaster.log) which can help you work out common issues not mentioned in /usr/ports/UPDATING (such as the removal of a port for example[/file].

Disclaimer: it's not full proof. But it does a good job for me so far.