Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3aa29757 authored by yangbill's avatar yangbill Committed by Bill Yang
Browse files

Change par file generate rules.

Make sure the shebang of the par file is consistent with the main python
script rather than use /usr/bin/python arbitrarily.

Bug: 185399398
Bug: 185094069
Test: m atest ; atest-dev --help
      m atest-py2 ; atest-py2-dev --help
Change-Id: Ice4590b3d173e6d11e608c2ca29b297df0dc4089
parent 266fcfb8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ var (
	hostPar = pctx.AndroidStaticRule("hostPar",
		blueprint.RuleParams{
			Command: `sed -e 's/%interpreter%/$interp/g' -e 's/%main%/$main/g' $template > $stub && ` +
				`echo "#!/usr/bin/env python" >${out}.prefix &&` +
				`echo "#!/usr/bin/env $interp" >${out}.prefix &&` +
				`$mergeParCmd -p --prefix ${out}.prefix -pm $stub $out $srcsZips && ` +
				`chmod +x $out && (rm -f $stub; rm -f ${out}.prefix)`,
			CommandDeps: []string{"$mergeParCmd"},
+2 −2
Original line number Diff line number Diff line
#!/usr/bin/env python
#!/usr/bin/env '%interpreter%'

import os
import re
@@ -82,7 +82,7 @@ def Main():

    sys.stdout.flush()
    retCode = subprocess.call(args)
    exit(retCode)
    sys.exit(retCode)
  except:
    raise
  finally: