Closed Bug 883645 Opened 11 years ago Closed 3 years ago

Use relative path in panacea.dat

Categories

(Thunderbird :: OS Integration, enhancement)

17 Branch
x86_64
Windows 7
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: Ulf.Zibis, Unassigned)

References

(Blocks 2 open bugs)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release)
Build ID: 20130511120803




Expected results:

Use relative paths in panacea.dat and other settings e.g. extensions.ini, prefs.js to avoid e.g. bug 878764, simplify profile move [1], especially between different OSes [2], and profile sharing [3].

[1]kb.mozillazine.org/Moving_your_profile_folder_-_Thunderbird#Create_a_new_profile_and_copy_the_old_one_over_it
[2] kb.mozillazine.org/Move_to_a_new_PC
[3] kb.mozillazine.org/Sharing_a_profile_between_Windows_and_Linux
Blocks: 878764
Severity: normal → enhancement
Removing "other than panacea.dat" from bug summary, in order to focus on panacea.dat.
- Bug 344671 was already closed as WONTFIX.
- mail.server.server#.directory-rel and mail.root.*-rel is already used,
  and is "relative path from profile directory". 
- Following case is never "problem due to absolute path".
  - Profile directory is copied to directory of different depth.
    (/L1x/L2x/L3x/ProfNameX is copied to /L1y/L2y/L3y/L4y/ProfNameY)
    Mail directory is located at outside of Profile directory.
    (Absolute path = /ABS1/ABS2/Mail/ServerName, E:\ABS1\ABS2\Mail\ServerName)
    (Relative path = [ProfD]../ ... /../ABS1/ABS2/Mail/ServerName)
    => mail.server.server#.directory-rel in prefs.js at copied profile,
       which is never altered nor modified nor changed by profile copy,
       doesn't point mail directory which is located outside of profile,
       which was pointed as expected in original profile.
    This can be rather called "problem due to relative path".
Summary: Use relative paths in panacea.dat and other settings → Use relative paths in panacea.dat
To bug opener: Please don't mix following different issues in a bug at B.M.O.
a. Issue caused by absolute path in panacea.dat.
b. Issue when "copy profile to different depth" && "mail directory at outside of profile",
   due to mail.server.server#.directory-rel is relative path.
   Note: Both conditions are needed.
   - If profile directory is copied to same depth by user,
     "mail directory at outside of profile" won't cause problem,
     because relative path of the mail directory is not changed by profile copy.
   - If mail directory is located under profile directory,
     no problem occurs by profile directory copy to any different depth,
     because relative path of the mail directory is not changed by profile copy.
