Don't check for missing ports and builds in single arch mode passed by command line

This commit is contained in:
Silvan Calarco 2013-01-10 18:22:03 +01:00
parent 636f2364d3
commit 5bc95d28e1

View File

@ -108,7 +108,6 @@ int handleObsoletedPackages(struct configTag *ct, int arch);
static struct configDefaults configdefaults; static struct configDefaults configdefaults;
static struct configTag *firstconfigtag = NULL, *configtag = NULL; static struct configTag *firstconfigtag = NULL, *configtag = NULL;
static char* arch =NULL;
static const unsigned int bufsize = 1024; static const unsigned int bufsize = 1024;
static const unsigned int maxlinelenght = 1024; static const unsigned int maxlinelenght = 1024;
@ -1035,7 +1034,7 @@ main(int argc, char *argv[])
{ {
char *name = NULL, *date = NULL, char *name = NULL, *date = NULL,
*repository_dir = NULL, *repository_tag = NULL, *repository_dir = NULL, *repository_tag = NULL,
*configfile = NULL; *configfile = NULL, *passed_arch = NULL;
struct headerList *currheaderlist; struct headerList *currheaderlist;
struct headerSourceList *currheadersourcelist = NULL; struct headerSourceList *currheadersourcelist = NULL;
@ -1123,7 +1122,7 @@ main(int argc, char *argv[])
} }
break; break;
case 'a': case 'a':
arch = optarg; passed_arch = optarg;
break; break;
case 'c': case 'c':
configfile = optarg; configfile = optarg;
@ -1188,13 +1187,13 @@ main(int argc, char *argv[])
exit(1); exit(1);
} }
if (arch) { if (passed_arch) {
configtag->arch[0] = malloc(sizeof arch); configtag->arch[0] = malloc(sizeof passed_arch);
if (!configtag->arch[0]) { if (!configtag->arch[0]) {
fprintf(stderr, "The system is out of memory\n"); fprintf(stderr, "The system is out of memory\n");
exit(1); exit(1);
} }
strcpy(configtag->arch[0], arch); strcpy(configtag->arch[0], passed_arch);
configtag->arch[1] = NULL; configtag->arch[1] = NULL;
} }
@ -1314,6 +1313,7 @@ main(int argc, char *argv[])
} // archs loop } // archs loop
if (!passed_arch) { // can't do missing builds and ports check in single arch mode
if (!quietmode) if (!quietmode)
fprintf(stdout, "Checking for SRPMS with no builds and missing ports...\n"); fprintf(stdout, "Checking for SRPMS with no builds and missing ports...\n");
else else
@ -1343,6 +1343,7 @@ main(int argc, char *argv[])
warning); warning);
addWarning(currheadersourcelist, warning); addWarning(currheadersourcelist, warning);
} }
warning[0] = '\0'; warning[0] = '\0';
for (i = 0; i < ARCHS_MAX && configtag->arch[i]; i++) { for (i = 0; i < ARCHS_MAX && configtag->arch[i]; i++) {
if (hasbuilds[i] == -1) { if (hasbuilds[i] == -1) {
@ -1360,6 +1361,7 @@ main(int argc, char *argv[])
} }
currheadersourcelist = currheadersourcelist->next; currheadersourcelist = currheadersourcelist->next;
} }
}
} // if (genheader_mode) } // if (genheader_mode)
if (genheader_mode & GENHEADER_STATS) { if (genheader_mode & GENHEADER_STATS) {