pkgconflict is a script that searches for conflicting packages. In a first step it gathers the package and file names of all known packages. The source for this step is either the contents of /var/db/pkg, or a directory where the builk builds saved the package databases. In a second step, it calls a database system, PostgreSQL, to determine which packages have common file names. Packages with registered CONFLICT lines are filtered out.