Closed Bug 272046 Opened 20 years ago Closed 20 years ago

Pass OS to web service

Categories

(Toolkit :: Add-ons Manager, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Bugzilla-alanjstrBugs, Assigned: Bugzilla-alanjstrBugs)

References

Details

Attachments

(2 files, 3 obsolete files)

The Extension Manager should tell the web service what operating system it is
seeking updates for so that only compatible listings will be shown.  We probably
don't want to rely on user agent, though, since that is changable.
Attached patch Patch nsExtensionManager.js.in (obsolete) — Splinter Review
Attachment #167218 - Flags: review?(mconnor)
Attachment #167220 - Flags: review?(mconnor)
Depends on: 266161
Status: NEW → ASSIGNED
OS_ARCH is not sufficient. We need something that identifies the system more
uniquely than just OS: OS+processor might be sufficient for normal usage.
UMO wouldn't know what to do with processor.  We're really not that specific. 
I'll see what I can find.
Attachment #167218 - Flags: review?(mconnor) → review+
Attachment #167220 - Flags: review?(mconnor) → review+
Comment on attachment 167218 [details] [diff] [review]
Patch nsExtensionManager.js.in

Whoops. You're using $OS_ARCH as if this were a makefile or a shell script. To
get this variable into the XUL preprocessor you need to add it to the DEFINES
makefiles variable.
Attachment #167218 - Flags: review+ → review-
Additional patch needed for toolkit/mozapps/extensions/src/Makefile.in to define
the variable.
(In reply to comment #4)
> UMO wouldn't know what to do with processor.  We're really not that specific. 
> I'll see what I can find.

are there no binary extensions on it? linux/ppc can't run linux/x86 binaries...
> are there no binary extensions on it? linux/ppc can't run linux/x86 binaries...

Most seem to be cross platform.

(In reply to comment #8)
> Most seem to be cross platform.

Correct, but only because UMO and Firefox do not yet support OS info in
manifests... For example, Enigmail needs a separate Enigmime package which *is*
platform specific. Currently, you have to separately download it from their
homepage - if we do OS info right (including processor), binary packages like
Enigmime could go to UMO, too, and be presented as a dependency (or even merged
with the main extension).
Enigmail/Enigmime was the only one I could think of.  

bsmedberg -
Does nsExtensionManager.js.in pass if I take care of the Makefile.in?
You have to use the correct preprocessor syntax, either #expand or #filter
substitution
Attached patch nsExtensionManager.js.in patch (obsolete) — Splinter Review
Attachment #167218 - Attachment is obsolete: true
Attachment #169084 - Flags: review?(bsmedberg)
I'm confused about what I need in Makefile.in.  OS_ARCH is already defined, right?
Attached patch nsExtensionManager.js.in patch (obsolete) — Splinter Review
Ok, this uses
#expand const TARGET_OS  = "__OSARCH__";
where OS_ARCH is defined in config/config.mk
Attachment #169084 - Attachment is obsolete: true
Attachment #169139 - Flags: review?(bsmedberg)
Attachment #169139 - Flags: review?(bsmedberg) → review+
Attachment #167220 - Flags: superreview?(mconnor)
Attachment #169139 - Flags: superreview?(mconnor)
Attachment #169084 - Flags: review?(bsmedberg)
Alan, my review is sufficient for this to be committed, unless mconnor
specifically asked to review this himself.
Attachment #167220 - Flags: superreview?(mconnor)
Attachment #169139 - Flags: superreview?(mconnor)
Checked in by timeless.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
This turned all the firefox tinderboxes orange.
They couldn't keep the tree from going orange.  Reason tbd.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 169139 [details] [diff] [review]
nsExtensionManager.js.in patch

>+#expand const TARGET_OS                                 = "__OSARCH__";

It seems the substitution adds its own quotes, I got ---> = ""WINNT"";
when I built Firefox. Therefore, we should retry with the following:

>+#expand const TARGET_OS                                 = __OSARCH__;
Attaching a revised patch for nsExtensionManager.js.in. The other attachment
does not need changes.

Does this need review again to be checked in? If not, feel free to remove the
request.
Attachment #169139 - Attachment is obsolete: true
Attachment #169938 - Flags: review?(bsmedberg)
Comment on attachment 169938 [details] [diff] [review]
revised patch for nsExtensionManager.js.in

this should work, r=me
Attachment #169938 - Flags: review?(bsmedberg) → review+
Attachment #169938 - Flags: review+ → review?(mconnor)
Attachment #169938 - Flags: review?(mconnor) → review+
2nd and 5th patches checked in:
Checking in mozapps/extensions/src/nsExtensionManager.js.in;
/cvsroot/mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in,v  <--
 nsExtensionManager.js.in
new revision: 1.79; previous revision: 1.78
done
Checking in locales/en-US/chrome/mozapps/extensions/extensions.properties;
/cvsroot/mozilla/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties,v
 <--  extensions.properties
new revision: 1.6; previous revision: 1.5
done
Trees are green after landing
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
Severity: normal → enhancement
I'm going to reopen this so that we can pass the entire TARGET_XPCOM_ABI, which
is necessary for any extension that wants to ship binaries.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Don't mind me, jensb already did this.
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: