mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
gnome.updateScript: Prevent downgrading packages
This commit is contained in:
parent
a9b97f18d0
commit
812dd30e62
@ -25,6 +25,7 @@ let
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from libversion import Version
|
||||
|
||||
_, attr_path, package_name, package_version, version_policy, *remaining_args = sys.argv
|
||||
|
||||
@ -51,6 +52,12 @@ let
|
||||
],
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
if Version(latest_tag) <= Version(package_version):
|
||||
# No newer updates found.
|
||||
print(json.dumps([]))
|
||||
sys.exit(0)
|
||||
|
||||
latest_tag = latest_tag.strip()
|
||||
subprocess.run(
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user