From a10f86cd984bebc88be8c22a01e9bf0a113a762e Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Sun, 7 Nov 2021 06:59:55 -0800 Subject: [PATCH] extract: Fix DSP library names --- src/build/soong.ts | 1 - src/commands/extract.ts | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/build/soong.ts b/src/build/soong.ts index 6a65164..8d79cbb 100644 --- a/src/build/soong.ts +++ b/src/build/soong.ts @@ -3,7 +3,6 @@ import * as util from 'util' import { BlobEntry, partPathToSrcPath } from '../blobs/entry' export const SPECIAL_FILE_EXTENSIONS = new Set([ - '.sh', '.so', '.apk', '.jar', diff --git a/src/commands/extract.ts b/src/commands/extract.ts index 1ed1aaf..7b8e6e4 100644 --- a/src/commands/extract.ts +++ b/src/commands/extract.ts @@ -33,12 +33,13 @@ async function generateBuild( let conflictCounters = new Map() for (let entry of entries) { let ext = path.extname(entry.path) + let pathParts = entry.path.split('/') if (blobNeedsSoong(entry, ext)) { // Named dependencies -> Soong blueprint // Module name = file name, excluding extension if it was used - let baseExt = SPECIAL_FILE_EXTENSIONS.has(ext) ? ext : undefined + let baseExt = (SPECIAL_FILE_EXTENSIONS.has(ext) && pathParts[0] != 'dsp') ? ext : undefined let name = path.basename(entry.path, baseExt) // If already exists: skip if it's the other arch variant of a library in