Lines Matching +full:- +full:p
9 # http://www.apache.org/licenses/LICENSE-2.0
62 sys.stderr.write("error: non-GRF device must not define "
65 # non-GRF device skips the GRF validation test
90 the sysprop is a read-only one.
98 for p in prop_list.get_all_props():
99 if len(p.value) > PROP_VALUE_MAX and not p.name.startswith("ro."):
102 (p.name, PROP_VALUE_MAX))
103 sys.stderr.write("%s (%d)\n" % (p.value, len(p.value)))
105 if p.is_optional():
108 sys.stderr.write(str(p) + "\n")
125 optional_props = [p for p in props if p.is_optional()]
126 overriding_props = [p for p in props if not p.is_optional()]
129 if all(overriding_props[0].value == p.value for p in overriding_props):
130 for p in optional_props:
131 p.delete("overridden by %s" % str(overriding_props[0]))
136 # Convert them into non-optional because init doesn't understand ?=
138 for p in optional_props:
139 p.optional = False
144 for p in overriding_props:
145 sys.stderr.write("%s\n" % str(p))
147 for p in optional_props:
148 p.delete("overridden by %s" % str(overriding_props[0]))
151 for p in optional_props[:-1]:
152 p.delete("overridden by %s" % str(optional_props[-1]))
153 # Make the last optional one as non-optional
154 optional_props[-1].optional = False
194 assignment = str(self).rsplit("\n", 1)[-1]
218 return [p for p in self.props if not p.is_comment()]
221 return set([p.name for p in self.get_all_props()])
224 return [p for p in self.get_all_props() if p.name == name]
228 return next((p.value for p in self.props if p.name == name), "")
232 # Instead a new non-optional prop is appended, which will override the
234 # non-optional prop of the same name.
235 index = next((i for i,p in enumerate(self.props)
236 if p.name == name and not p.is_optional()), -1)
237 if index == -1:
239 comment="# Auto-added by post_process_props.py"))
248 for p in self.props:
249 f.write(str(p) + "\n")
252 parser = argparse.ArgumentParser(description="Post-process build.prop file")
253 parser.add_argument("--allow-dup", dest="allow_dup", action="store_true",
257 parser.add_argument("--sdk-version", type=int, required=True)
275 for p in props.get_props(key):
276 p.delete("%s is a disallowed key" % key)