def make_package_placeholder(workdir, prefix, allow_root): """ Change paths in binaries to placeholder paths """ buildinfo = read_buildinfo_file(workdir) cur_path_names = list() for filename in buildinfo['relocate_binaries']: cur_path_names.append(os.path.join(workdir, filename)) relocate.make_binary_placeholder(cur_path_names, allow_root) cur_path_names = list() for filename in buildinfo.get('relocate_links', []): cur_path_names.append(os.path.join(workdir, filename)) relocate.make_link_placeholder(cur_path_names, workdir, prefix)
def make_package_placeholder(workdir, spec, allow_root): """ Check if package binaries are relocatable. Change links to placeholder links. """ prefix = spec.prefix buildinfo = read_buildinfo_file(workdir) cur_path_names = list() for filename in buildinfo['relocate_binaries']: cur_path_names.append(os.path.join(workdir, filename)) relocate.check_files_relocatable(cur_path_names, allow_root) cur_path_names = list() for filename in buildinfo.get('relocate_links', []): cur_path_names.append(os.path.join(workdir, filename)) relocate.make_link_placeholder(cur_path_names, workdir, prefix)