Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2038)

Unified Diff: native_client_sdk/src/build_tools/update_nacl_manifest.py

Issue 1493443002: Revert of [NaCl SDK] Remove support for bionic toolchain (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/build_tools/update_nacl_manifest.py
diff --git a/native_client_sdk/src/build_tools/update_nacl_manifest.py b/native_client_sdk/src/build_tools/update_nacl_manifest.py
index 82934b7359fac855e4ce67899cdaac60f9921cfc..a2d8776c7b584caaa6ab0431215528cee118fc3d 100755
--- a/native_client_sdk/src/build_tools/update_nacl_manifest.py
+++ b/native_client_sdk/src/build_tools/update_nacl_manifest.py
@@ -38,6 +38,7 @@
GS_MANIFEST_BACKUP_DIR = GS_BUCKET_PATH + 'manifest_backups/'
CANARY_BUNDLE_NAME = 'pepper_canary'
+BIONIC_CANARY_BUNDLE_NAME = 'bionic_canary'
CANARY = 'canary'
NACLPORTS_ARCHIVE_NAME = 'naclports.tar.bz2'
@@ -122,6 +123,11 @@
The basename of the sdk archive for that platform.
"""
return 'naclsdk_%s.tar.bz2' % platform
+
+
+def GetBionicArchiveName():
+ """Get the basename of an archive. Currently this is linux-only"""
+ return 'naclsdk_bionic.tar.bz2'
def GetCanonicalArchiveName(url):
@@ -355,12 +361,14 @@
e.g. [('foo.tar.bz2', '18.0.1000.0'), ('bar.tar.bz2', '19.0.1100.20')]
These archives must exist to consider a version for inclusion, as
long as that version is greater than the archive's minimum version.
+ is_bionic: True if we are searching for bionic archives.
"""
- def __init__(self, delegate, platforms, extra_archives=None):
+ def __init__(self, delegate, platforms, extra_archives=None, is_bionic=False):
self.delegate = delegate
self.history = delegate.GetHistory()
self.platforms = platforms
self.extra_archives = extra_archives
+ self.is_bionic = is_bionic
def GetMostRecentSharedVersion(self, major_version):
"""Returns the most recent version of a pepper bundle that exists on all
@@ -413,7 +421,11 @@
"""
archive_urls = self._GetAvailableArchivesFor(version)
- expected_archives = set(GetPlatformArchiveName(p) for p in self.platforms)
+ if self.is_bionic:
+ # Bionic currently is Linux-only.
+ expected_archives = set([GetBionicArchiveName()])
+ else:
+ expected_archives = set(GetPlatformArchiveName(p) for p in self.platforms)
if self.extra_archives:
for extra_archive, min_version, max_version in self.extra_archives:
@@ -796,7 +808,7 @@
manifest = delegate.GetRepoManifest()
auto_update_bundles = []
for bundle in manifest.GetBundles():
- if not bundle.name.startswith('pepper_'):
+ if not bundle.name.startswith(('pepper_', 'bionic_')):
continue
archives = bundle.GetArchives()
if not archives:
@@ -810,7 +822,13 @@
for bundle in auto_update_bundles:
try:
- if bundle.name == CANARY_BUNDLE_NAME:
+ if bundle.name == BIONIC_CANARY_BUNDLE_NAME:
+ logger.info('>>> Looking for most recent bionic_canary...')
+ # Ignore extra_archives on bionic; There is no naclports bundle yet.
+ version_finder = VersionFinder(delegate, platforms, None,
+ is_bionic=True)
+ version, channel, archives = version_finder.GetMostRecentSharedCanary()
+ elif bundle.name == CANARY_BUNDLE_NAME:
logger.info('>>> Looking for most recent pepper_canary...')
version_finder = VersionFinder(delegate, platforms, extra_archives)
version, channel, archives = version_finder.GetMostRecentSharedCanary()
« no previous file with comments | « native_client_sdk/src/build_tools/tests/update_nacl_manifest_test.py ('k') | native_client_sdk/src/doc/sdk/download.rst » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698