Merge lp:~bregma/compiz/lp-1423566 into lp:compiz/0.9.12

Proposed by Stephen M. Webb
Status: Merged
Approved by: Christopher Townsend
Approved revision: 3928
Merged at revision: 3948
Proposed branch: lp:~bregma/compiz/lp-1423566
Merge into: lp:compiz/0.9.12
Diff against target: 242 lines (+0/-209)
6 files modified
debian/00_remove_unityshell_in_gnome_session.py (+0/-47)
debian/00_remove_unityshell_in_mate_session.py (+0/-47)
debian/compiz-gnome.migrations (+0/-1)
debian/compiz-mate.migrations (+0/-1)
postinst/migration-scripts/02_migrate_to_gsettings.py (+0/-69)
postinst/migration-scripts/03_migrate_profile_independent.py (+0/-44)
To merge this branch: bzr merge lp:~bregma/compiz/lp-1423566
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Compiz Maintainers Pending
Review via email: mp+250340@code.launchpad.net

Commit message

removed redundant 12.04 migration scripts

Description of the change

Removes the migration scripts added for the 12.04 LTS release of Compiz and duplicated for the recent Maté support.

These scripts are no longer required since migration from pre-12.04 would require upgrading to 12.04 first, and installs after 12.04 would not need migrating.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~bregma/compiz/lp-1423566 updated
3928. By Stephen M. Webb

