am 4cac8afc: am 714111cb: include pre-signed prebuilt .apks in apkcerts.txt

Merge commit '4cac8afc21a356ce3ca074f12383cf1526d44156'

* commit '4cac8afc21a356ce3ca074f12383cf1526d44156':
  include pre-signed prebuilt .apks in apkcerts.txt
This commit is contained in:
Doug Zongker 2009-12-14 15:33:14 -08:00 committed by Android Git Automerger
commit a660e48ea7
2 changed files with 15 additions and 4 deletions

View File

@ -51,7 +51,12 @@ ifeq ($(LOCAL_CERTIFICATE),)
else ifeq ($(LOCAL_CERTIFICATE),PRESIGNED)
# The magic string "PRESIGNED" means this package is already checked
# signed with its release key.
# Can't re-sign this package, so predexopt is not available.
#
# By setting .CERTIFICATE but not .PRIVATE_KEY, this package will be
# mentioned in apkcerts.txt (with certificate set to "PRESIGNED")
# but the dexpreopt process will not try to re-sign the app.
PACKAGES.$(LOCAL_MODULE).CERTIFICATE := PRESIGNED
PACKAGES := $(PACKAGES) $(LOCAL_MODULE)
else
# If this is not an absolute certificate, assign it to a generic one.
ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./)

View File

@ -89,9 +89,15 @@ def GetApkCerts(tf_zip):
if not line: continue
m = re.match(r'^name="(.*)"\s+certificate="(.*)\.x509\.pem"\s+'
r'private_key="\2\.pk8"$', line)
if not m:
raise SigningError("failed to parse line from apkcerts.txt:\n" + line)
certmap[m.group(1)] = OPTIONS.key_map.get(m.group(2), m.group(2))
if m:
certmap[m.group(1)] = OPTIONS.key_map.get(m.group(2), m.group(2))
else:
m = re.match(r'^name="(.*)"\s+certificate="PRESIGNED"\s+'
r'private_key=""$', line)
if m:
certmap[m.group(1)] = None
else:
raise ValueError("failed to parse line from apkcerts.txt:\n" + line)
for apk, cert in OPTIONS.extra_apks.iteritems():
certmap[apk] = OPTIONS.key_map.get(cert, cert)
return certmap