mozilla / mozdownload

Easy to use download tool and API for different types of Firefox and Thunderbird builds
http://pypi.python.org/pypi/mozdownload
Other
70 stars 77 forks source link

Download of latest locale can fail because we check latest-mozilla-central and not latest-mozilla-central-l10n #340

Open whimboo opened 9 years ago

whimboo commented 9 years ago

I have seen today that for other locales than en-US we do not correctly check the l10n folder but the general one which only contains en-US builds:

https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central-l10n/

As result a download of a locale will fail if it is not present yet in the build folder from today. This can best be tested when new Nightly builds of Firefox have been produced.

$ mozdownload -t daily --locale ru --platform mac INFO | Retrieving the build status file from https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ INFO | Retrieving list of builds from https://archive.mozilla.org/pub/firefox/nightly/2015/11/ Traceback (most recent call last): File "/home/henrik/.virtualenvs/mozdownload/bin/mozdownload", line 9, in load_entry_point('mozdownload==1.19', 'console_scripts', 'mozdownload')() File "/mozilla/code/mozdownload/mozdownload/cli.py", line 167, in cli build = factory.FactoryScraper(scraper_type, _kwargs) File "/mozilla/code/mozdownload/mozdownload/factory.py", line 118, in init scraper_types[scraper_type].init(self, _kwargs) File "/mozilla/code/mozdownload/mozdownload/scraper.py", line 365, in init Scraper.init(self, _args, *_kwargs) File "/mozilla/code/mozdownload/mozdownload/scraper.py", line 123, in init self.get_build_info() File "/mozilla/code/mozdownload/mozdownload/scraper.py", line 396, in get_build_info self.date, self.build_index) File "/mozilla/code/mozdownload/mozdownload/scraper.py", line 481, in get_build_info_for_date raise errors.NotFoundError(message, url) mozdownload.errors.NotFoundError: Folder for builds on 2015-11-02-03-02-41 has not been found: https://archive.mozilla.org/pub/firefox/nightly/2015/11/

whimboo commented 9 years ago

Hm, turns out that the https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central-l10n/ folder does not have a status file we could use to check for the latest date. Maybe we have to change our code to simply download the files from that URL under those circumstances. It should not be done by default given that the original folder contains more than the binaries.