[Merge] ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master

2018-10-23 Thread Treviño
Marco Trevisan (Treviño) has proposed merging 
~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.

Requested reviews:
  Ubuntu Desktop (ubuntu-desktop)
Related bugs:
  Bug #1799205 in gnome-session (Ubuntu): "Ubuntu wayland sessions are not 
migrated to yaru"
  https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1799205

For more details, see:
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-session/+git/gnome-session/+merge/357620
-- 
Your team Ubuntu Desktop is requested to review the proposed merge of 
~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.
diff --git a/debian/changelog b/debian/changelog
index 3e9254f..d9a8a44 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+gnome-session (3.30.0-0ubuntu5) UNRELEASED; urgency=medium
+
+  * debian/ubuntu-settings-migrate-to-defaults.18.10.0.py:
+- renamed to ubuntu-settings-migrate-to-defaults.18.10.1.py
+  + Also run in ubuntu-wayland desktop session (LP: #1799205)
+
+ -- Marco Trevisan (Treviño)   Mon, 22 Oct 2018 13:30:47 +0200
+
 gnome-session (3.30.0-0ubuntu4) cosmic; urgency=medium
 
   * Make {ubuntu,gnome}-session Arch: all and remove qualification on xwayland
diff --git a/debian/ubuntu-settings-migrate-to-defaults.18.10.0.py b/debian/ubuntu-settings-migrate-to-defaults.18.10.1.py
index 7e4e663..d0dad7e 100755
--- a/debian/ubuntu-settings-migrate-to-defaults.18.10.0.py
+++ b/debian/ubuntu-settings-migrate-to-defaults.18.10.1.py
@@ -33,7 +33,7 @@ OLD_DEFAULTS = {
 }
 }
 
-if os.getenv('DESKTOP_SESSION') != 'ubuntu':
+if os.getenv('DESKTOP_SESSION') not in ['ubuntu', 'ubuntu-wayland']:
 sys.exit(0)
 
 any_changed = False
-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


[Merge] ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master

2018-10-23 Thread Didier Roche
The proposal to merge ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-session/+git/gnome-session/+merge/357620
-- 
Your team Ubuntu Desktop is subscribed to branch 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.

-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


Re: [Merge] ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master

2018-10-23 Thread Didier Roche
Thanks for looking and thinking about changing the script name! LGTM. 
-- 
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-session/+git/gnome-session/+merge/357620
Your team Ubuntu Desktop is requested to review the proposed merge of 
~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.

-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


[Merge] ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master

2018-10-23 Thread noreply
The proposal to merge ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master has been updated.

Status: Approved => Merged

For more details, see:
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-session/+git/gnome-session/+merge/357620
-- 
Your team Ubuntu Desktop is subscribed to branch 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.

-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


Re: [Merge] ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master

2018-10-23 Thread Didier Roche
Review: Approve


-- 
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-session/+git/gnome-session/+merge/357620
Your team Ubuntu Desktop is subscribed to branch 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.

-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


[Merge] ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master

2018-09-07 Thread Treviño
Marco Trevisan (Treviño) has proposed merging 
~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.

Requested reviews:
  Ubuntu Desktop (ubuntu-desktop)
Related bugs:
  Bug #1790532 in gnome-session (Ubuntu): 
"ubuntu-settings-migrate-to-defaults.18.10.0.py crashed with KeyError in 
__getitem__(): 'DESKTOP_SESSION'"
  https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1790532

For more details, see:
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-session/+git/gnome-session/+merge/354394
-- 
Your team Ubuntu Desktop is requested to review the proposed merge of 
~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.
diff --git a/debian/changelog b/debian/changelog
index 88be35d..e50bac0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+gnome-session (3.30.0-0ubuntu2) UNRELEASED; urgency=medium
+
+  * debian/ubuntu-settings-migrate-to-defaults.18.10.0.py:
+- Skip the settings migrations even if DESKTOP_SESSION is not
+  exported (LP: #1790532)
+  * debian
+
+ -- Marco Trevisan (Treviño)   Thu, 06 Sep 2018 15:11:53 +0200
+
 gnome-session (3.30.0-0ubuntu1) cosmic; urgency=medium
 
   * New upstream release:
diff --git a/debian/ubuntu-settings-migrate-to-defaults.18.10.0.py b/debian/ubuntu-settings-migrate-to-defaults.18.10.0.py
index 3fdf000..4220c83 100755
--- a/debian/ubuntu-settings-migrate-to-defaults.18.10.0.py
+++ b/debian/ubuntu-settings-migrate-to-defaults.18.10.0.py
@@ -32,7 +32,7 @@ OLD_DEFAULTS = {
 }
 }
 
-if os.environ['DESKTOP_SESSION'] != 'ubuntu':
+if 'DESKTOP_SESSION' not in os.environ or os.environ['DESKTOP_SESSION'] != 'ubuntu':
 sys.exit(0)
 
 any_changed = False
-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


[Merge] ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master

2018-09-07 Thread Didier Roche
The proposal to merge ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master has been updated.

Status: Needs review => Rejected

For more details, see:
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-session/+git/gnome-session/+merge/354394
-- 
Your team Ubuntu Desktop is subscribed to branch 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.

-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


Re: [Merge] ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master

2018-09-07 Thread Didier Roche
Review: Disapprove

Let's just use getenv which is better for this IMHO. I'm adding also a missing 
import sys.
-- 
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-session/+git/gnome-session/+merge/354394
Your team Ubuntu Desktop is subscribed to branch 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.

