changed getpkg function to compare core to trunk