зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1230060 - Don't fail to read an install manifest containing non-actionable items. r=gps
Future improvements to process_install_manifest's --track option will require adding data in the tracking dump that uses an install manifest form, and I don't want e.g. switching branches or bisection to require to clobber in order to do the right thing, so this change future-proofs the install manifest reader.
This commit is contained in:
Родитель
831f8542c7
Коммит
3d1b660fdf
|
@ -85,6 +85,8 @@ class InstallManifest(object):
|
|||
|
||||
FIELD_SEPARATOR = '\x1f'
|
||||
|
||||
# Negative values are reserved for non-actionable items, that is, metadata
|
||||
# that doesn't describe files in the destination.
|
||||
SYMLINK = 1
|
||||
COPY = 2
|
||||
REQUIRED_EXISTS = 3
|
||||
|
@ -163,8 +165,11 @@ class InstallManifest(object):
|
|||
silence_missing_directive_warnings=bool(int(warnings)))
|
||||
continue
|
||||
|
||||
raise UnreadableInstallManifest('Unknown record type: %d' %
|
||||
record_type)
|
||||
# Don't fail for non-actionable items, allowing
|
||||
# forward-compatibility with those we will add in the future.
|
||||
if record_type >= 0:
|
||||
raise UnreadableInstallManifest('Unknown record type: %d' %
|
||||
record_type)
|
||||
|
||||
def __len__(self):
|
||||
return len(self._dests)
|
||||
|
|
Загрузка…
Ссылка в новой задаче