mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-23 12:34:15 +00:00
Merge pull request #244300 from michaeladler/edge
microsoft-edge: ensure stable order for upstream sources
This commit is contained in:
commit
f3797f3fc2
@ -2,14 +2,13 @@
|
|||||||
#! nix-shell -i python3 -p python3Packages.packaging python3Packages.debian
|
#! nix-shell -i python3 -p python3Packages.packaging python3Packages.debian
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import gzip
|
|
||||||
import textwrap
|
import textwrap
|
||||||
from urllib import request
|
from urllib import request
|
||||||
|
|
||||||
|
from collections import OrderedDict
|
||||||
from debian.deb822 import Packages
|
from debian.deb822 import Packages
|
||||||
from debian.debian_support import Version
|
from debian.debian_support import Version
|
||||||
|
|
||||||
|
|
||||||
def packages():
|
def packages():
|
||||||
packages_url = 'https://packages.microsoft.com/repos/edge/dists/stable/main/binary-amd64/Packages'
|
packages_url = 'https://packages.microsoft.com/repos/edge/dists/stable/main/binary-amd64/Packages'
|
||||||
handle = request.urlopen(packages_url)
|
handle = request.urlopen(packages_url)
|
||||||
@ -17,7 +16,7 @@ def packages():
|
|||||||
|
|
||||||
|
|
||||||
def latest_packages(packages: bytes):
|
def latest_packages(packages: bytes):
|
||||||
latest_packages: dict[str, Packages] = {}
|
latest_packages: OrderedDict[str, Packages] = {}
|
||||||
for package in Packages.iter_paragraphs(packages, use_apt_pkg=False):
|
for package in Packages.iter_paragraphs(packages, use_apt_pkg=False):
|
||||||
name: str = package['Package']
|
name: str = package['Package']
|
||||||
if not name.startswith('microsoft-edge-'):
|
if not name.startswith('microsoft-edge-'):
|
||||||
|
Loading…
Reference in New Issue
Block a user