fixed a segfault and added more verbose outputs in group handling (patch from VMiklos <vmiklos@frugalware.org>)

This commit is contained in:
Aurelien Foret 2005-12-31 17:59:28 +00:00
parent 2c0530e634
commit bfa0853acb
1 changed files with 4 additions and 2 deletions

View File

@ -249,11 +249,13 @@ static int sync_group(list_t *syncs, list_t *targets)
sync_t *sync = j->data;
PM_LIST *lp;
for(lp = alpm_db_getpkgcache(sync->db); lp; lp = alpm_list_next(lp)) {
for(lp = alpm_db_getgrpcache(sync->db); lp; lp = alpm_list_next(lp)) {
PM_GRP *grp = alpm_list_getdata(lp);
MSG(NL, "%s/%s\n", (char *)sync->treename, (char *)alpm_grp_getinfo(grp, PM_GRP_NAME));
PM_LIST_display(" ", alpm_grp_getinfo(grp, PM_GRP_PKGNAMES));
if(config->verbose > 1) {
PM_LIST_display(" ", alpm_grp_getinfo(grp, PM_GRP_PKGNAMES));
}
}
}
}