Closed
Bug 636769
Opened 15 years ago
Closed 15 years ago
Support specifying add-ons by URL in addition to local path
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: davehunt, Assigned: k0scist)
References
Details
(Whiteboard: [mozmill-2.0+])
Attachments
(1 file)
|
1.69 KB,
patch
|
harth
:
review+
|
Details | Diff | Splinter Review |
Currently add-ons must be specified by local path, however it would be really useful to be able to specify a URL and have Mozmill take care of downloading the add-on for installation.
It can base on bug 636772 which we are planning to fix soon for our own purpose in the automation scripts. Should be a simple port afterward.
Depends on: 636772
Whiteboard: [mozmill-next?][mozmill-2.0?] → [mozmill-next?][mozmill-2.0+]
| Assignee | ||
Comment 2•15 years ago
|
||
Are we talking about the URL of the AMO page (e.g.):
https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/
or the URL of the installation?:
https://addons.mozilla.org/firefox/downloads/latest/1865/addon-1865-latest.xpi
We can't be that magic to determine the target XPI file, so yes it means the URL of the XPI itself.
| Assignee | ||
Comment 4•15 years ago
|
||
Sounds good; we can screen-scrape but since we're stuck with python 2.4 and don't want to add external dependencies I don't really want to do this as our one case of parsing XML in mozmill (reading install.rdf) is horribly broken. I'll just assume the xpi URL, that is fair enough.
| Assignee | ||
Updated•15 years ago
|
Assignee: nobody → jhammel
| Assignee | ||
Updated•15 years ago
|
Assignee: jhammel → nobody
Component: Mozmill → Mozmill Utilities
QA Contact: mozmill → mozmill-utilities
| Assignee | ||
Updated•15 years ago
|
Assignee: nobody → jhammel
| Assignee | ||
Comment 5•15 years ago
|
||
Works, ABICT. I have mixed emotions about it though. While it is very nice to be able to specify a URL, it will result in downloading the addon each time which is a serious lag. But its 2.0+ so I guess I cant argue with that
Attachment #521672 -
Flags: review?(fayearthur+bugs)
Jeff, remember that it has to be a list. Users can specify multiple add-ons via the command line.
| Assignee | ||
Comment 7•15 years ago
|
||
Please look at the Profile __init__ method:
# handle addon installation
self.addons_installed = []
self.addons = addons or []
for addon in self.addons:
self.install_addon(addon)
The list is a non-issue. We should probably move the magical putting addons in a directory up at this level as the purpose of install_addon should, mostly, install a single addon. Since a URL cannot be a directory of addons this should work fine.
Comment 8•15 years ago
|
||
Comment on attachment 521672 [details] [diff] [review]
Support specifying add-ons by URL in addition to local path
looks good, works great. A couple notes:
>+ for prefix in ('http://', 'https://', 'ftp://'):
>+ if path.startswith(prefix):
I'd hate to do a for loop when all we need is an if statement. Why not use urlparse.
We might as well support file:// urls, or any type of valid url really.
We should think about providing some feedback like "downloading baaddon.xpi" because there is a serious pause as it downloads and the user might not know what's going on.
Attachment #521672 -
Flags: review?(fayearthur+bugs) → review+
| Assignee | ||
Comment 9•15 years ago
|
||
I was thinking of just doing `if '://' in path:` and hope its something that urllib2 supports. That would be shorter. I specifically picked these three as I know that urllib2 supports them. For instance..... gopher://host.net/.... ? ssh:// ? Probably not.
Comment 10•15 years ago
|
||
(In reply to comment #9)
> I was thinking of just doing `if '://' in path:` and hope its something that
> urllib2 supports. That would be shorter. I specifically picked these three as
> I know that urllib2 supports them. For instance..... gopher://host.net/.... ?
> ssh:// ? Probably not.
yeah, that works.
| Assignee | ||
Comment 11•15 years ago
|
||
pushed to master with the `if '://' ...` check: https://github.com/mozautomation/mozmill/commit/bbd071ea8c16dee812d819d8c808c6be3bbcba0e
but if we lose any of our gopher users, i won't be happy ;)
| Assignee | ||
Updated•15 years ago
|
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Looks good. Thanks for the patch!
Status: RESOLVED → VERIFIED
Whiteboard: [mozmill-next?][mozmill-2.0+] → [mozmill-2.0+]
You need to log in
before you can comment on or make changes to this bug.
Description
•