Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Issue 3930001: Update prebuilt.py to filter Packages database. (Closed)

Created:
10 years, 2 months ago by davidjames
Modified:
9 years, 4 months ago
Reviewers:
scottz
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

Update prebuilt.py to filter Packages database. This ensures that the Packages database doesn't contain private packages. This is necessary so that the database matches up with the actual files we upload. BUG=chromium-os:4843 TEST=Ran unit test Change-Id: I0355b4ab867a0d08396e45b04523a487951475f4 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=4f7f855

Patch Set 1 #

Total comments: 8

Patch Set 2 : Add more comments. #

Patch Set 3 : Nits #

Patch Set 4 : Update function to open and close the file #

Patch Set 5 : Typo fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -0 lines) Patch
M prebuilt.py View 1 2 3 4 3 chunks +62 lines, -0 lines 0 comments Download
M prebuilt_unittest.py View 1 2 3 1 chunk +36 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
davidjames
10 years, 2 months ago (2010-10-19 22:44:38 UTC) #1
scottz
http://codereview.chromium.org/3930001/diff/1/2 File prebuilt.py (right): http://codereview.chromium.org/3930001/diff/1/2#newcode216 prebuilt.py:216: cpv = line.replace("CPV: ", "").rstrip() .strip() no sense in ...
10 years, 2 months ago (2010-10-19 23:06:39 UTC) #2
davidjames
http://codereview.chromium.org/3930001/diff/1/2 File prebuilt.py (right): http://codereview.chromium.org/3930001/diff/1/2#newcode216 prebuilt.py:216: cpv = line.replace("CPV: ", "").rstrip() On 2010/10/19 23:06:40, scottz ...
10 years, 2 months ago (2010-10-20 00:38:40 UTC) #3
scottz
It is a matter of taste so I am LGTMing this but I highly recommend ...
10 years, 2 months ago (2010-10-20 19:19:39 UTC) #4
sosa
What's wrong with mocking out _builtins_.open() and returning a mock file? Is it so bad? ...
10 years, 2 months ago (2010-10-20 19:56:14 UTC) #5
scottz
10 years, 2 months ago (2010-10-20 21:48:24 UTC) #6
That is fine as well. I am of the opinion though that if you are mucking with
files and you have a testcase that has all the strings you need, why not go the
full way and just use a file to test it? 

-Scott

On 2010/10/20 19:56:14, sosa wrote:
> What's wrong with mocking out _builtins_.open() and returning a mock
> file?  Is it so bad?
> 
> On Wed, Oct 20, 2010 at 12:19 PM,  <mailto:scottz@chromium.org> wrote:
> > It is a matter of taste so I am LGTMing this but I highly recommend making
> > your
> > function open and close the file. You can test this in your unittest by
> > using
> > tempfiles, which ensures the whole process is tested not just the parsing.
> >
> > Either way in general this update looks really good thanks for cranking this
> > out!
> >
> > http://codereview.chromium.org/3930001/show
> >
>

Powered by Google App Engine
This is Rietveld 408576698