usr.bin/dsynth/pkglist.c
/*
 * Caller has queued the process list for bulk operation.  We retrieve
 * the results and clean up the bulk operation (we may have to do a second
 * bulk operation so we have to be the ones to clean it up).
 */
Caller has queued the process list for bulk operation.  We retrieve
the results and clean up the bulk operation (we may have to do a second
bulk operation so we have to be the ones to clean it up).
Caller has queued the process list for bulk operation . We retrieve the results and clean up the bulk operation ( we may have to do a second bulk operation so we have to be the ones to clean it up ) .
static pkg_t *
processPackageListBulk(int total)
{
	bulk_t *bulk;
	pkg_t *scan;
	pkg_t *list;
	pkg_t *dep_list;
	pkg_t **list_tail;
	int count;
	list = NULL;
	list_tail = &list;
	count = 0;
	while ((bulk = getbulk()) != NULL) {
		++count;
		if ((count & 255) == 0) {
			printf("%6.2f%%\r",
				(double)count * 100.0 / (double)total + 0.001);
			fflush(stdout);
		}
		if (bulk->list) {
			*list_tail = bulk->list;
			bulk->list = NULL;
			while ((scan = *list_tail) != NULL) {
				if (bulk->s4 == NULL || bulk->s4[0] != 'x')
					scan->flags |= PKGF_MANUALSEL;
				pkg_enter(scan);
				list_tail = &scan->bnext;
			}
		}
		freebulk(bulk);
	}
	printf("100.00%%\n");
	printf("\nTotal %d\n", count);
	fflush(stdout);
	printf("Resolving dependencies...");
	fflush(stdout);
	dep_list = list;
	while (dep_list) {
		dep_list = resolveDeps(dep_list, &list_tail, 0);
	}
	printf("done\n");
	donebulk();
	resolveDeps(list, NULL, 1);
	count = 0;
	for (scan = list; scan; scan = scan->bnext) {
		if ((scan->flags & PKGF_ERROR) == 0) {
			++count;
		}
	}
	printf("Total Returned %d\n", count);
	initbulk(childGetBinaryDistInfo, MaxBulk);
	total = scan_binary_repo(RepositoryPath);
	count = 0;
	printf("Scanning %d packages\n", total);
	while ((bulk = getbulk()) != NULL) {
		++count;
		if ((count & 255) == 0) {
			printf("%6.2f%%\r",
				(double)count * 100.0 / (double)total + 0.001);
			fflush(stdout);
		}
		freebulk(bulk);
	}
	printf("100.00%%\n");
	printf("\nTotal %d\n", count);
	fflush(stdout);
	donebulk();
	printf("all done\n");
	return list;
}
static pkg_t * processPackageListBulk ( int total ) { bulk_t * bulk ; pkg_t * scan ; pkg_t * list ; pkg_t * dep_list ; pkg_t * * list_tail ; int count ; list = NULL ; list_tail = & list ; count = 0 ; while ( ( bulk = getbulk ( ) ) != NULL ) { ++ count ; if ( ( count & 255 ) == 0 ) { printf ( " \r " , ( double ) count * 100.0 / ( double ) total + 0.001 ) ; fflush ( stdout ) ; } if ( bulk -> list ) { * list_tail = bulk -> list ; bulk -> list = NULL ; while ( ( scan = * list_tail ) != NULL ) { if ( bulk -> s4 == NULL || bulk -> s4 [ 0 ] != ' ' ) scan -> flags |= PKGF_MANUALSEL ; pkg_enter ( scan ) ; list_tail = & scan -> bnext ; } } freebulk ( bulk ) ; } printf ( " \n " ) ; printf ( " \n \n " , count ) ; fflush ( stdout ) ; printf ( " " ) ; fflush ( stdout ) ; dep_list = list ; while ( dep_list ) { dep_list = resolveDeps ( dep_list , & list_tail , 0 ) ; } printf ( " \n " ) ; donebulk ( ) ; resolveDeps ( list , NULL , 1 ) ; count = 0 ; for ( scan = list ; scan ; scan = scan -> bnext ) { if ( ( scan -> flags & PKGF_ERROR ) == 0 ) { ++ count ; } } printf ( " \n " , count ) ; initbulk ( childGetBinaryDistInfo , MaxBulk ) ; total = scan_binary_repo ( RepositoryPath ) ; count = 0 ; printf ( " \n " , total ) ; while ( ( bulk = getbulk ( ) ) != NULL ) { ++ count ; if ( ( count & 255 ) == 0 ) { printf ( " \r " , ( double ) count * 100.0 / ( double ) total + 0.001 ) ; fflush ( stdout ) ; } freebulk ( bulk ) ; } printf ( " \n " ) ; printf ( " \n \n " , count ) ; fflush ( stdout ) ; donebulk ( ) ; printf ( " \n " ) ; return list ; }
Caller has queued the process list for bulk operation.
Caller has queued the process list for bulk operation .
/*
	 * Resolve all dependencies for the related packages, potentially
	 * adding anything that could not be found to the list.  This will
	 * continue to issue bulk operations and process the result until
	 * no dependencies are left.
	 */ /*
	 * Generate the topology
	 */ /*
	 * Do a final count, ignore place holders.
	 */ /*
	 * Scan our binary distributions and related dependencies looking
	 * for any packages that have already been built.
	 */