List getPkgList(Map map, String groupname) {
        List list = (List)map.get(groupname);
        if (list == null) {
            list = new ArrayList();
            map.put(groupname, list);
        }
        return list;
    }