Last Comment Bug 890037 - "thunderbird -version" outputs an extra space
: "thunderbird -version" outputs an extra space
Status: RESOLVED FIXED
:
Product: Toolkit
Classification: Components
Component: Startup and Profile System (show other bugs)
: Trunk
: x86 All
: -- trivial (vote)
: mozilla25
Assigned To: Suyash Agarwal (:sshagarwal)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-03 13:42 PDT by Stefan Persson
Modified: 2013-07-19 10:56 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (923 bytes, patch)
2013-07-16 11:45 PDT, Suyash Agarwal (:sshagarwal)
benjamin: review+
acelists: feedback+
standard8: feedback+
Details | Diff | Review

Description Stefan Persson 2013-07-03 13:42:44 PDT
User Agent: Mozilla/5.0 (X11; Linux i686; rv:20.0) Gecko/20100101 Firefox/20.0 SeaMonkey/2.17 (Beta/Release)
Build ID: 20130403195639

Steps to reproduce:

wget http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2013-07-03-03-13-28-comm-central/thunderbird-25.0a1.en-US.linux-i686.tar.bz2
tar xvjf thunderbird-25.0a1.en-US.linux-i686.tar.bz2
cd thunderbird
./thunderbird -version


Actual results:

Thunderbird outputs " Thunderbird 25.0a1" with a space at the beginning.


Expected results:

Thunderbird should output "Thunderbird 25.0a1" without a space at the beginning. Bug also present in Thunderbird 17.0.7. Not a big issue, but the extra space looks a bit odd.
Comment 1 Wayne Mery (:wsmwk, NI for questions) 2013-07-04 08:55:47 PDT
confirmed.
doesn't happen for firefox or seamonkey.
Thanks for the bug report
Comment 2 :aceman 2013-07-16 05:46:22 PDT
For some reason TB nor Firefox print anything for me on Win XP.
Wayne, what do they print for you?

I found this spot in the code that could be the culprit:
http://mxr.mozilla.org/comm-central/source/mozilla/toolkit/xre/nsAppRunner.cpp#1399

I suspect our gAppData->vendor is empty because we have no definition for it in http://mxr.mozilla.org/comm-central/source/mail/app/application.ini .

If that is intentional and we do not want to add Vendor=Mozilla then we may need to fix the format string in the toolkit file.

Can anybody first test out the theory?
Comment 3 Wayne Mery (:wsmwk, NI for questions) 2013-07-16 05:52:26 PDT
Output on windows has been broken for years and I forget the bug# but iirc both bsmedberg and I are cc on it.  Workaround is to pipe output to "more" 

Thunderbird.exe | more
Comment 4 Wayne Mery (:wsmwk, NI for questions) 2013-07-16 06:39:09 PDT
(In reply to Wayne Mery (:wsmwk) from comment #3)
> Output on windows has been broken for years and I forget the bug# but iirc
> both bsmedberg and I are cc on it.  Workaround is to pipe output to "more" 
> 
> Thunderbird.exe | more

bug 355889, windows-only.  According to bsmedberg related to "Windows virtual consoles" but whether the issue is fixable in mozilla is unstated.  (bug 26761 might be instructive)
Comment 5 Suyash Agarwal (:sshagarwal) 2013-07-16 11:45:25 PDT
Created attachment 776575 [details] [diff] [review]
Patch

Thanks for mentioning the code spot.
Possible fix.
Comment 6 :aceman 2013-07-16 11:54:59 PDT
Comment on attachment 776575 [details] [diff] [review]
Patch

Yes, this is what I had in mind.

I have also tested that adding Vendor=<something> to application.ini makes -version output the vendor name too and then the space is useful (formats finely also without the patch).

So this is now up to standard8 to decide which way we want to go.
But I would propose to land this patch in toolkit too even if we add Vendor to Thunderbird.
Comment 7 Mark Banner (:standard8) 2013-07-16 14:41:02 PDT
Comment on attachment 776575 [details] [diff] [review]
Patch

This is the right way to go. There's various significant issues that would make it difficult for us to move to a world where we specified the vendor which are covered in a different bug somewhere.
Comment 8 :aceman 2013-07-16 14:52:16 PDT
OK, let's propose it to the toolkit.
Comment 9 Ryan VanderMeulen [:RyanVM] 2013-07-18 13:31:37 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/bdf71cb870ac
Comment 10 Ryan VanderMeulen [:RyanVM] 2013-07-19 10:56:50 PDT
https://hg.mozilla.org/mozilla-central/rev/bdf71cb870ac

Note You need to log in before you can comment on or make changes to this bug.