Add obsoleted flag in headerList struct and set it to fix (remove) obsoleted packages handling in deps-* lists

This commit is contained in:
root 2011-08-12 17:31:13 +02:00
parent 45aed8c11e
commit 01c345c579
4 changed files with 8 additions and 4 deletions

View File

@ -279,6 +279,7 @@ handleObsoletedPackages(struct configTag *ct, int archidx)
for (i = 0; i < prov->numproviders; i++) {
if (obs[i] >=0) {
j--;
prov->provider[i]->obsoleted=1;
prov->provider[i]=NULL;
}
}

View File

@ -883,8 +883,7 @@ addToHeaderList(struct configTag *ct,
logmsg(LOG_ERROR,"header in file %s is corrupted; aborting.\n",filepath);
return 1;
}
newheaderlist->next = NULL;
newheaderlist->nextbrother = NULL;
memset(newheaderlist, 0, sizeof(struct headerList));
getPackageInfoIntoHeaderList(h, newheaderlist);
if (!newheaderlist->sourcename) {

View File

@ -84,6 +84,7 @@ struct headerList {
struct requireList *requirelist;
struct headerList *next, *nextbrother;
struct headerSourceList *sourceheader;
int obsoleted;
};
struct headerSourceList {

View File

@ -1828,9 +1828,12 @@ print_datatables(struct configTag *ct, int arch) {
fprintf(fb,"ALL_BUILDS=");
currheaderlist = ct->headerlist[arch];
while (currheaderlist) {
fprintf(fd,"%s ", currheaderlist->name);
if (currheaderlist->obsoleted) printf("%s obsoleted\n", currheaderlist->name);
fprintf(fs,"%s: _%s\n", currheaderlist->name, currheaderlist->sourceheader->name);
fprintf(fb,"%s ",currheaderlist->name);
if (!currheaderlist->obsoleted) {
fprintf(fd,"%s ", currheaderlist->name);
fprintf(fb,"%s ",currheaderlist->name);
}
currheaderlist = currheaderlist->next;
}
fprintf(fd,"\n");