software-properties,distro-info-data: fix PPA integration by adding upstream codename info.
This commit is contained in:
parent
be5ac69f00
commit
ed32106273
5 changed files with 54 additions and 51 deletions
|
|
@ -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
|
||||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue