Hi, I've updated the filtering feature to accommodate binary filtering, which we plan to later use in Rida (fm-orchestrator). The only file affected is __init__.py along with its related tests.
__init__.py
1 new commit added
That could be filtered_packages = {}.
filtered_packages = {}
A couple of things about this block:
yaml
dict.items()
get()
or
E.g.:
rpms_yaml = yml['data']['components']['rpms'] filter_yaml = rpms_yaml['filter'] packages_yaml = rpms_yaml['packages'] for filtkey, filter in filter_yaml.items(): for p in packages_yaml: if (p == filtkey or filtkey in filtered_packages or filtkey in packages_yaml): # exclude this package continue arches = filter.get('arches') if arches: # pls add comment: what does the following mean? if arches[0] == ".+": arches = ["*"] filtkey += ".+" else: # filter is for all architectures arches = ["*"] filtered_packages[filtkey] = arches
similar here:
... for pkey, pvalue in filtered_packages.items(): for a in pvalue: ...
What does str(filtered).replace("'",'"') do here?
str(filtered).replace("'",'"')
Another instance where dict.items() is handy...
Hmm, this is something I remember discussing with Lubos a few times. I was always against this as it's already solved on the RPM level. There's no need to filter packages that don't get built on those particular architectures.
Well the deal here is to filter out packages that are build ... like, We don't want ship -devel packages at all :-)
Lubos
We still have no use for this and it's no longer compatible. I'll close this PR now.
Pull-Request has been closed by psabata
Hi, I've updated the filtering feature to accommodate binary filtering, which we plan to later use in Rida (fm-orchestrator). The only file affected is
__init__.pyalong with its related tests.