Commit Graph

14 Commits

Author SHA1 Message Date
Gregory Szorc
5423976a8b Bug 1455143 - Refactor checksumming to occur after upload.py; r=ted
checksums.py is now run after upload.py, as part of the "upload" make
target.

As part of the refactor, checksums.py now takes as arguments a list of
directories containing files to checksum. It will recursively checksum
all files in listed directories.

This means we no longer have to pass an explicit list of files into
checksums.py. Instead, we can pass the artifact directory and
automatically checksum everything within. This will allow us to
generate files directly into the artifact directory instead of
having to run upload.py to copy files there.

MozReview-Commit-ID: 6ntnXU2Pp0E

--HG--
extra : rebase_source : 7e019b366f14b3692ec702ff331a1e0306dc3805
2018-04-18 16:24:03 -07:00
Gregory Szorc
137e7d1403 Bug 1455143 - Use .write() instead of print >>; r=ted
.write() is the preferred mechanism to write to a file object.

MozReview-Commit-ID: 1uhNeFayoxV

--HG--
extra : rebase_source : 5244e5548cefb8ebf98cb2415ab139e96e967433
2018-04-18 15:39:26 -07:00
Gregory Szorc
8faaa397e7 Bug 1455143 - Use a reasonable buffer size for reading files; r=ted
Reading in 1kb chunks in 2018 is insane.

MozReview-Commit-ID: 7wJv6fTAOh7

--HG--
extra : rebase_source : 9553fdd1b50c6da21fb2e15f63b0accc62bb01e8
2018-04-18 15:38:04 -07:00
Gregory Szorc
ed4699f57b Bug 1455143 - Remove code for failing to obtain a hash; r=ted
digest_file() should always return something.

MozReview-Commit-ID: 6PpSUnxhCcL

--HG--
extra : rebase_source : 932a7e296a6bf32b03dc8b1ac5360d3287e44d38
2018-04-18 15:36:55 -07:00
Gregory Szorc
29eac5d14d Bug 1455143 - Handle directory inputs earlier; r=ted
This makes the logic in process_files() simpler.

MozReview-Commit-ID: KdphRJZLinx

--HG--
extra : rebase_source : 14a89fc9ba85d1dd4c2d2d18d0383552bb2d8e69
2018-04-18 15:35:57 -07:00
Gregory Szorc
10322471bc Bug 1455143 - Use a global logger instance; r=ted
MozReview-Commit-ID: 1RyLZBMx6mH

--HG--
extra : rebase_source : d83c756488c698680965badc953c9b3e3efb5403
2018-04-18 15:33:31 -07:00
Gregory Szorc
fcd36e363c Bug 1455143 - Remove hash name validation; r=ted
Garbage in garbage out. Let's make this code simpler.

MozReview-Commit-ID: Gv0ZcMacyOX

--HG--
extra : rebase_source : 2e8131bc1926b6ad7f186d0778fe4b339c6ba834
2018-04-18 15:31:59 -07:00
Gregory Szorc
4f096bd777 Bug 1455143 - Make hashlib required; r=ted
A missing or unimportable hashlib is only possible on very old or very
busted Pythons. Remove code for conditionally handling a failure to
import it.

MozReview-Commit-ID: EXVlmttcwUa

--HG--
extra : rebase_source : 30177c86dc5e92dd3234177f383681f9aa70682e
2018-04-18 15:31:11 -07:00
Andrew Halberstadt
f354075c7a Bug 1434430 - [flake8] Fix blank 'except' statements r=rwood
This is a new issue that gets linted with flake8 3.5.0. Basically you should
never use a blank except: statement.

This will catch all exceptions, including KeyboardInterrupt and SystemExit
(which is likely not intended). If a catch all is needed, use
`except: Exception`.  If you *really* mean to also catch KeyboardInterrupt et
al, use `except: BaseException`.

Of course, being specific is often better than a catch all.

MozReview-Commit-ID: FKx80MLO4RN

--HG--
extra : rebase_source : 7c74a7d0d81f2c984b47aff3a0ee3448b791177b
2018-01-31 14:32:08 -05:00
Sylvestre Ledru
358507fde2 Bug 1406650 - Make build/*.py and a few other files flake8 compatible and add them to the list of files to check r=chmanchester
MozReview-Commit-ID: icmFJtbWdN

--HG--
extra : rebase_source : 7b2ef783822bcad7f955bad8cbd6cea6df588f92
2017-10-07 16:45:22 +02:00
Gervase Markham
82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Rail Aliiev
13b9d47ab9 bug 715586: checksums.py should generate sha1 and md5 checksums. r=catlee,ted 2012-01-16 09:30:59 -05:00
Justin Wood
948f5000b2 Bug 633423 - Checksum generation (build/checksums.py) needs to open files in binary mode for correct checksums, r=khuey f=nthomas a=beltzner 2011-02-11 12:06:30 -05:00
John Ford
ff984b6de9 Bug 578393 - Create a file with checksums for all builds that we upload, r=ted a=gavin
--HG--
extra : rebase_source : 06c2e575486bebbc383e7d5bf72c979f84883797
2010-10-15 16:09:53 -07:00