Fix output of conflicst checking.
Improve locking for pkg-upgrade.

Reported by: Eugene Grossbein