Created attachment 192780 [details]
patch for bin/portupgrade
It only adds two features - automatic flavoring (if flavor is not set in the old package and is available) and flavor preserving (if set), see patch. Inspired by portmaster.
I've committed this to my local git so far and am optimizing it a bit before