extract: Prioritize explicit named dependencies in conflict resolution
This commit is contained in:
parent
99c984f6e2
commit
2e20befcd4
1 changed files with 8 additions and 0 deletions
|
@ -9,6 +9,10 @@ import { parseFileList } from '../blobs/file_list'
|
|||
import { copyBlobs } from '../blobs/copy'
|
||||
import { blobToFileCopy, serializeProductMakefile } from '../build/make'
|
||||
|
||||
function nameDepKey(entry: BlobEntry) {
|
||||
return `${entry.isNamedDependency ? 0 : 1}${entry.srcPath}`
|
||||
}
|
||||
|
||||
async function generateBuild(
|
||||
entries: Array<BlobEntry>,
|
||||
vendor: string,
|
||||
|
@ -16,6 +20,10 @@ async function generateBuild(
|
|||
outDir: string,
|
||||
proprietaryDir: string,
|
||||
) {
|
||||
// Re-sort entries to give priority to explicit named dependencies in name
|
||||
// conflict resolution
|
||||
entries = Array.from(entries).sort((a, b) => nameDepKey(a).localeCompare(nameDepKey(b)))
|
||||
|
||||
// Fast lookup for other arch libs
|
||||
let entrySrcPaths = new Set(entries.map(e => e.srcPath))
|
||||
|
||||
|
|
Loading…
Reference in a new issue