On 08/29/12 16:58, Shawn Walker wrote:
Greetings,

The following webrev contains fixes for the following issue:

  7194891 pkg solver operations can omit package dependencies

https://cr.opensolaris.org/action/browse/pkg/swalker/pkg-solver/webrev/

I've verified that this resolves the original issue described in the bug. Unfortunately, despite many hours of trying to devise a test case, I've been unable to create one.

Best I can tell, this bug only occurs whenever a certain chain of dependencies is parsed an even number of times, which causes the dependency list to be reversed at a point where the FMRI ids (position in possible dict) is used to generate the SAT solver clauses internally.

The good new is that it's a tiny fix and seems pretty obvious that it is the right one.

Once reviewed, I will push to both the update branch and to the default one.

-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
I'd like a bit more of a comment on line 1077 and 1131. Specifically, I think it should mention that the reason we have to make a copy is that the list has been cached in possible_dict. I'm also curious about two other potential solutions/optimizations weren't chosen. First, why not just have __get_catalog_fmris return a copy of the list itself. That seems safer and better code structure (since the code that's making the copy is the code that knows the list has been cached in the dictionary).

If for some reason that solution doesn't work, then I would think it makes sense to change lines 1078 and 1132 so that a copy is made only in the case where self.__trimdone is true. If those lines are going to know that the list may have been cached in a dictionary, then there's no reason for them not to determine for certain whether or not that's happened.

Thanks,
Brock
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to