Add -o flag to print out the origin. mport.query -oq name=gmake gives devel/gmake mport.query -o name=gmake gives gmake-4.2.1_3 devel/gmake