diff --git a/src/headerlist.c b/src/headerlist.c index 73046f7..ae80996 100644 --- a/src/headerlist.c +++ b/src/headerlist.c @@ -583,9 +583,9 @@ addToSourceHeaderList(struct headerSourceList **headersourcelist, struct configT for (arch = 0; arch < ARCHS_MAX; arch++) { newheadersourcelist->firstchild[arch] = NULL; } - newheadersourcelist->updrepository = -1; newheadersourcelist->altrepository = altrepository; newheadersourcelist->firstwarning = NULL; + newheadersourcelist->old = NULL; getPackageInfoIntoHeaderSourceList(h, newheadersourcelist); @@ -682,9 +682,9 @@ addToSourceHeaderList(struct headerSourceList **headersourcelist, struct configT addWarning(newheadersourcelist, warning); } } - newheadersourcelist->updrepository = currheadersourcelist->altrepository; newheadersourcelist->next = currheadersourcelist->next; - /* FIXME: overriden currheadersourcelist element is not deallocated */ + /* overriden package is not deallocated but referenced with currheadersourcelist->old */ + newheadersourcelist->old=currheadersourcelist; currheadersourcelist=newheadersourcelist; } else { /* add the new package to the list */ diff --git a/src/include/headerlist.h b/src/include/headerlist.h index 9e99a66..9b0a384 100644 --- a/src/include/headerlist.h +++ b/src/include/headerlist.h @@ -111,7 +111,6 @@ struct headerSourceList { char **basename; int filenamecount; long buildtime; - int updrepository; int requirecount; struct Require **require; struct providedList **required; @@ -119,6 +118,7 @@ struct headerSourceList { int providecount; struct requireList *requirelist; struct headerSourceList *next; + struct headerSourceList *old; struct changeLog *changelog; struct headerList *firstchild[ARCHS_MAX]; struct warningList *firstwarning; diff --git a/src/reports.c b/src/reports.c index c60db84..60fa9cb 100644 --- a/src/reports.c +++ b/src/reports.c @@ -153,7 +153,7 @@ void printpkgicon(FILE *fout, struct configTag *configtag, struct headerSourceLi char strdate[16]; int i; - if (s->updrepository >= 0) { + if (s->old) { fprintf(fout, "configdefaults->url_dir); @@ -190,10 +190,15 @@ void printpkgicon(FILE *fout, struct configTag *configtag, struct headerSourceLi if (s->firstchild[i]) fprintf(fout," %s", configtag->arch[i]); } - if (s->updrepository >= 0) { + if (s->old) { fprintf(fout, - "\n\nUpdates package in %s\">", - configtag->repository[s->updrepository]->tag); + "\n\nUpdates %s(%s,%s,%ld:%s-%s)\">", + s->old->name, + configtag->repository[s->old->altrepository]->tag, + s->old->arch, + s->old->epoch, + s->old->version, + s->old->release); } else { fprintf(fout, "\">"); }