git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/systemd-boot: Use os.path.realpath to fully resolve symlinks

os.readlink only resolves one layer of symlinks. This script explicitly relies on the real path of a file for deduplication, hence symlink resolution should recurse.

commit2cf6f9e5bddd10917979dc77279a8eaf6773c7f5 authorMax <max@privatevoid.net> dateThu 24 Jun 2021, 17:52 (5 years ago) parent21e25c6
1 file changed+1−1
nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py+1−1
nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py+1−1
@@ -61,7 +61,7 @@ def write_loader_conf(profile: Optional[str], generation: int) -> None:
6161
6262
6363def profile_path(profile: Optional[str], generation: int, name: str) -> str:
64− return os.readlink("%s/%s" % (system_dir(profile, generation), name))
64+ return os.path.realpath("%s/%s" % (system_dir(profile, generation), name))
6565
6666
6767def copy_from_profile(profile: Optional[str], generation: int, name: str, dry_run: bool = False) -> str: