Skip to content
Snippets Groups Projects
Commit 49b40f82 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

[repodata-patches] remove kaldi packages

parent 2d1d8d7c
No related branches found
No related tags found
1 merge request!166[repodata-patches] remove kaldi packages
Pipeline #41920 passed
...@@ -24,11 +24,26 @@ SUBDIRS = ( ...@@ -24,11 +24,26 @@ SUBDIRS = (
"osx-64", "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 = ["==", ">=", "<=", ">", "<", "!="] OPERATORS = ["==", ">=", "<=", ">", "<", "!="]
def _add_removals(instructions, currvals):
instructions["remove"].extend(tuple(set(currvals)))
def _gen_patch_instructions(index, new_index, packages_key): def _gen_patch_instructions(index, new_index, packages_key):
instructions = { instructions = {
"patch_instructions_version": 1, "patch_instructions_version": 1,
...@@ -80,6 +95,7 @@ def gen_new_index_and_patch_instructions(repodata): ...@@ -80,6 +95,7 @@ def gen_new_index_and_patch_instructions(repodata):
for i, packages_key in enumerate(["packages", "packages.conda"]): for i, packages_key in enumerate(["packages", "packages.conda"]):
new_index = _gen_new_index(repodata, packages_key) new_index = _gen_new_index(repodata, packages_key)
inst = _gen_patch_instructions(repodata[packages_key], new_index, packages_key) inst = _gen_patch_instructions(repodata[packages_key], new_index, packages_key)
_add_removals(inst, REMOVALS[repodata["info"]["subdir"]])
if i == 0: if i == 0:
instructions.update(inst) instructions.update(inst)
else: else:
......
...@@ -20,7 +20,7 @@ CACHE_DIR = os.environ.get( ...@@ -20,7 +20,7 @@ CACHE_DIR = os.environ.get(
def show_record_diffs(subdir, ref_repodata, new_repodata): def show_record_diffs(subdir, ref_repodata, new_repodata):
for packages_key in ("packages", "packages.conda"): for packages_key in ("packages", "packages.conda"):
for name, ref_pkg in ref_repodata[packages_key].items(): 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 # license_family gets added for new packages, ignore it in the diff
ref_pkg.pop("license_family", None) ref_pkg.pop("license_family", None)
new_pkg.pop("license_family", None) new_pkg.pop("license_family", None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment