check pkg version against repo version when building the cache (fix #20)