Commit 49b40f82 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

[repodata-patches] remove kaldi packages

parent 2d1d8d7c
Pipeline #41920 passed with stage
in 8 minutes and 2 seconds
......@@ -24,11 +24,26 @@ SUBDIRS = (
"osx-64",
)
REMOVALS = {"osx-64": {}, "linux-64": {}, "noarch": {}}
REMOVALS = {
"osx-64": {},
"linux-64": {
"kaldi-1!5.5.164-h93a79c4_1.conda",
"kaldi-1!5.5.164-h13f0c7c_0.conda",
"kaldi-1!5.5.164-h13f0c7c_0.tar.bz2",
"kaldi-2017.03.13-h6bb2d05_3.tar.bz2",
"kaldi-r7271.1a4dbf6-h6bb2d05_2.tar.bz2",
"kaldi-r7271.1a4dbf6-0.tar.bz2",
},
"noarch": {},
}
OPERATORS = ["==", ">=", "<=", ">", "<", "!="]
def _add_removals(instructions, currvals):
instructions["remove"].extend(tuple(set(currvals)))
def _gen_patch_instructions(index, new_index, packages_key):
instructions = {
"patch_instructions_version": 1,
......@@ -80,6 +95,7 @@ def gen_new_index_and_patch_instructions(repodata):
for i, packages_key in enumerate(["packages", "packages.conda"]):
new_index = _gen_new_index(repodata, packages_key)
inst = _gen_patch_instructions(repodata[packages_key], new_index, packages_key)
_add_removals(inst, REMOVALS[repodata["info"]["subdir"]])
if i == 0:
instructions.update(inst)
else:
......
......@@ -20,7 +20,7 @@ CACHE_DIR = os.environ.get(
def show_record_diffs(subdir, ref_repodata, new_repodata):
for packages_key in ("packages", "packages.conda"):
for name, ref_pkg in ref_repodata[packages_key].items():
new_pkg = new_repodata[packages_key][name]
new_pkg = new_repodata[packages_key].get(name, {})
# license_family gets added for new packages, ignore it in the diff
ref_pkg.pop("license_family", None)
new_pkg.pop("license_family", None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment