Fix deapexer usage in prebuilt_apex/apex_set
A previous change to the deapexer script to check that blkid_path and fsckerofs_path were set broke the scripts/unpack-prebuilt-apex.sh scripts use of deapexer. This change fixes it by passing the paths through to the script which then passes it on to deapexer. Bug: 255963179 Bug: 240288941 Bug: 259958590 Test: m MODULE_BUILD_FROM_SOURCE=false droid Change-Id: Ief7f36219b7fe1cf7104c08163e10d8e39f181d0
This commit is contained in:
@@ -140,6 +140,8 @@ func (p *Deapexer) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
Tool(android.PathForSource(ctx, "build/soong/scripts/unpack-prebuilt-apex.sh")).
|
Tool(android.PathForSource(ctx, "build/soong/scripts/unpack-prebuilt-apex.sh")).
|
||||||
BuiltTool("deapexer").
|
BuiltTool("deapexer").
|
||||||
BuiltTool("debugfs").
|
BuiltTool("debugfs").
|
||||||
|
BuiltTool("blkid").
|
||||||
|
BuiltTool("fsck.erofs").
|
||||||
Input(p.inputApex).
|
Input(p.inputApex).
|
||||||
Text(deapexerOutput.String())
|
Text(deapexerOutput.String())
|
||||||
for _, p := range exportedPaths {
|
for _, p := range exportedPaths {
|
||||||
|
@@ -17,23 +17,28 @@ set -eu
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# Tool to unpack an apex file and verify that the required files were extracted.
|
# Tool to unpack an apex file and verify that the required files were extracted.
|
||||||
if [ $# -lt 5 ]; then
|
if [ $# -lt 7 ]; then
|
||||||
echo "usage: $0 <deapaxer_path> <debugfs_path> <apex file> <output_dir> <required_files>+" >&2
|
echo "usage: $0 <deapaxer_path> <debugfs_path> <blkid_path> <fsck.erofs_path> <apex file> <output_dir> <required_files>+" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DEAPEXER_PATH=$1
|
DEAPEXER_PATH=$1
|
||||||
DEBUGFS_PATH=$2
|
DEBUGFS_PATH=$2
|
||||||
APEX_FILE=$3
|
BLKID_PATH=$3
|
||||||
OUTPUT_DIR=$4
|
FSCK_EROFS_PATH=$4
|
||||||
shift 4
|
APEX_FILE=$5
|
||||||
|
OUTPUT_DIR=$6
|
||||||
|
shift 6
|
||||||
REQUIRED_PATHS=$@
|
REQUIRED_PATHS=$@
|
||||||
|
|
||||||
rm -fr $OUTPUT_DIR
|
rm -fr $OUTPUT_DIR
|
||||||
mkdir -p $OUTPUT_DIR
|
mkdir -p $OUTPUT_DIR
|
||||||
|
|
||||||
# Unpack the apex file contents.
|
# Unpack the apex file contents.
|
||||||
$DEAPEXER_PATH --debugfs_path $DEBUGFS_PATH extract $APEX_FILE $OUTPUT_DIR
|
$DEAPEXER_PATH --debugfs_path $DEBUGFS_PATH \
|
||||||
|
--blkid_path $BLKID_PATH \
|
||||||
|
--fsckerofs_path $FSCK_EROFS_PATH \
|
||||||
|
extract $APEX_FILE $OUTPUT_DIR
|
||||||
|
|
||||||
# Verify that the files that the build expects to be in the .apex file actually
|
# Verify that the files that the build expects to be in the .apex file actually
|
||||||
# exist, and make sure they have a fresh mtime to not confuse ninja.
|
# exist, and make sure they have a fresh mtime to not confuse ninja.
|
||||||
|
Reference in New Issue
Block a user