Hide the system and build-only versions from the package list
The system's own path is not a package; its revision change is shown above the list. A version that continues another new one (5.6.0-go next to 5.6.0) is a build-time part of the same package. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
+3
-3
@@ -395,11 +395,11 @@ pkgs.testers.runNixOSTest {
|
||||
target.succeed("test ! -e /var/lib/router/config/nixpkgs-pin.json")
|
||||
|
||||
with subtest("the package list names what changes in version, and only that"):
|
||||
target.succeed("printf '%s\\n' linux-6.12.5 openssl-3.4.1 openssl-3.4.1-bin zlib-1.3.1 frr-10.1 ripgrep-14.1 rg-1.0 glibc-2.40-66 glibc-2.40-66-getent > /tmp/old")
|
||||
target.succeed("printf '%s\\n' linux-6.12.8 openssl-3.4.2 zlib-1.3.1 zlib-1.3.2 frr-10.2 cmake-4.0 bash-5.3 glibc-2.40-66 foo-1.tar.gz > /tmp/new")
|
||||
target.succeed("printf '%s\\n' linux-6.12.5 openssl-3.4.1 openssl-3.4.1-bin zlib-1.3.1 frr-10.1 ripgrep-14.1 rg-1.0 glibc-2.40-66 glibc-2.40-66-getent lego-5.5.1 nixos-system-router-26.11.20261107.f4a03c0 > /tmp/old")
|
||||
target.succeed("printf '%s\\n' linux-6.12.8 openssl-3.4.2 zlib-1.3.1 zlib-1.3.2 frr-10.2 cmake-4.0 bash-5.3 glibc-2.40-66 foo-1.tar.gz lego-5.6.0 lego-5.6.0-go-modules nixos-system-router-26.11.20261113.d5cc683 > /tmp/new")
|
||||
target.succeed("sed -n '/^changes() {/,/^}/p' /run/current-system/sw/bin/router-upgrade > /tmp/changes.sh && test -s /tmp/changes.sh")
|
||||
out = target.succeed("bash -c 'source /tmp/changes.sh; changes /tmp/old /tmp/new' | jq -c 'map(.name + \":\" + .from + \">\" + .to)'")
|
||||
assert json.loads(out) == ["frr:10.1>10.2", "linux:6.12.5>6.12.8", "openssl:3.4.1>3.4.2"], out
|
||||
assert json.loads(out) == ["frr:10.1>10.2", "lego:5.5.1>5.6.0", "linux:6.12.5>6.12.8", "openssl:3.4.1>3.4.2"], out
|
||||
|
||||
with subtest("an upgrade that is not confirmed is rolled back, the lock and the pin included"):
|
||||
lock = target.succeed("cat /var/lib/router/config/flake.lock")
|
||||
|
||||
Reference in New Issue
Block a user