Add warnings for missing archs ports and fix warning for packages with no builds
This commit is contained in:
parent
abc188b260
commit
c424626c66
@ -1045,7 +1045,7 @@ main(int argc, char *argv[])
|
|||||||
unsigned int genheader_mode = GENHEADER_BASE + GENHEADER_REQUIREMENTS;
|
unsigned int genheader_mode = GENHEADER_BASE + GENHEADER_REQUIREMENTS;
|
||||||
unsigned int quietmode = 0;
|
unsigned int quietmode = 0;
|
||||||
unsigned int obsolete_packages = 1;
|
unsigned int obsolete_packages = 1;
|
||||||
int i;
|
int i,hasbuilds[ARCHS_MAX];
|
||||||
char warning[PATH_MAX];
|
char warning[PATH_MAX];
|
||||||
|
|
||||||
time_t start_time, stop_time;
|
time_t start_time, stop_time;
|
||||||
@ -1238,20 +1238,6 @@ main(int argc, char *argv[])
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!quietmode)
|
|
||||||
fprintf(stdout, "Checking for SRPMS with no RPMS...\n");
|
|
||||||
|
|
||||||
currheadersourcelist = configtag->headersourcelist;
|
|
||||||
while (currheadersourcelist != NULL) {
|
|
||||||
if (!currheadersourcelist->firstchild) {
|
|
||||||
snprintf(warning, PATH_MAX, "SRPM does not have any valid RPM build");
|
|
||||||
logmsg(LOG_WARNING, "%s: %s",
|
|
||||||
currheadersourcelist->name,
|
|
||||||
warning);
|
|
||||||
addWarning(currheadersourcelist, warning);
|
|
||||||
}
|
|
||||||
currheadersourcelist = currheadersourcelist->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (genheader_mode & GENHEADER_REQUIREMENTS) {
|
if (genheader_mode & GENHEADER_REQUIREMENTS) {
|
||||||
|
|
||||||
@ -1328,6 +1314,50 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
} // archs loop
|
} // archs loop
|
||||||
|
|
||||||
|
if (!quietmode)
|
||||||
|
fprintf(stdout, "Checking for SRPMS with no builds and missing ports...\n");
|
||||||
|
|
||||||
|
currheadersourcelist = configtag->headersourcelist;
|
||||||
|
while (currheadersourcelist != NULL) {
|
||||||
|
for (i = 0; i < ARCHS_MAX && configtag->arch[i]; i++)
|
||||||
|
hasbuilds[i] = 0;
|
||||||
|
for (i = 0; i < ARCHS_MAX && configtag->arch[i]; i++) {
|
||||||
|
if (currheadersourcelist->firstchild[i])
|
||||||
|
hasbuilds[i] = 1;
|
||||||
|
else if (currheadersourcelist->old && currheadersourcelist->old->firstchild[i])
|
||||||
|
hasbuilds[i] = -1;
|
||||||
|
}
|
||||||
|
warning[0] = '\0';
|
||||||
|
for (i = 0; i < ARCHS_MAX && configtag->arch[i]; i++) {
|
||||||
|
if (hasbuilds[i] == 1) {
|
||||||
|
strncat(warning," ",PATH_MAX);
|
||||||
|
strncat(warning,configtag->arch[i],PATH_MAX);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (warning[0] == '\0') {
|
||||||
|
snprintf(warning, PATH_MAX, "SRPM does not have any valid RPM build");
|
||||||
|
logmsg(LOG_WARNING, "%s: %s",
|
||||||
|
currheadersourcelist->name,
|
||||||
|
warning);
|
||||||
|
addWarning(currheadersourcelist, warning);
|
||||||
|
}
|
||||||
|
warning[0] = '\0';
|
||||||
|
for (i = 0; i < ARCHS_MAX && configtag->arch[i]; i++) {
|
||||||
|
if (hasbuilds[i] == -1) {
|
||||||
|
if (warning[0] == '\0')
|
||||||
|
strncat(warning, "requires port to arch(s):", PATH_MAX);
|
||||||
|
strncat(warning," ",PATH_MAX);
|
||||||
|
strncat(warning,configtag->arch[i],PATH_MAX);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (warning[0] != '\0') {
|
||||||
|
logmsg(LOG_WARNING, "%s: %s",
|
||||||
|
currheadersourcelist->name,
|
||||||
|
warning);
|
||||||
|
addWarning(currheadersourcelist, warning);
|
||||||
|
}
|
||||||
|
currheadersourcelist = currheadersourcelist->next;
|
||||||
|
}
|
||||||
} // if (genheader_mode)
|
} // if (genheader_mode)
|
||||||
|
|
||||||
if (genheader_mode & GENHEADER_STATS) {
|
if (genheader_mode & GENHEADER_STATS) {
|
||||||
|
Loading…
Reference in New Issue
Block a user