rebuild-debian-csv: Add Devuan Linux release names.
Needs rebuild-debian-csv: Use dist names not ls-lR.gz. debians-arm.csv debians-x86.csv
This commit is contained in:
parent
e80334bb1a
commit
d3a0e4fbd6
|
|
@ -9,6 +9,16 @@ debian,sid,armhf,"Debian unstable (""sid"")",False
|
|||
debian,sid,arm64,"Debian unstable (""sid"")",False
|
||||
debian,experimental,armhf,"Debian experimental (""rc-buggy"")",True
|
||||
debian,experimental,arm64,"Debian experimental (""rc-buggy"")",True
|
||||
devuan,ceres,armhf,"Devuan unstable/1.0.0 (""ceres"")",False
|
||||
devuan,ceres,arm64,"Devuan unstable/1.0.0 (""ceres"")",False
|
||||
devuan,beowulf,armhf,"Devuan oldoldstable/3.0 (""beowulf"")",False
|
||||
devuan,beowulf,arm64,"Devuan oldoldstable/3.0 (""beowulf"")",False
|
||||
devuan,chimaera,armhf,"Devuan oldstable/4.0 (""chimaera"")",False
|
||||
devuan,chimaera,arm64,"Devuan oldstable/4.0 (""chimaera"")",False
|
||||
devuan,daedalus,armhf,"Devuan stable/5.0 (""daedalus"")",False
|
||||
devuan,daedalus,arm64,"Devuan stable/5.0 (""daedalus"")",False
|
||||
devuan,excalibur,armhf,"Devuan testing/6.0 (""excalibur"")",False
|
||||
devuan,excalibur,arm64,"Devuan testing/6.0 (""excalibur"")",False
|
||||
ubuntu,focal,armhf,"Ubuntu 20.04 LTS (""focal"")",False
|
||||
ubuntu,focal,arm64,"Ubuntu 20.04 LTS (""focal"")",False
|
||||
ubuntu,jammy,armhf,"Ubuntu 22.04 LTS (""jammy"")",False
|
||||
|
|
@ -17,4 +27,5 @@ ubuntu,mantic,armhf,"Ubuntu 23.10 (""mantic"")",False
|
|||
ubuntu,mantic,arm64,"Ubuntu 23.10 (""mantic"")",False
|
||||
ubuntu,noble,armhf,"Ubuntu 24.04 LTS (""noble"")",False
|
||||
ubuntu,noble,arm64,"Ubuntu 24.04 LTS (""noble"")",False
|
||||
ubuntu,oracular,armhf,"Ubuntu 24.10 (""oracular"")",True
|
||||
ubuntu,oracular,arm64,"Ubuntu 24.10 (""oracular"")",True
|
||||
|
|
|
|||
|
|
|
@ -9,6 +9,16 @@ debian,sid,i386,"Debian unstable (""sid"")",False
|
|||
debian,sid,amd64,"Debian unstable (""sid"")",False
|
||||
debian,experimental,i386,"Debian experimental (""rc-buggy"")",True
|
||||
debian,experimental,amd64,"Debian experimental (""rc-buggy"")",True
|
||||
devuan,ceres,i386,"Devuan unstable/1.0.0 (""ceres"")",False
|
||||
devuan,ceres,amd64,"Devuan unstable/1.0.0 (""ceres"")",False
|
||||
devuan,beowulf,i386,"Devuan oldoldstable/3.0 (""beowulf"")",False
|
||||
devuan,beowulf,amd64,"Devuan oldoldstable/3.0 (""beowulf"")",False
|
||||
devuan,chimaera,i386,"Devuan oldstable/4.0 (""chimaera"")",False
|
||||
devuan,chimaera,amd64,"Devuan oldstable/4.0 (""chimaera"")",False
|
||||
devuan,daedalus,i386,"Devuan stable/5.0 (""daedalus"")",False
|
||||
devuan,daedalus,amd64,"Devuan stable/5.0 (""daedalus"")",False
|
||||
devuan,excalibur,i386,"Devuan testing/6.0 (""excalibur"")",False
|
||||
devuan,excalibur,amd64,"Devuan testing/6.0 (""excalibur"")",False
|
||||
ubuntu,focal,i386,"Ubuntu 20.04 LTS (""focal"")",False
|
||||
ubuntu,focal,amd64,"Ubuntu 20.04 LTS (""focal"")",False
|
||||
ubuntu,jammy,i386,"Ubuntu 22.04 LTS (""jammy"")",False
|
||||
|
|
|
|||
|
|
|
@ -21,14 +21,26 @@ class Release:
|
|||
for line in fileobj:
|
||||
line = line.decode('utf-8').strip()
|
||||
# Header of "Release" finishes at:
|
||||
# "MD5Sum:" Debian/Ubuntu
|
||||
if line == "MD5Sum:":
|
||||
# "MD5Sum:" in Debian/Ubuntu
|
||||
# "SHA256:" in Devuan
|
||||
if line == "MD5Sum:" or line == "SHA256:":
|
||||
break
|
||||
|
||||
k, v = line.split(": ", 1)
|
||||
params[k] = v
|
||||
|
||||
self.label = params.get("Label")
|
||||
# In Release files,
|
||||
# e.g. https://ftp.debian.org/debian/dists/stable/Release
|
||||
# "Origin" is Debian/Ubuntu/Devuan as expected.
|
||||
# "Origin" = "Label" for Debian and Ubuntu, not always for Devuan.
|
||||
# "Label" is "Debian"/"Ubuntu" for Debian/Ubuntu.
|
||||
# "Label" is "Devuan" or "Master" for Devuan.
|
||||
# "Label" of "Master" has no equivalent in Debian/Ubuntu.
|
||||
#
|
||||
# Where this program uses "label" it really wants "origin".
|
||||
self.origin = params.get("Origin")
|
||||
self.label = self.origin
|
||||
|
||||
self.suite = params.get("Suite")
|
||||
self.version = params.get("Version")
|
||||
self.codename = params.get("Codename")
|
||||
|
|
@ -86,16 +98,29 @@ class Release:
|
|||
return date.today() - release_date
|
||||
|
||||
def is_relevant(self):
|
||||
if self.label not in ("Debian", "Ubuntu", ):
|
||||
if self.label not in ("Debian", "Ubuntu", "Devuan", ):
|
||||
return False
|
||||
|
||||
bl1 = ("oldoldstable", "devel", )
|
||||
if self.suite in bl1:
|
||||
return False
|
||||
if self.label == "Debian" or self.label == "Ubuntu":
|
||||
bl1 = ("oldoldstable", "devel", )
|
||||
if self.suite in bl1:
|
||||
return False
|
||||
|
||||
bl2 = ("-updates", "-backports", "-security", "-proposed", "-sloppy", )
|
||||
if any(self.suite.endswith(suffix) for suffix in bl2):
|
||||
return False
|
||||
bl2 = ("-updates", "-backports", "-security", "-proposed", "-sloppy", )
|
||||
if any(self.suite.endswith(suffix) for suffix in bl2):
|
||||
return False
|
||||
|
||||
if self.label == "Devuan":
|
||||
# "oldoldstable" is maintained in Devuan.
|
||||
# These are no longer maintained.
|
||||
bl_ = ("jessie", "ascii", )
|
||||
if self.suite in bl_:
|
||||
return False
|
||||
|
||||
# For fine-grained control:
|
||||
bl_ = ("-backports", "-security", "-proposed-updates", )
|
||||
if any(self.suite.endswith(suffix) for suffix in bl_):
|
||||
return False
|
||||
|
||||
if self.label == "Ubuntu":
|
||||
if self.is_lts():
|
||||
|
|
@ -110,6 +135,8 @@ class Release:
|
|||
return True
|
||||
if self.label == "Ubuntu" and self.age() < timedelta(days=0):
|
||||
return True
|
||||
if self.label == "Devuan" and self.suite == "experimental":
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
|
@ -249,6 +276,7 @@ def write_csv(filename, releases, archs):
|
|||
|
||||
for r in releases:
|
||||
if not r.is_relevant():
|
||||
logger.debug("Discarding as not relevant: %s ", repr(r))
|
||||
continue
|
||||
|
||||
for arch in archs:
|
||||
|
|
@ -275,7 +303,9 @@ if __name__ == "__main__":
|
|||
assert len(debianreleases) > 0
|
||||
ubuntureleases = set(get_dist_releases("http://ftp.ubuntu.com/ubuntu"))
|
||||
assert len(ubuntureleases) > 0
|
||||
releases = list(sorted(debianreleases | ubuntureleases))
|
||||
devuanreleases = set(get_dist_releases("http://deb.devuan.org/merged"))
|
||||
assert len(devuanreleases) > 0
|
||||
releases = list(sorted(debianreleases | ubuntureleases | devuanreleases))
|
||||
assert len(releases) > 0
|
||||
logger.info("Found %d releases", len(releases))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue