Shawn Walker wrote:
Shawn Walker wrote:
Greetings,
The following webrev contains fixes for the following issues:
2557 catalog cache pickle file dependent on fmri and version object
definitions
6221 AttributeError while reading catalog.pkl
webrev:
http://cr.opensolaris.org/~swalker/pkg-2557/
Change Summary:
* Completely removed all pickle usage in favor of custom format flat
file for catalog cache (see comments for format details)
* Added catalog.fast_cache_fmri() method to skip the extra overhead
of consistency checks and sorting for cache loads
* Added a set of Catalog cache exceptions to allow more specific
analysis of cache failure
* Bumped catalog_cache_version to 4
* Made catalog cache parsing robust against corruption, truncation,
or invalid values
* Added code to remove old catalog cache files when possible
(pkg_names.pkl, catalog.pkl)
* Added code to ensure that if catalog cache can't be read or is
corrupt that an in-memory representation will be built anyway from
the existing catalog data and an attempt to save it will be made
(although failure will not occur if it cannot be).
* Added unit tests to verify that corrupt or missing catalog cache
will not impact pkg operations such as pkg list.
Alright, I've incorporated all the review feedback, and I've altered
the flat-file format a little further for better performance and a
reduction in size:
http://cr.opensolaris.org/~swalker/pkg-2557-2/
new catalog_cache sample:
http://cr.opensolaris.org/~swalker/pkg-2557-2/catalog_cache
I need one more reviewer.
Cheers,
I used: http://cr.opensolaris.org/~swalker/pkg-2557-3/
<http://cr.opensolaris.org/%7Eswalker/pkg-2557-3/>
client/image.py:
1724-1731 a comment explaining that you're building a translation
dictionary would be nice
t_pkg_list:
348-359: defining expected w/in the test_for_expected function doesn't
make a whole lot of sense to me. I probably would've expected that to be
an argument to the function so that it can be reused. Not a big deal though.
393: typo I think in "verify the performing"
Only other thing I can think of to test against would be malformed cache
file lines (a line that expects a previous full fmri to have been given
as the first line after the publisher line for example, or lines that
are just truncated in their middles). Not sure if that's necessary or
not, probably not, but it was the only thing I couldn't see being tested.
Other than that, LGTM,
Brock
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss