update: use only 7 chars of SHA256 for non-APK version name

#460
This commit is contained in:
Hans-Christoph Steiner 2018-04-16 23:36:12 +02:00
parent 74c0e98d82
commit 9bf9159a77
3 changed files with 3 additions and 3 deletions

View File

@ -993,7 +993,7 @@ def scan_repo_files(apkcache, repodir, knownapks, use_date_from_file=False):
repo_file['hash'] = shasum
repo_file['hashType'] = 'sha256'
repo_file['versionCode'] = 0
repo_file['versionName'] = shasum
repo_file['versionName'] = shasum[0:7]
# the static ID is the SHA256 unless it is set in the metadata
repo_file['packageName'] = shasum

View File

@ -349,7 +349,7 @@
"packageName": "fake.ota.update",
"size": 233,
"versionCode": 1234,
"versionName": "897a92a4ccff4f415f6ba275b2af16d4ecaee60a983b215bddcb9f8964e7a24c"
"versionName": "897a92a"
}
],
"info.guardianproject.urzip": [

View File

@ -57,7 +57,7 @@
<marketversion>0.2.1</marketversion>
<marketvercode>2000</marketvercode>
<package>
<version>897a92a4ccff4f415f6ba275b2af16d4ecaee60a983b215bddcb9f8964e7a24c</version>
<version>897a92a</version>
<versioncode>1234</versioncode>
<apkname>fake.ota.update_1234.zip</apkname>
<hash type="sha256">897a92a4ccff4f415f6ba275b2af16d4ecaee60a983b215bddcb9f8964e7a24c</hash>