buildconfig.py fails when config.status contains empty lists

RESOLVED FIXED in mozilla21

Status

RESOLVED FIXED
6 years ago
a year ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

Trunk
mozilla21
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
On comm-central, the headers list is empty, and this makes buildconfig.py fail.
(Assignee)

Comment 1

6 years ago
Created attachment 703814 [details] [diff] [review]
Handle empty lists from config.status in buildconfig.py

Note the patch probably doesn't apply on m-c because of the context which depends on bug 780561, but the modified part doesn't depend on bug 780561.
Attachment #703814 - Flags: review?(ted)
(Assignee)

Updated

6 years ago
Blocks: 780561
Comment on attachment 703814 [details] [diff] [review]
Handle empty lists from config.status in buildconfig.py

Review of attachment 703814 [details] [diff] [review]:
-----------------------------------------------------------------

::: build/buildconfig.py
@@ +20,5 @@
>  # This effectively imports topsrcdir, topobjdir, defines, substs, files,
>  # headers and non_global_defines
>  for var in config.__all__:
>      value = getattr(config, var)
> +    if isinstance(value, list) and len(value) and isinstance(value[0], tuple):

I'd prefer if the middle test was either just "value" or "len(value) > 0".
Attachment #703814 - Flags: review?(ted) → review+
https://hg.mozilla.org/mozilla-central/rev/6b280e155484
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21

Updated

a year ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.