Skip to content

Commit

Permalink
Fix false positive exception about multiple architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanLorenzo committed Sep 24, 2019
1 parent f3c80c0 commit 0ace34f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Fixed
* Focus and Klar were sent in the same transaction, which cannot happen.
* False positive exception about multiple architectures

### Removed
* `update_apk_description.py`: https://l10n.mozilla-community.org/stores_l10n/ is now retired making the script useless.
Expand Down
2 changes: 1 addition & 1 deletion mozapkpublisher/common/apk/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def extract_metadata(original_apk_path, extract_firefox_metadata):
def _extract_architecture(apk_zip, original_apk_path):
files_with_architecture_in_path = [
name for name in apk_zip.namelist()
if _DIRECTORY_WITH_ARCHITECTURE_METADATA in name
if name.startswith(_DIRECTORY_WITH_ARCHITECTURE_METADATA)
]

if not files_with_architecture_in_path:
Expand Down
5 changes: 4 additions & 1 deletion mozapkpublisher/test/common/apk/test_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _create_apk_with_locale_content(temp_dir, manifest_content):


def _create_apk_with_architecture_content(temp_dir, architecture=None):
random_file_in_lib = os.path.join(temp_dir, 'libmozglue.so')
random_file_in_lib = os.path.join(temp_dir, 'some_random_file')
with open(random_file_in_lib, 'w'):
pass

Expand All @@ -53,6 +53,9 @@ def _create_apk_with_architecture_content(temp_dir, architecture=None):
if architecture is not None:
apk_zip.write(random_file_in_lib, 'lib/{}/libmozglue.so'.format(architecture))

# Add content which was previously been detected as "architectures"
apk_zip.write(random_file_in_lib, 'assets/extensions/webcompat/lib/about_compat_broker.js')

return apk_path


Expand Down

0 comments on commit 0ace34f

Please sign in to comment.