>>>> http://cr.opensolaris.org/~swalker/pkg-5871/
> All items resolved have been removed from this reply.
Same goes for my follow up. :)
>> image.py:
>>
>> There appear to be a lot of duplicate functions here. After looking at
>> the changes to the API to add/remove/update/modify Publishers, aren't
>> the routines like set_attrs() and set_publisher() redundant? We've had
>
> Some of the functions were left in place because I wanted to change the
> transport layer as little as possible since you are completely
> overhauling it.
Ok. My plan is to have the transport make use of your new publisher
objects for obtaining the correct information. I can live with purging
the dead code as part of the transport re-write.
>> publisher.py:
>>
>> - lines 35-41: What is this for?
>
> I'm assuming you mean they're missing comments. If you're asking what
> the actual values are for, they're purely informational at this time. My
> guess is that we might be able to somehow leverage them at a later date;
> ask Stephen.
It was both actually. I was curious what it was, and a comment is
always appreciated. Thanks for changing that.
>> - lines 484, 499: Priority is one possible sorting for origin/mirror
>> preferences; however, my guess is that people would generally prefer
>> that the pkg client choose the mirror based upon observed network
>> performance. For now, I would avoid sorting these lists. It might
>> also be worthwhile to introduce some kind of priority policy
>> attribute so we can easily switch between numerical priority order,
>> and more complicated algorithms.
>
> I'd like to leave this as is for now. My assumption was that with your
> transport putback, this would change anyway, but at least there would be
> a framework in place. At that point we could revisit this and determine
> what the best way is to deal with sorting. Is that agreeable?
Perhaps we could find an acceptable compromise. Would you be willing to
leave the sorting by priority order, but add an instance variable to the
Repository class the named the sort policy. If you created a sort
policy table that contains the different sort functions, listed by name,
it would be fine if it had just the following right now:
{ "priority" : lambda obj: (obj.priority, obj.uri) }
Would this work, or is that more change than you would like?
Thanks,
-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss