On 05/01/12 19:06, Bart Smaalders wrote:
https://cr.opensolaris.org/action/browse/pkg/barts/bug-fixes-2/
7165703 onu cannot uninstall entire
This attacks the root cause for this problem. We need to make sure we
don't expand the possible_set with packages that aren't installed in
this image, so dependency types that reference other images or don't
generate actual new dependencies should not be included when we generate
the dependency closure. I also changed the sense of the dependency type
comparison to improve performance and more easily catch problems if we
add new dependencies in the future.
- Bart
Any reason to add a test case for this change?
The larger question I have is whether __generate_dependencies should be
keeping a list of dependency types which have a certain property (in
this case, whether the dependency can bring another package onto the
system) instead of just asking the action whether it has this property.
To be concrete, I think I'd be happier if __generate_dependencies just
did something like (property name TBD):
if da.imports_packages:
for f in ...
And then over in depend.py have something like
@property
def imports_packages:
if da.attrs["type"] == "require" or...
return True
elif da.attrs["type"] == "incorporate" or ...
return False
else:
raise Exception("Unknown action type")
I also don't need to see this sort of change in this webrev, but would
be happy with a bug/rfe filed to change the code structure in the future.
Thoughts?
Brock
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss