retcode = pkg_add_port(db, pkg, input_path, location, testing_mode);
if (!legacy && retcode != EPKG_OK && pkg_has_message(pkg))
if (!legacy && retcode == EPKG_OK && pkg_has_message(pkg))
pkg_printf("%M\n", pkg);
pkg_free(pkg);