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:
parent
92c6c2b2ef
commit
e17c31611a
2 changed files with 13 additions and 6 deletions
|
@ -140,6 +140,8 @@ func (p *Deapexer) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||
Tool(android.PathForSource(ctx, "build/soong/scripts/unpack-prebuilt-apex.sh")).
|
||||
BuiltTool("deapexer").
|
||||
BuiltTool("debugfs").
|
||||
BuiltTool("blkid").
|
||||
BuiltTool("fsck.erofs").
|
||||
Input(p.inputApex).
|
||||
Text(deapexerOutput.String())
|
||||
for _, p := range exportedPaths {
|
||||
|
|
|
@ -17,23 +17,28 @@ set -eu
|
|||
# limitations under the License.
|
||||
|
||||
# Tool to unpack an apex file and verify that the required files were extracted.
|
||||
if [ $# -lt 5 ]; then
|
||||
echo "usage: $0 <deapaxer_path> <debugfs_path> <apex file> <output_dir> <required_files>+" >&2
|
||||
if [ $# -lt 7 ]; then
|
||||
echo "usage: $0 <deapaxer_path> <debugfs_path> <blkid_path> <fsck.erofs_path> <apex file> <output_dir> <required_files>+" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DEAPEXER_PATH=$1
|
||||
DEBUGFS_PATH=$2
|
||||
APEX_FILE=$3
|
||||
OUTPUT_DIR=$4
|
||||
shift 4
|
||||
BLKID_PATH=$3
|
||||
FSCK_EROFS_PATH=$4
|
||||
APEX_FILE=$5
|
||||
OUTPUT_DIR=$6
|
||||
shift 6
|
||||
REQUIRED_PATHS=$@
|
||||
|
||||
rm -fr $OUTPUT_DIR
|
||||
mkdir -p $OUTPUT_DIR
|
||||
|
||||
# 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
|
||||
# exist, and make sure they have a fresh mtime to not confuse ninja.
|
||||
|
|
Loading…
Reference in a new issue