removed gsettings migration scripts

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'debian/00_remove_unityshell_in_gnome_session.py'
2--- debian/00_remove_unityshell_in_gnome_session.py 2012-10-17 11:25:46 +0000
3+++ debian/00_remove_unityshell_in_gnome_session.py 1970-01-01 00:00:00 +0000
4@@ -1,47 +0,0 @@
5-#!/usr/bin/python
6-# -*- coding: utf-8 -*-
7-# Copyright (C) 2012 Canonical
8-#
9-# Authors:
10-# Didier Roche <didrocks@ubuntu.com>
11-#
12-# This program is free software; you can redistribute it and/or modify it under
13-# the terms of the GNU General Public License as published by the Free Software
14-# Foundation; version 3.
15-#
16-# This program is distributed in the hope that it will be useful, but WITHOUTa
17-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19-# details.
20-#
21-# You should have received a copy of the GNU General Public License along with
22-# this program; if not, write to the Free Software Foundation, Inc.,
23-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24-
25-from gi.repository import Gio
26-import os
27-
28-gsettings=Gio.Settings(schema="org.compiz.core", path="/org/compiz/profiles/Default/plugins/core/")
29-plugins_list = gsettings.get_strv("active-plugins")
30-
31-# Remove unityshell the default profile if present (case of new install and first session startup)
32-try:
33- plugins_list.remove('unityshell')
34-except ValueError:
35- pass
36-try:
37- plugins_list.remove('unitymtgrabhandles')
38-except ValueError:
39- pass
40-# gsettings doesn't work directly, the key is somewhat reverted. Work one level under then: dconf!
41-#gsettings.set_strv("active-plugins", plugins_list)
42-from subprocess import Popen, PIPE, STDOUT
43-p = Popen(['dconf', 'load', '/org/compiz/profiles/Default/plugins/core/'], stdout=PIPE, stdin=PIPE, stderr=STDOUT)
44-p.communicate(input="[/]\nactive-plugins=%s" % plugins_list)
45-
46-# remove the eventually existing local config file which can prevent the default profile to use gsettings for quantal users before this fix
47-try:
48- os.remove(os.path.join(os.path.expanduser('~'), '.config', 'compiz-1', 'compizconfig', 'config'))
49-except OSError:
50- pass
51-
52
53=== removed file 'debian/00_remove_unityshell_in_mate_session.py'
54--- debian/00_remove_unityshell_in_mate_session.py 2015-02-04 22:20:18 +0000
55+++ debian/00_remove_unityshell_in_mate_session.py 1970-01-01 00:00:00 +0000
56@@ -1,47 +0,0 @@
57-#!/usr/bin/python
58-# -*- coding: utf-8 -*-
59-# Copyright (C) 2012 Canonical
60-#
61-# Authors:
62-# Didier Roche <didrocks@ubuntu.com>
63-#
64-# This program is free software; you can redistribute it and/or modify it under
65-# the terms of the GNU General Public License as published by the Free Software
66-# Foundation; version 3.
67-#
68-# This program is distributed in the hope that it will be useful, but WITHOUTa
69-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
70-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
71-# details.
72-#
73-# You should have received a copy of the GNU General Public License along with
74-# this program; if not, write to the Free Software Foundation, Inc.,
75-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
76-
77-from gi.repository import Gio
78-import os
79-
80-gsettings=Gio.Settings(schema="org.compiz.core", path="/org/compiz/profiles/mate/plugins/core/")
81-plugins_list = gsettings.get_strv("active-plugins")
82-
83-# Remove unityshell the default profile if present (case of new install and first session startup)
84-try:
85- plugins_list.remove('unityshell')
86-except ValueError:
87- pass
88-try:
89- plugins_list.remove('unitymtgrabhandles')
90-except ValueError:
91- pass
92-# gsettings doesn't work directly, the key is somewhat reverted. Work one level under then: dconf!
93-#gsettings.set_strv("active-plugins", plugins_list)
94-from subprocess import Popen, PIPE, STDOUT
95-p = Popen(['dconf', 'load', '/org/compiz/profiles/mate/plugins/core/'], stdout=PIPE, stdin=PIPE, stderr=STDOUT)
96-p.communicate(input="[/]\nactive-plugins=%s" % plugins_list)
97-
98-# remove the eventually existing local config file which can prevent the default profile to use gsettings for quantal users before this fix
99-try:
100- os.remove(os.path.join(os.path.expanduser('~'), '.config', 'compiz-1', 'compizconfig', 'config'))
101-except OSError:
102- pass
103-
104
105=== modified file 'debian/compiz-gnome.migrations'
106--- debian/compiz-gnome.migrations 2014-12-08 20:58:07 +0000
107+++ debian/compiz-gnome.migrations 2015-03-13 18:09:41 +0000
108@@ -1,4 +1,3 @@
109-debian/00_remove_unityshell_in_gnome_session.py
110 debian/00_remove_decor_in_unity_session.py
111 debian/00_remove_scalefilter_in_unity_session.py
112 debian/00_remove_gnomecompat_in_unity_session.py
113
114=== removed file 'debian/compiz-mate.migrations'
115--- debian/compiz-mate.migrations 2015-02-04 22:20:18 +0000
116+++ debian/compiz-mate.migrations 1970-01-01 00:00:00 +0000
117@@ -1,1 +0,0 @@
118-debian/00_remove_unityshell_in_mate_session.py
119
120=== removed directory 'postinst/migration-scripts'
121=== removed file 'postinst/migration-scripts/02_migrate_to_gsettings.py'
122--- postinst/migration-scripts/02_migrate_to_gsettings.py 2012-07-23 10:56:23 +0000
123+++ postinst/migration-scripts/02_migrate_to_gsettings.py 1970-01-01 00:00:00 +0000
124@@ -1,69 +0,0 @@
125-#!/usr/bin/python
126-# -*- coding: utf-8 -*-
127-# Copyright (C) 2012 Canonical
128-#
129-# Authors:
130-# Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>
131-# Didier Roche <didrocks@ubuntu.com>
132-#
133-# This program is free software; you can redistribute it and/or modify it under
134-# the terms of the GNU General Public License as published by the Free Software
135-# Foundation; version 3.
136-#
137-# This program is distributed in the hope that it will be useful, but WITHOUTa
138-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
139-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
140-# details.
141-#
142-# You should have received a copy of the GNU General Public License along with
143-# this program; if not, write to the Free Software Foundation, Inc.,
144-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
145-
146-import gconf
147-import glib
148-import subprocess
149-import os.path
150-
151-# this should point to the directory where all the .convert files are stored
152-CONVERT_PATH = "/usr/lib/compiz/migration/"
153-
154-def migrate_file(convert_file):
155- subprocess.Popen(["gsettings-data-convert", "--file={}{}".format(CONVERT_PATH, convert_file)]).communicate()
156-
157-def migrate_gconf_to_gsettings():
158- client = gconf.client_get_default()
159-
160- if not client:
161- print "WARNING: no gconf client found. No transitionning will be done"
162- return
163-
164- # get current compiz profile to know if we need to switch or not
165- # as compiz is setting that as a default key schema each time you
166- # change the profile, the key isn't straightforward to get and set
167- # as compiz set a new schema instead of a value..
168- try:
169- current_profile_schema = client.get_schema("/apps/compizconfig-1/current_profile")
170- except (glib.GError, AttributeError):
171- print "No current profile set, no migration needed"
172- return
173-
174- if current_profile_schema:
175- current_profile_gconfvalue = current_profile_schema.get_default_value()
176- current_profile_str = current_profile_gconfvalue.get_string()
177- else:
178- print "No current profile set, no migration needed"
179- return
180-
181- # depending what current profile is set, migrate using specific .convert files
182- if current_profile_str == 'unity':
183- print "Will migrate 'unity' as the active profile"
184- migrate_file('compiz-profile-active-unity.convert')
185- migrate_file('compiz-profile-Default.convert')
186- else:
187- print "Will migrate 'Default' as the active profile"
188- migrate_file('compiz-profile-active-Default.convert')
189- if os.path.exists(CONVERT_PATH + 'compiz-profile-unity.convert'):
190- migrate_file('compiz-profile-unity.convert')
191-
192-if __name__ == '__main__':
193- migrate_gconf_to_gsettings ()
194
195=== removed file 'postinst/migration-scripts/03_migrate_profile_independent.py'
196--- postinst/migration-scripts/03_migrate_profile_independent.py 2012-09-11 08:12:14 +0000
197+++ postinst/migration-scripts/03_migrate_profile_independent.py 1970-01-01 00:00:00 +0000
198@@ -1,44 +0,0 @@
199-#!/usr/bin/python
200-# -*- coding: utf-8 -*-
201-# Copyright (C) 2012 Canonical
202-#
203-# Authors:
204-# Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>
205-# Didier Roche <didrocks@ubuntu.com>
206-#
207-# This program is free software; you can redistribute it and/or modify it under
208-# the terms of the GNU General Public License as published by the Free Software
209-# Foundation; version 3.
210-#
211-# This program is distributed in the hope that it will be useful, but WITHOUTa
212-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
213-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
214-# details.
215-#
216-# You should have received a copy of the GNU General Public License along with
217-# this program; if not, write to the Free Software Foundation, Inc.,
218-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
219-
220-import gconf
221-import glib
222-import subprocess
223-import os.path
224-
225-# this should point to the directory where all the .convert files are stored
226-CONVERT_PATH = "/usr/lib/compiz/migration/"
227-
228-def migrate_file(convert_file):
229- subprocess.Popen(["gsettings-data-convert", "--file={}{}".format(CONVERT_PATH, convert_file)]).communicate()
230-
231-def migrate_gconf_to_gsettings():
232- client = gconf.client_get_default()
233-
234- if not client:
235- print "WARNING: no gconf client found. No transitionning will be done"
236- sys.exit(1)
237-
238- print "Will migrate profile independent keys"
239- migrate_file('compiz-profile-independent-keys.convert')
240-
241-if __name__ == '__main__':
242- migrate_gconf_to_gsettings ()

Subscribers

People subscribed via source and target branches