Saurabh Vyas wrote:
> Not sure why you got the traceback after applying the fix, as get following
> o/p :
>
> root@S11:~# diff /usr/bin/pkg /usr/bin/pkg.orig
> 4528a4529
> > pref_pub = api_inst.get_highest_ranked_publisher()
> 4530d4530
> < pref_pub = api_inst.get_highest_ranked_publisher()
> 4599,4600d4598
> < if r is None:
> < continue
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.
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.
Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss