usr.bin/dsynth/pkglist.c
/*
 * Run through the list resolving dependencies and constructing the topology
 * linkages.   This may append packages to the list.
 */
Run through the list resolving dependencies and constructing the topology
linkages.   This may append packages to the list.
Run through the list resolving dependencies and constructing the topology linkages . This may append packages to the list .
static pkg_t *
resolveDeps(pkg_t *list, pkg_t ***list_tailp, int gentopo)
{
	pkg_t *scan;
	pkg_t *ret_list = NULL;
	bulk_t *bulk;
	for (scan = list; scan; scan = scan->bnext) {
		resolveDepString(scan, scan->fetch_deps,
				 gentopo, DEP_TYPE_FETCH);
		resolveDepString(scan, scan->ext_deps,
				 gentopo, DEP_TYPE_EXT);
		resolveDepString(scan, scan->patch_deps,
				 gentopo, DEP_TYPE_PATCH);
		resolveDepString(scan, scan->build_deps,
				 gentopo, DEP_TYPE_BUILD);
		resolveDepString(scan, scan->lib_deps,
				 gentopo, DEP_TYPE_LIB);
		resolveDepString(scan, scan->run_deps,
				 gentopo, DEP_TYPE_RUN);
	}
	if (gentopo)
		return NULL;
	while ((bulk = getbulk()) != NULL) {
		if (bulk->list) {
			if (ret_list == NULL)
				ret_list = bulk->list;
			**list_tailp = bulk->list;
			bulk->list = NULL;
			while (**list_tailp) {
				pkg_enter(**list_tailp);
				*list_tailp = &(**list_tailp)->bnext;
			}
		}
		freebulk(bulk);
	}
	return (ret_list);
}
static pkg_t * resolveDeps ( pkg_t * list , pkg_t * * * list_tailp , int gentopo ) { pkg_t * scan ; pkg_t * ret_list = NULL ; bulk_t * bulk ; for ( scan = list ; scan ; scan = scan -> bnext ) { resolveDepString ( scan , scan -> fetch_deps , gentopo , DEP_TYPE_FETCH ) ; resolveDepString ( scan , scan -> ext_deps , gentopo , DEP_TYPE_EXT ) ; resolveDepString ( scan , scan -> patch_deps , gentopo , DEP_TYPE_PATCH ) ; resolveDepString ( scan , scan -> build_deps , gentopo , DEP_TYPE_BUILD ) ; resolveDepString ( scan , scan -> lib_deps , gentopo , DEP_TYPE_LIB ) ; resolveDepString ( scan , scan -> run_deps , gentopo , DEP_TYPE_RUN ) ; } if ( gentopo ) return NULL ; while ( ( bulk = getbulk ( ) ) != NULL ) { if ( bulk -> list ) { if ( ret_list == NULL ) ret_list = bulk -> list ; * * list_tailp = bulk -> list ; bulk -> list = NULL ; while ( * * list_tailp ) { pkg_enter ( * * list_tailp ) ; * list_tailp = & ( * * list_tailp ) -> bnext ; } } freebulk ( bulk ) ; } return ( ret_list ) ; }
Run through the list resolving dependencies and constructing the topology
 linkages.
Run through the list resolving dependencies and constructing the topology linkages .
/*
	 * No bulk ops are queued when doing the final topology
	 * generation.
	 */