Note:
"copy profile directory to different depth(one level deeper)" occurs, if user copies "Tb's profile directory located at Tb's standard profile location on Win-XP" to "Tb's standard profile location on Vista/Wn7/Win8", because Tb's standard profile location on Vista/Win7/Win8 is one level deeper than Win-XP.
Thanks for your analysis, I agree 100 %.
If this "enhancement" blocks other bugs, shouldn't this be a real bug too?
IIUC, panacea.dat is a kind of cache, so why not place it in TB's cache location, same for extensions.ini?
(In reply to Ulf Zibis from comment #4)
> IIUC, panacea.dat is a kind of cache, so why not place it in TB's cache location, same for extensions.ini?
Why any of "cached data for a software" should be saved in "sinlgle/only-one-file in an OS file system" merely because that the data is "a cached data for the software"?
(In reply to Ulf Zibis from comment #3)
> If this "enhancement" blocks other bugs, shouldn't this be a real bug too?
As seen in "Bug 344671 was already closed as WONTFIX", this kind of issue is never problem of actual "program code is different from proper design, then wrong code".
If "absolute path in panacea.dat" is developr's choice, we should respect it.
We can merely request developers to do design change for our happiness in such case, unless we provide actually correct/valid/proper/bug-free/acceptable-for-any-one code.
Summary: Use relative paths in panacea.dat → Use relative path in panacea.dat
I think similar code to mail.server.server#.directory-rel and mail.server.server#.directory is better.
(1) New key for relative path(call panacea-rel). call current absolute one "panacea-abs".
(2) Upon save to folder cache.
    create both panacea-rel for recent Tb, and panacea-abs for old Tb.
    (backword compatibility)
(3) Upon read/use folder cache data.
    Use panacea-rel always.
    If panacea-rel is not availale and panacea-abs is available, use panacea-abs.
    (upward compatibility).
See Also: → 952757
(In reply to WADA from comment #5)
> Why any of "cached data for a software" should be saved in
> "sinlgle/only-one-file in an OS file system" merely because that the data is
> "a cached data for the software"?

See: Bug 952757
(In reply to Ulf Zibis from comment #8)
> See: Bug 952757
I'm asking you about reason why SHOULD or MUST, instead of BETTER or ADEQUATE or APPROPRIATE.
(In reply to WADA from comment #9)
> I'm asking you about reason why SHOULD or MUST, instead of BETTER or
> ADEQUATE or APPROPRIATE.

Hm, I was not using such words in my comment 4, so I'm confused ?-(
Question of "why not place it in TB's cache location" to me implies that you think "should be placed ...", isn't it? If not, why such question is thrown to me? (implies "I don't like such question to me" or "such question to me is useless" :-) )
(In reply to WADA from comment #11)
> Question of "why not place it in TB's cache location" to me implies that you
> think "should be placed ...", isn't it?
I think, it would be better to place it in TB's cache location, if there is no reason against it, but maybe there is one, which I was questioning not personally to you, sorry, but to anyone who knows it, preferable the developers who care about the code.
What is your definition of "TB's cache location"? You perhaps don't know existence of bug like "change file name of panacea.dat to understandable FolderCache.dat" :-)
IIRC, bug like "convert from MorkDB to SQLite DB" is also exists.
Blocks: 196119
(In reply to WADA from comment #13)
> What is your definition of "TB's cache location"?
Linux:   home/user/.cache/thunderbird/Profiles/xxxxxxxx.default
Windows: Users\user\AppData\Local\Thunderbird\Profiles\xxxxxxxx.default
See: Bug 952757

> You perhaps don't know existence of bug like "change file name
> of panacea.dat to understandable FolderCache.dat" :-)
Bug 108201

> IIRC, bug like "convert from MorkDB to SQLite DB" is also exists.
Bug 418551
> Linux:   home/user/.cache/thunderbird/Profiles/xxxxxxxx.default
> Windows: Users\user\AppData\Local\Thunderbird\Profiles\xxxxxxxx.default
> See: Bug 952757
You looks requested "one issue per a bug" in that bug too :-)

"All in single profile directory" is designed during "single PC only, single user only" era such as MS/DOS, Win 3.1. In "Roaming profile" era, isolation of "resources which should be held in profile" and "resources which should be held only locally". This is also needed to reduce "Profile directory size" in case of that profile directory is held at file share server and the directory is used at multiple locations alternatively.

I also think that there is no need to hold "absolute file path of local file" part of "relation between mbox name and absolute file path of local file" in profile directory.
However, I believe "relation between mbox name and file name used for the mbox" should be held in profile directory, especially when "relative path in panacea.dat" will be achieved.
If not, problem like bug 701688 easily occurs by profile copy, profile sharing, profile mounting on different drive letter etc.

By the way, "IMAP Offline-Store file" is also "resource should be held only locally" for some users. So, "IMAP Offline-Store file in Tb's local cache directory" is already requested.
(In reply to WADA from comment #15)
> > Linux:   home/user/.cache/thunderbird/Profiles/xxxxxxxx.default
> > Windows: Users\user\AppData\Local\Thunderbird\Profiles\xxxxxxxx.default
> > See: Bug 952757
> You looks requested "one issue per a bug" in that bug too :-)
You look my comment there ;-)

> In "Roaming profile" era, isolation
> of "resources which should be held in profile" and "resources which should
> be held only locally". This is also needed to reduce "Profile directory
> size" in case of that profile directory is held at file share server and the
> directory is used at multiple locations alternatively.

Applause !!!
... and if it is a regular target of backup to save backup footprint.

> However, I believe "relation between mbox name and file name used for the
> mbox" should be held in profile directory, especially when "relative path in
> panacea.dat" will be achieved.
I only see 2 cases were those can be different:
(1) Mbox name contains characters, which are invalid for the used file system. This small info could be easily saved to *.msf files (this would also prevent from misinterpretation of file names e.g "TOM&APY-sen" as "TOMösen" :-D ).
(2) TB misses to find e.g. %AbsolutePath%\ImapMail\server.net\Inbox(.msf), so creates Inbox-1(.msf). Instead, TB could rename existing old Inbox.msf to e.g. Inbox-old1.msf. BTW: This problem would rarely occur with relative paths.
Are there more cases?

> If not, problem like bug 701688 easily occurs by profile copy, profile
> sharing, profile mounting on different drive letter etc.
Isn't it contrary? See (2) above.

> By the way, "IMAP Offline-Store file" is also "resource should be held only
> locally" for some users. So, "IMAP Offline-Store file in Tb's local cache
> directory" is already requested.
+1, bug 517425, but:
- Attention on bug 543963, bug 667950, bug 760856 and more ???
- It should be configurable for cases where the connection to the IMAP server is more expensive than to the roaming profile or a "in-the-middle-cache" is needed.
(In reply to Ulf Zibis from comment #16)
> > By the way, "IMAP Offline-Store file" is also "resource should be held only
> > locally" for some users. So, "IMAP Offline-Store file in Tb's local cache
> > directory" is already requested.
> +1, bug 517425, but:
> - Attention on bug 543963, bug 667950, bug 760856 and more ???
> - It should be configurable for cases where the connection to the IMAP
> server is more expensive than to the roaming profile or a
> "in-the-middle-cache" is needed.
One of biggest problem in such issue is;
  Such users usually shout "SHOULD/MUST be saved at location where he want by default",
  as you usually does do in your bug reports,
  even though any mail directory location can already be requested via "Local Folders:"
  of "Server Settings".
  For such users, "default which is different from his want" is always "wrong".
Blocks: 888371
See Also: → 881966

This issue will be obsoleted by Bug 418551 - Convert panacea.dat from mork to another database format.
Any related problems that are likely to affect that implementation should be posted there.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.