diff options
-rwxr-xr-x | scripts/contrib/list-packageconfig-flags.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/contrib/list-packageconfig-flags.py b/scripts/contrib/list-packageconfig-flags.py index 615f91fdc7..3db429834b 100755 --- a/scripts/contrib/list-packageconfig-flags.py +++ b/scripts/contrib/list-packageconfig-flags.py | |||
@@ -83,7 +83,10 @@ def get_recipesdata(bbhandler, preferred): | |||
83 | data_dict = {} | 83 | data_dict = {} |
84 | for fn in get_fnlist(bbhandler, pkg_pn, preferred): | 84 | for fn in get_fnlist(bbhandler, pkg_pn, preferred): |
85 | data = bb.cache.Cache.loadDataFull(fn, bbhandler.cooker.collection.get_file_appends(fn), bbhandler.config_data) | 85 | data = bb.cache.Cache.loadDataFull(fn, bbhandler.cooker.collection.get_file_appends(fn), bbhandler.config_data) |
86 | if data.getVarFlags("PACKAGECONFIG"): | 86 | flags = data.getVarFlags("PACKAGECONFIG") |
87 | flags.pop('doc', None) | ||
88 | flags.pop('defaultval', None) | ||
89 | if flags: | ||
87 | data_dict[fn] = data | 90 | data_dict[fn] = data |
88 | 91 | ||
89 | return data_dict | 92 | return data_dict |
@@ -94,6 +97,8 @@ def collect_pkgs(data_dict): | |||
94 | pkg_dict = {} | 97 | pkg_dict = {} |
95 | for fn in data_dict: | 98 | for fn in data_dict: |
96 | pkgconfigflags = data_dict[fn].getVarFlags("PACKAGECONFIG") | 99 | pkgconfigflags = data_dict[fn].getVarFlags("PACKAGECONFIG") |
100 | pkgconfigflags.pop('doc', None) | ||
101 | pkgconfigflags.pop('defaultval', None) | ||
97 | pkgname = data_dict[fn].getVar("P", True) | 102 | pkgname = data_dict[fn].getVar("P", True) |
98 | pkg_dict[pkgname] = sorted(pkgconfigflags.keys()) | 103 | pkg_dict[pkgname] = sorted(pkgconfigflags.keys()) |
99 | 104 | ||
@@ -105,9 +110,6 @@ def collect_flags(pkg_dict): | |||
105 | flag_dict = {} | 110 | flag_dict = {} |
106 | for pkgname, flaglist in pkg_dict.iteritems(): | 111 | for pkgname, flaglist in pkg_dict.iteritems(): |
107 | for flag in flaglist: | 112 | for flag in flaglist: |
108 | if flag == "defaultval": | ||
109 | continue | ||
110 | |||
111 | if flag in flag_dict: | 113 | if flag in flag_dict: |
112 | flag_dict[flag].append(pkgname) | 114 | flag_dict[flag].append(pkgname) |
113 | else: | 115 | else: |
@@ -153,7 +155,7 @@ def display_all(data_dict): | |||
153 | print('PACKAGECONFIG %s' % packageconfig) | 155 | print('PACKAGECONFIG %s' % packageconfig) |
154 | 156 | ||
155 | for flag,flag_val in data_dict[fn].getVarFlags("PACKAGECONFIG").iteritems(): | 157 | for flag,flag_val in data_dict[fn].getVarFlags("PACKAGECONFIG").iteritems(): |
156 | if flag == "defaultval": | 158 | if flag in ["defaultval", "doc"]: |
157 | continue | 159 | continue |
158 | print('PACKAGECONFIG[%s] %s' % (flag, flag_val)) | 160 | print('PACKAGECONFIG[%s] %s' % (flag, flag_val)) |
159 | print '' | 161 | print '' |