public String getExternalLink(String pkgName,
                                  String relativepath, String link) {
        Item fnd = findPackageItem(pkgName);
        if (fnd != null) {
            String externlink = fnd.path + link;
            if (fnd.relative) {  // it's a relative path.
                return relativepath + externlink;
            } else {
                return externlink;
            }
        }
        return null;
    }