mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
nixos/systemd-boot: Use the correct version string from the bootctl --version output
This commit is contained in:
parent
4ddc78818e
commit
3efc2de6d1
@ -214,7 +214,7 @@ def main() -> None:
|
|||||||
subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "--no-variables", "install"])
|
subprocess.check_call(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "--no-variables", "install"])
|
||||||
else:
|
else:
|
||||||
# Update bootloader to latest if needed
|
# Update bootloader to latest if needed
|
||||||
systemd_version = subprocess.check_output(["@systemd@/bin/bootctl", "--version"], universal_newlines=True).split()[1]
|
systemd_version = subprocess.check_output(["@systemd@/bin/bootctl", "--version"], universal_newlines=True).split()[2]
|
||||||
sdboot_status = subprocess.check_output(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "status"], universal_newlines=True)
|
sdboot_status = subprocess.check_output(["@systemd@/bin/bootctl", "--path=@efiSysMountPoint@", "status"], universal_newlines=True)
|
||||||
|
|
||||||
# See status_binaries() in systemd bootctl.c for code which generates this
|
# See status_binaries() in systemd bootctl.c for code which generates this
|
||||||
@ -228,7 +228,7 @@ def main() -> None:
|
|||||||
# Let systemd-boot attempt an installation if a previous one wasn't found
|
# Let systemd-boot attempt an installation if a previous one wasn't found
|
||||||
needs_install = True
|
needs_install = True
|
||||||
else:
|
else:
|
||||||
sdboot_version = m.group(2)
|
sdboot_version = f'({m.group(2)})'
|
||||||
if systemd_version != sdboot_version:
|
if systemd_version != sdboot_version:
|
||||||
print("updating systemd-boot from %s to %s" % (sdboot_version, systemd_version))
|
print("updating systemd-boot from %s to %s" % (sdboot_version, systemd_version))
|
||||||
needs_install = True
|
needs_install = True
|
||||||
|
@ -84,7 +84,7 @@ in
|
|||||||
)
|
)
|
||||||
|
|
||||||
output = machine.succeed("/run/current-system/bin/switch-to-configuration boot")
|
output = machine.succeed("/run/current-system/bin/switch-to-configuration boot")
|
||||||
assert "updating systemd-boot from 000.0-1-notnixos to " in output
|
assert "updating systemd-boot from (000.0-1-notnixos) to " in output
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user