On 02/20/12 23:38, Danek Duvall wrote: .... > > That's not the diff in the webrev, even accounting for this one being > backwards. But even so, it still doesn't work for me. > > Now, I just re-read the bug report, and I'm not seeing the same stack trace > that you are. I'm getting > > $ pkg -R /tmp/i publisher > PUBLISHER TYPE STATUS URI > $ pkg -R /tmp/i publisher -P > PUBLISHER TYPE STATUS URI > Traceback (most recent call last): > File "/usr/bin/pkg", line 5982, in handle_errors > __ret = func(*args, **kwargs) > File "/usr/bin/pkg", line 5960, in main_func > return func(api_inst, pargs) > File "/usr/bin/pkg", line 4563, in publisher_list > set_value(field_data["publisher"], p.prefix) > AttributeError: 'NoneType' object has no attribute 'prefix' > > which clearly indicates that api_inst.get_highest_ranked_publisher() is > returning None for me, while you seem to be getting further with it. Sorry > I didn't pick up on that earlier.
Alright, I was missing this test. I have modified the fix to address this issue too. > > This seems to be a difference between looking at an image without any > packages installed and one with, as if I install a package into my test > image first, I get the r.origins stack trace. > > I think maybe get_highest_ranked_publisher() should always return None if > there are no configured publishers, regardless of whether there are any > installed packages, as there's no sense of publisher ranking if there is no > publisher configuration. Tested my fix on following scenarios : - No publisher configured for the current image root@onnv175b-nd:~# pkg publisher -P PUBLISHER TYPE STATUS URI - Image with No package root@onnv175b-nd:~# pkg -R /var/tmp/img publisher -P PUBLISHER TYPE STATUS URI works as expected New webrev : https://cr.opensolaris.org/action/browse/pkg/saurabhv/CR-7141684-rev3/webrev/ NOTE : I remove one test inside : test_publisher_apis (api/t_api.py) as now get_highest_ranked_publisher() returns 'None' when there are no configured publishers. Please let me know your thought on this fix. Thanks, ~Saurabh > > Danek -- Saurabh Vyas Solaris Install Group, Revenue Product Engineering (RPE), Systems ORACLE India | Off Langford Road | Bangalore | 560025 |Bangalore | Green Oracle <http://www.oracle.com/commitment> Oracle is committed to developing practices and products that help protect the environment _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
