headerlist.c: drop updrepository in headersourcelist in favour of a pointer to old updated package
reports.c: print version information on updated package
This commit is contained in:
parent
2d5370973f
commit
56e4ad7c6c
@ -583,9 +583,9 @@ addToSourceHeaderList(struct headerSourceList **headersourcelist, struct configT
|
|||||||
for (arch = 0; arch < ARCHS_MAX; arch++) {
|
for (arch = 0; arch < ARCHS_MAX; arch++) {
|
||||||
newheadersourcelist->firstchild[arch] = NULL;
|
newheadersourcelist->firstchild[arch] = NULL;
|
||||||
}
|
}
|
||||||
newheadersourcelist->updrepository = -1;
|
|
||||||
newheadersourcelist->altrepository = altrepository;
|
newheadersourcelist->altrepository = altrepository;
|
||||||
newheadersourcelist->firstwarning = NULL;
|
newheadersourcelist->firstwarning = NULL;
|
||||||
|
newheadersourcelist->old = NULL;
|
||||||
getPackageInfoIntoHeaderSourceList(h, newheadersourcelist);
|
getPackageInfoIntoHeaderSourceList(h, newheadersourcelist);
|
||||||
|
|
||||||
|
|
||||||
@ -682,9 +682,9 @@ addToSourceHeaderList(struct headerSourceList **headersourcelist, struct configT
|
|||||||
addWarning(newheadersourcelist, warning);
|
addWarning(newheadersourcelist, warning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newheadersourcelist->updrepository = currheadersourcelist->altrepository;
|
|
||||||
newheadersourcelist->next = currheadersourcelist->next;
|
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;
|
currheadersourcelist=newheadersourcelist;
|
||||||
} else {
|
} else {
|
||||||
/* add the new package to the list */
|
/* add the new package to the list */
|
||||||
|
@ -111,7 +111,6 @@ struct headerSourceList {
|
|||||||
char **basename;
|
char **basename;
|
||||||
int filenamecount;
|
int filenamecount;
|
||||||
long buildtime;
|
long buildtime;
|
||||||
int updrepository;
|
|
||||||
int requirecount;
|
int requirecount;
|
||||||
struct Require **require;
|
struct Require **require;
|
||||||
struct providedList **required;
|
struct providedList **required;
|
||||||
@ -119,6 +118,7 @@ struct headerSourceList {
|
|||||||
int providecount;
|
int providecount;
|
||||||
struct requireList *requirelist;
|
struct requireList *requirelist;
|
||||||
struct headerSourceList *next;
|
struct headerSourceList *next;
|
||||||
|
struct headerSourceList *old;
|
||||||
struct changeLog *changelog;
|
struct changeLog *changelog;
|
||||||
struct headerList *firstchild[ARCHS_MAX];
|
struct headerList *firstchild[ARCHS_MAX];
|
||||||
struct warningList *firstwarning;
|
struct warningList *firstwarning;
|
||||||
|
@ -153,7 +153,7 @@ void printpkgicon(FILE *fout, struct configTag *configtag, struct headerSourceLi
|
|||||||
char strdate[16];
|
char strdate[16];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (s->updrepository >= 0) {
|
if (s->old) {
|
||||||
fprintf(fout,
|
fprintf(fout,
|
||||||
"<img src=\"%s/pkgup.png\" ",
|
"<img src=\"%s/pkgup.png\" ",
|
||||||
configtag->configdefaults->url_dir);
|
configtag->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->firstchild[i]) fprintf(fout," %s", configtag->arch[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->updrepository >= 0) {
|
if (s->old) {
|
||||||
fprintf(fout,
|
fprintf(fout,
|
||||||
"\n\nUpdates package in %s\">",
|
"\n\nUpdates %s(%s,%s,%ld:%s-%s)\">",
|
||||||
configtag->repository[s->updrepository]->tag);
|
s->old->name,
|
||||||
|
configtag->repository[s->old->altrepository]->tag,
|
||||||
|
s->old->arch,
|
||||||
|
s->old->epoch,
|
||||||
|
s->old->version,
|
||||||
|
s->old->release);
|
||||||
} else {
|
} else {
|
||||||
fprintf(fout, "\">");
|
fprintf(fout, "\">");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user