-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


[Merge] ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master

2018-09-03 Thread Treviño
The proposal to merge ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master has been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-session/+git/gnome-session/+merge/353340
-- 
Your team Ubuntu Desktop is requested to review the proposed merge of 
~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.

-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


Re: [Merge] ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master

2018-08-21 Thread Treviño
Review: Needs Fixing

Ah, as mentioned marking this as needs-fixing, since we need to decide what's 
the best approach for not making this run in NON-ubuntu sessions without having 
to make sessions-migration to trigger errors.

Another option would even been making sessions-migration XDG_CURRENT_DESKTOP 
aware and then supporting .desktop files as migration scripts, where we can 
quickly filter them using the various `OnlyShowIn`/`NotShowIn` to filter.
-- 
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-session/+git/gnome-session/+merge/353340
Your team Ubuntu Desktop is requested to review the proposed merge of 
~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.

-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


[Merge] ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master

2018-08-21 Thread Treviño
The proposal to merge ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master has been updated.

Description changed to:

Ensre we migrate Yaru relevant settings to defaults if the user values matches 
the old defaults.

However... This should actually only run when the ubuntu-session is running, or 
might change the settings to someone running the classic gnome-session but with 
the old ubuntu settings.

session migrations doesn't seem to help much on this, but there could be some 
strategies:

1) Return an error if the migration script runs in a session it doesn't care 
about
  1a) change session-migrations to support a specific exit-code as "skip this" 
without triggering any error (or gprinterr)
2) Add this script to an XDG_DATA_DIR that is only specific for the 
ubuntu-session (needs more changes and is ugly)

So... Let me know what you prefer.

For more details, see:
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-session/+git/gnome-session/+merge/353340
-- 
Your team Ubuntu Desktop is requested to review the proposed merge of 
~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.

-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


[Merge] ~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master

2018-08-20 Thread Treviño
Marco Trevisan (Treviño) has proposed merging 
~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.

Requested reviews:
  Ubuntu Desktop (ubuntu-desktop)

For more details, see:
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-session/+git/gnome-session/+merge/353340

Ensre we migrate Yaru relevant settings to defaults if the user values matches 
the old defaults.

However... This should actually only run when the ubuntu-session is running, or 
might change the settings to someone running the classic gnome-session but with 
the old ubuntu settings.

session migrations doesn't seem to help much on this, but there could be some 
strategies:

1) Return an error if the migration script runs in a session it doesn't care 
about
  1a) change session-migrations to support a specific exit-code as "skip this" 
without triggering any error
2) Add this script to an XDG_DATA_DIR that is only specific for the 
ubuntu-session (needs more changes and is ugly)

So... Let me know what you prefer.
-- 
Your team Ubuntu Desktop is requested to review the proposed merge of 
~3v1n0/ubuntu/+source/gnome-session:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-session:ubuntu/master.
diff --git a/debian/changelog b/debian/changelog
index 432151e..1ede2c2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+gnome-session (3.29.90-1ubuntu2) UNRELEASED; urgency=medium
+
+  * debian/ubuntu-settings-migrate-to-defaults.18.10.0.py:
+- Migrate users using old default ubuntu-settings to current ones
+
+ -- Marco Trevisan (Treviño)   Fri, 17 Aug 2018 19:16:26 +0200
+
 gnome-session (3.29.90-1ubuntu1) cosmic; urgency=medium
 
   * Merge with debian, remaining changes:
diff --git a/debian/ubuntu-session.migrations b/debian/ubuntu-session.migrations
index 9d16384..7073c2a 100644
--- a/debian/ubuntu-session.migrations
+++ b/debian/ubuntu-session.migrations
@@ -1 +1,2 @@
 debian/unity-gnome-shell-migration.*.py
+debian/ubuntu-settings-migrate-to-defaults.*.py
diff --git a/debian/ubuntu-settings-migrate-to-defaults.18.10.0.py b/debian/ubuntu-settings-migrate-to-defaults.18.10.0.py
new file mode 100755
index 000..62d7e96
--- /dev/null
+++ b/debian/ubuntu-settings-migrate-to-defaults.18.10.0.py
@@ -0,0 +1,54 @@
+#!/usr/bin/python3
+# -*- coding: utf-8 -*-
+# Copyright (C) 2018 Canonical
+#
+# Authors:
+#  Marco Trevisan 
+#
+# 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; version 3.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUTa
+# 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 Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+from gi.repository import Gio
+import os
+
+OLD_DEFAULTS = {
+"org.gnome.desktop.sound": {
+"theme-name": ["ubuntu"],
+},
+"org.gnome.desktop.interface": {
+"gtk-theme": ["Ambiance", "Radiance"],
+"icon-theme": ["ubuntu-mono-dark"],
+"cursor-theme": ["DMZ-White"],
+}
+}
+
+any_changed = False
+
+for schema in OLD_DEFAULTS.keys():
+settings = Gio.Settings.new(schema)
+old_settings = OLD_DEFAULTS[schema]
+
+for key in old_settings.keys():
+user_value = settings.get_user_value(key)
+
+if user_value and user_value.unpack() in old_settings[key]:
+print('{}.{} is using old ubuntu setting ("{}"), replacing it with '
+'the latest default ("{}")'.format(schema, key,
+user_value.unpack(),
+settings.get_default_value(key).unpack()))
+settings.reset(key)
+any_changed = True
+
+if any_changed:
+Gio.Settings.sync()
+
-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop