software-properties,distro-info-data: fix PPA integration by adding upstream codename info.

This commit is contained in:
Luis Guzmán 2023-01-23 02:04:09 +00:00
parent be5ac69f00
commit ed32106273
5 changed files with 54 additions and 51 deletions

View file

@ -1,14 +1,14 @@
version,codename,series,created,release,eol
2.0 LTS,Robur,robur,2007-10-18,2008-07-24,2011-05-12
3.0,Dwyn,dwyn,2008-10-30,2009-09-08,2010-10-23
3.5,Awen,awen,2009-04-23,2010-03-22,2011-04-30
4.0 LTS,Taranis,taranis,2009-10-29,2010-09-17,2013-05-09
4.5,Slaine,slaine,2010-04-29,2011-03-24,2012-04-10
5.0,Dagda,dagda,2010-10-10,2011-09-17,2012-10-28
5.5,Brigantia,brigantia,2011-04-28,2012-04-16,2013-05-09
6.0 LTS,Toutanis,toutanis,2011-10-13,2013-03-11,2017-04-28
7.0 LTS,Belenos,belenos,2013-10-17,2014-11-03,2019-04-25
8.0 LTS,Flidas,flidas,2015-10-22,2018-04-18,2021-04-21
9.0 LTS,Etiona,etiona,2017-10-19,2020-10-16,2023-04-26
10.0 LTS,Nabia,nabia,2019-10-17,2021-12-16,2025-04-23
11.0 LTS,Aramo,aramo,2021-10-14,2027-04-21,2027-04-21
version,codename,series,created,release,eol,upstream
2.0 LTS,Robur,robur,2007-10-18,2008-07-24,2011-05-12,hardy
3.0,Dwyn,dwyn,2008-10-30,2009-09-08,2010-10-23,jaunty
3.5,Awen,awen,2009-04-23,2010-03-22,2011-04-30,karmik
4.0 LTS,Taranis,taranis,2009-10-29,2010-09-17,2013-05-09,lucid
4.5,Slaine,slaine,2010-04-29,2011-03-24,2012-04-10,maverick
5.0,Dagda,dagda,2010-10-10,2011-09-17,2012-10-28,natty
5.5,Brigantia,brigantia,2011-04-28,2012-04-16,2013-05-09,oneiric
6.0 LTS,Toutanis,toutanis,2011-10-13,2013-03-11,2017-04-28,precise
7.0 LTS,Belenos,belenos,2013-10-17,2014-11-03,2019-04-25,trusty
8.0 LTS,Flidas,flidas,2015-10-22,2018-04-18,2021-04-21,xenial
9.0 LTS,Etiona,etiona,2017-10-19,2020-10-16,2023-04-26,bionic
10.0 LTS,Nabia,nabia,2019-10-17,2021-12-16,2025-04-23,focal
11.0 LTS,Aramo,aramo,2021-10-14,2027-04-21,2027-04-21,jammy

1 version codename series created release eol upstream
2 2.0 LTS Robur robur 2007-10-18 2008-07-24 2011-05-12 hardy
3 3.0 Dwyn dwyn 2008-10-30 2009-09-08 2010-10-23 jaunty
4 3.5 Awen awen 2009-04-23 2010-03-22 2011-04-30 karmik
5 4.0 LTS Taranis taranis 2009-10-29 2010-09-17 2013-05-09 lucid
6 4.5 Slaine slaine 2010-04-29 2011-03-24 2012-04-10 maverick
7 5.0 Dagda dagda 2010-10-10 2011-09-17 2012-10-28 natty
8 5.5 Brigantia brigantia 2011-04-28 2012-04-16 2013-05-09 oneiric
9 6.0 LTS Toutanis toutanis 2011-10-13 2013-03-11 2017-04-28 precise
10 7.0 LTS Belenos belenos 2013-10-17 2014-11-03 2019-04-25 trusty
11 8.0 LTS Flidas flidas 2015-10-22 2018-04-18 2021-04-21 xenial
12 9.0 LTS Etiona etiona 2017-10-19 2020-10-16 2023-04-26 bionic
13 10.0 LTS Nabia nabia 2019-10-17 2021-12-16 2025-04-23 focal
14 11.0 LTS Aramo aramo 2021-10-14 2027-04-21 2027-04-21 jammy

View file

@ -0,0 +1,21 @@
diff -Nru software-properties-0.99.22.4+11.0trisquel9/softwareproperties/ppa.py software-properties-0.99.22.4+11.0trisquel9_fix/softwareproperties/ppa.py
--- software-properties-0.99.22.4+11.0trisquel9/softwareproperties/ppa.py 2023-01-21 14:29:00.314035991 -0600
+++ software-properties-0.99.22.4+11.0trisquel9_fix/softwareproperties/ppa.py 2023-01-21 14:31:47.658510565 -0600
@@ -32,6 +32,8 @@
from urllib.parse import urlparse
+from softwareproperties.trisquel_info import trisquel_upstream_rel
+
PPA_URI_FORMAT = 'https://ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/'
PRIVATE_PPA_URI_FORMAT = 'https://private-ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/'
@@ -85,7 +87,7 @@
uri_format = PRIVATE_PPA_URI_FORMAT if self.lpppa.private else PPA_URI_FORMAT
uri = uri_format.format(team=self.teamname, ppa=self.ppaname)
- line = ('%s %s %s %s' % (self.binary_type, uri, self.dist, ' '.join(comps)))
+ line = ('%s %s %s %s' % (self.binary_type, uri, trisquel_upstream_rel, ' '.join(comps)))
self._set_source_entry(line)
@property

View file

@ -3,7 +3,7 @@
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@ -31,7 +31,14 @@ def trisquel_eol():
eol_datetime = datetime.strptime(line['eol'], '%Y-%m-%d')
eol_date = eol_datetime.date()
return eol_date
def trisquel_upstream():
with open('/usr/share/distro-info/trisquel.csv', 'r') as distro_data:
trisquel_distro_data = csv.DictReader(distro_data)
for line in trisquel_distro_data:
if line['series'] == (release_name):
codename_upstream = line['upstream']
return(codename_upstream)
trisquel_rel_desc = release_description
trisquel_eol = trisquel_eol()
trisquel_upstream_rel = trisquel_upstream()