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:
@@ -119,11 +119,15 @@ let
|
||||
def lines: split("\n") | map(select(. != "" and (test("\\.(tar|patch|diff|zip|tgz|tbz2?|txz|gz|xz|bz2|sh|py|nix|json|conf|asc|sig|lock)$") | not)));
|
||||
def strip: sub("-(bin|dev|lib|out|man|doc|info|devdoc|static|lib32|modules|modules-shrunk|libgcc|getent|debug)$"; "");
|
||||
def parse: capture("^(?<n>.*?)-(?<v>[0-9].*)$") // {n: ., v: ""};
|
||||
# Among the new versions of a package, one that continues another (5.6.0-go next
|
||||
# to 5.6.0) belongs to a build-time part of it (lego-5.6.0-go-modules).
|
||||
def own: . as $all | map(select(. as $v | $all | any(. as $p | $p != $v and ($v | startswith($p + "-"))) | not));
|
||||
def table: map(strip | parse) | group_by(.n) | map({key: .[0].n, value: (map(.v) | unique)}) | from_entries;
|
||||
($old | lines | table) as $o | ($new | lines | table) as $n
|
||||
| [ $o | to_entries[] | select($n[.key] != null and .value != [""])
|
||||
| select(((.value - $n[.key]) | length) == (.value | length) and (($n[.key] - .value) | length) > 0)
|
||||
| {name: .key, from: (.value | join(", ")), to: ($n[.key] - .value | join(", "))} ]
|
||||
| {name: .key, from: (.value | join(", ")), to: ($n[.key] - .value | own | join(", "))} ]
|
||||
| map(select(.name | startswith("nixos-system-") | not))
|
||||
| sort_by(.name)'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user