Fix software properties 10.0
This commit is contained in:
parent
2fe57f201c
commit
341c8c9096
3 changed files with 75 additions and 1 deletions
22
helpers/DATA/software-properties/remove_snap_label.patch
Normal file
22
helpers/DATA/software-properties/remove_snap_label.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
--- data/gtkbuilder/main.ui 2021-11-26 14:49:57.068200377 -0600
|
||||||
|
+++ data/gtkbuilder/main.ui_remove_label 2021-11-26 15:06:51.035673116 -0600
|
||||||
|
@@ -534,19 +534,6 @@
|
||||||
|
<property name="border_width">12</property>
|
||||||
|
<property name="spacing">18</property>
|
||||||
|
<child>
|
||||||
|
- <object class="GtkLabel">
|
||||||
|
- <property name="visible">True</property>
|
||||||
|
- <property name="can_focus">False</property>
|
||||||
|
- <property name="label" translatable="yes">Snap package updates are checked routinely and installed automatically.</property>
|
||||||
|
- <property name="xalign">0.5</property>
|
||||||
|
- </object>
|
||||||
|
- <packing>
|
||||||
|
- <property name="expand">False</property>
|
||||||
|
- <property name="fill">False</property>
|
||||||
|
- <property name="position">0</property>
|
||||||
|
- </packing>
|
||||||
|
- </child>
|
||||||
|
- <child>
|
||||||
|
<object class="GtkAlignment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
37
helpers/DATA/software-properties/trisquel_info.py
Normal file
37
helpers/DATA/software-properties/trisquel_info.py
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2021 Luis Guzman <ark@switnet.org>
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
import csv
|
||||||
|
import lsb_release
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
release_name = lsb_release.get_distro_information()['CODENAME']
|
||||||
|
release_description = lsb_release.get_distro_information()['DESCRIPTION']
|
||||||
|
|
||||||
|
def trisquel_eol():
|
||||||
|
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):
|
||||||
|
eol_datetime = datetime.strptime(line['eol'], '%Y-%m-%d')
|
||||||
|
eol_date = eol_datetime.date()
|
||||||
|
return eol_date
|
||||||
|
|
||||||
|
trisquel_rel_desc = release_description
|
||||||
|
trisquel_eol = trisquel_eol()
|
||||||
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
VERSION=3
|
VERSION=4
|
||||||
|
|
||||||
. ./config
|
. ./config
|
||||||
|
|
||||||
|
|
@ -51,6 +51,18 @@ EOF
|
||||||
|
|
||||||
patch -p1 < $DATA/remove_livepatch_from_gtk_uiv1_1.patch
|
patch -p1 < $DATA/remove_livepatch_from_gtk_uiv1_1.patch
|
||||||
patch -p1 < $DATA/disable-livepatch.patch
|
patch -p1 < $DATA/disable-livepatch.patch
|
||||||
|
patch -p0 < $DATA/remove_snap_label.patch
|
||||||
|
|
||||||
|
#Python specific changes
|
||||||
|
cp $DATA/trisquel_info.py softwareproperties/gtk/
|
||||||
|
sed -i '/import softwareproperties.SoftwareProperties/a from softwareproperties.gtk.trisquel_info import trisquel_rel_desc, trisquel_eol' softwareproperties/gtk/SoftwarePropertiesGtk.py
|
||||||
|
sed -i 's|eol_date = distro.eol|eol_date = trisquel_eol|' softwareproperties/gtk/SoftwarePropertiesGtk.py
|
||||||
|
sed -i 's|eol_text = .*|eol_text = trisquel_rel_desc|' softwareproperties/gtk/SoftwarePropertiesGtk.py
|
||||||
|
#Allow to start and remove drivers tab for qt flavor
|
||||||
|
sed -i '/info_bar_ubuntu_pro/d' softwareproperties/gtk/SoftwarePropertiesGtk.py
|
||||||
|
sed -i '/UbuntuDrivers/d' softwareproperties/qt/SoftwarePropertiesQt.py
|
||||||
|
sed -i '/tab_switched(self)/i \ \ \ \ self.userinterface.tabWidget.removeTab(4)' softwareproperties/qt/SoftwarePropertiesQt.py
|
||||||
|
sed -i '/tab_switched(self)/,/self.button_revert.setVisible(True)/{//!d}' softwareproperties/qt/SoftwarePropertiesQt.py
|
||||||
|
|
||||||
sed '/UbuntuDrivers/d' -i softwareproperties/gtk/SoftwarePropertiesGtk.py
|
sed '/UbuntuDrivers/d' -i softwareproperties/gtk/SoftwarePropertiesGtk.py
|
||||||
sed '/vbox_drivers/,+1 s/True/False/' -i data/gtkbuilder/main.ui
|
sed '/vbox_drivers/,+1 s/True/False/' -i data/gtkbuilder/main.ui
|
||||||
|
|
@ -62,6 +74,9 @@ replace cdimage@ubuntu.com trisquel-devel@listas.trisquel.info .
|
||||||
replace TrisquelDistribution UbuntuDistribution .
|
replace TrisquelDistribution UbuntuDistribution .
|
||||||
sed '/NoDisplay/d; s/Trisquel/Ubuntu/' -i data/software-properties-gtk.desktop.in
|
sed '/NoDisplay/d; s/Trisquel/Ubuntu/' -i data/software-properties-gtk.desktop.in
|
||||||
|
|
||||||
|
#Replace went too far
|
||||||
|
sed -i 's|TrisquelDistroInfo|UbuntuDistroInfo|' softwareproperties/gtk/utils.py
|
||||||
|
|
||||||
sed '/ubuntu-drivers-common/d' -i debian/control
|
sed '/ubuntu-drivers-common/d' -i debian/control
|
||||||
sed '/software-properties-drivers/d' -i debian/software-properties-gtk.install setup.cfg
|
sed '/software-properties-drivers/d' -i debian/software-properties-gtk.install setup.cfg
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue