Merge lp:~seb128/thunderbird/default-profile-fix into lp:~mozillateam/thunderbird/thunderbird.groovy

Proposed by Sebastien Bacher
Status: Needs review
Proposed branch: lp:~seb128/thunderbird/default-profile-fix
Merge into: lp:~mozillateam/thunderbird/thunderbird.groovy
Diff against target: 12 lines (+1/-1)
1 file modified
debian/apport/source_thunderbird.py.in (+1/-1)
To merge this branch: bzr merge lp:~seb128/thunderbird/default-profile-fix
Reviewer Review Type Date Requested Status
Olivier Tilloy (community) Needs Fixing
Review via email: mp+392985@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Olivier Tilloy (osomon) wrote :

Thanks for the patch Séb.

This won't work in all cases though: for newly created profiles it will, but for profiles that were created before version 67 (see https://support.mozilla.org/gl/questions/1264072), they will still use the old naming convention, and therefore the presence and value of a "Default" key needs to be checked.

For reference this is what my profiles.ini looks like (where the profile being used by default is "fxbpdn4q.default"):

osomon@bribon:~$ cat .thunderbird/profiles.ini
[Install109C8E86A96C2F86]
Default=wa14rqag.default-beta
Locked=1

[Profile1]
Name=default-beta
IsRelative=1
Path=wa14rqag.default-beta

[Profile0]
Name=default
IsRelative=1
Path=fxbpdn4q.default
Default=1

[General]
StartWithLastProfile=1
Version=2

[InstallABD9122D5734A109]
Default=0t0vcddd.default-release
Locked=1

[InstallFDC34C9F024745EB]
Default=fxbpdn4q.default

[Profile2]
Name=default-release
IsRelative=1
Path=0t0vcddd.default-release

review: Needs Fixing
Revision history for this message
Sebastien Bacher (seb128) wrote :

The Default key isn't enough, on a profile created by 78 there is a profile with Default=1 set which isn't the one used, default-release is the active one

Revision history for this message
Olivier Tilloy (osomon) wrote :

Yes, so we need a different code path for thunderbird >= 78, and for thunderbird < 78.
I'll take a stab at it.

Revision history for this message
Olivier Tilloy (osomon) wrote :

I was wrong, this kind of profiles.ini with various profiles by default is already present with thunderbird 68.x.

Unmerged revisions

576. By Sebastien Bacher

source_thunderbird.py: correctly detect the default profile

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/apport/source_thunderbird.py.in'
2--- debian/apport/source_thunderbird.py.in 2019-08-23 13:17:13 +0000
3+++ debian/apport/source_thunderbird.py.in 2020-10-28 19:41:41 +0000
4@@ -1247,7 +1247,7 @@
5 if not parser.has_option(section, "Path"): continue
6 path = parser.get(section, "Path")
7 name = parser.get(section, "Name")
8- is_default = True if parser.has_option(section, "Default") and parser.getint(section, "Default") == 1 else False
9+ is_default = True if 'default-release' in name else False
10 self.profiles.append(Profile(section, name, os.path.join(profile_folder, path), is_default, appini))
11
12 # No "Default" entry when there is one profile

Subscribers

People subscribed via source and target branches

to all changes: