diff --git a/deps/repodata-patches/gen_patch_json.py b/deps/repodata-patches/gen_patch_json.py index 86ae2a9ac54ac8b8a03d1f1bf82f9dcfb9fd3111..70afa46eb7e6389ee1967164da38d0fd19d375d6 100644 --- a/deps/repodata-patches/gen_patch_json.py +++ b/deps/repodata-patches/gen_patch_json.py @@ -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: diff --git a/deps/repodata-patches/show_diff.py b/deps/repodata-patches/show_diff.py index 06f8c10cf7d64016e7dd1e3c8892fc4da08afa84..d85ff3796b1b933ff088862ad4d3f1c1579db2cd 100755 --- a/deps/repodata-patches/show_diff.py +++ b/deps/repodata-patches/show_diff.py @@ -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)