diff --git a/conda_build/build.py b/conda_build/build.py index 5f1f667575..25af32b89f 100644 --- a/conda_build/build.py +++ b/conda_build/build.py @@ -438,16 +438,6 @@ def create_info_files(m, files, config, prefix): for f in files: fo.write(f + '\n') - no_link = m.get_value('build/no_link') - if no_link: - if not isinstance(no_link, list): - no_link = [no_link] - files_with_prefix = get_files_with_prefix(m, files, prefix) - - no_link = m.get_value('build/no_link') - if no_link: - if not isinstance(no_link, list): - no_link = [no_link] files_with_prefix = get_files_with_prefix(m, files, prefix) create_info_files_json(m, config.info_dir, prefix, files, files_with_prefix) @@ -533,7 +523,7 @@ def build_info_files_json(m, prefix, files, files_with_prefix): if prefix_placeholder and file_mode: file_info["prefix_placeholder"] = prefix_placeholder file_info["file_mode"] = file_mode - if file_info.get("file_type") == "hardlink" and os.stat(fi).st_nlink > 1: + if file_info.get("file_type") == "hardlink" and os.stat(join(prefix, fi)).st_nlink > 1: inode_paths = get_inode_paths(files, fi, prefix) file_info["inode_paths"] = inode_paths files_json.append(file_info) diff --git a/tests/test_build.py b/tests/test_build.py index eb1c96642c..ac112f0064 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -198,9 +198,9 @@ def test_sorted_inode_first_path(testing_workdir): os.link(path_one, path_one_hardlink) files = ["one", "two", "one_hl"] - assert build.get_sorted_inode_first_path(files, "one", testing_workdir) == ["one", "one_hl"] - assert build.get_sorted_inode_first_path(files, "one_hl", testing_workdir) == ["one", "one_hl"] - assert build.get_sorted_inode_first_path(files, "two", testing_workdir) == ["two"] + assert build.get_inode_paths(files, "one", testing_workdir) == ["one", "one_hl"] + assert build.get_inode_paths(files, "one_hl", testing_workdir) == ["one", "one_hl"] + assert build.get_inode_paths(files, "two", testing_workdir) == ["two"] def test_create_info_files_json(testing_workdir, test_metadata):