On 05/29/12 15:30, Shawn Walker wrote:
On 05/09/12 19:10, Brock Pytlik wrote:
Webrev:
https://cr.opensolaris.org/action/browse/pkg/bpytlik/7140060-v2

Bug:
7140060 install and update should allow multiple pattern matches when
they intersect

src/modules/client/api_errors.py:

lines 577-578: I think many users may stumble over the phrase "disjoint set". Perhaps something simpler like this:

The following patterns specify different versions of the same package(s):

That works. Thanks for the wording.



src/modules/client/imageplan.py:
  line 3976: please add a brief comment noting that fmri publisher
    filtering is handled later
Sure

  line 4094: s/specificed/specified/

Thanks.
lines 4094-4117: It looks like if the user specifies a version of an installed package that is not available from the sticky publisher, that this may cause a multispec error to be raised, which doesn't seem quite right. Is that right?

Is this the situation you're talking about?
Image has two publishers configured, test1 and test2, test1 is higher ranked. Test2 is sticky and package foo@1 is installed from test2. foo@2 is available from test1 only. The user types 'pkg update foo@2' or 'pkg install foo@2'?

If that's the case, here's the error that's produced:
| $ /tmp/ips.test.18885/fakeroot/pkg -R /tmp/ips.test.18885/0/image0 --debug smf_cmds_dir=/tmp/ips.test.18885/0/smf_cmds update a@2
|
| pkg update: The following patterns only matched packages that are from publishers other than that which supplied the already installed version of this package
|       a@2: test

Which is the wrong_publisher error, which seems like the right error to me. (The same error appears if install is used instead of update.) Notice that in the code you mentioned, stripped_by_publisher is set to true on line 4110. That means the code on lines 4116 and 4117 is used (assuming no packages match the pattern), so we get the wrong_publisher error.

If I haven't covered the situation you were concerned about, please let me know and I'll try again.


Also, it isn't clear to me, but what happens when the user specifies input that doesn't match at all? For example, if say 'pkg install a*@1 and archive@2' but a*@1 matches nothing, does it error? Every pattern is required to have at least one match, right?

Every pattern is required to have at least one match, here are the errors that appear when I used the same setup as described above but instead update/install using an explicit publisher on a@2 and also install/update b@2: | $ /tmp/ips.test.19130/fakeroot/pkg -R /tmp/ips.test.19130/0/image0 --debug smf_cmds_dir=/tmp/ips.test.19130/0/smf_cmds install b*@2 pkg://test/a@2
|
| pkg install: The following pattern(s) did not match any allowable packages. Try
| using a different matching pattern, or refreshing publisher information:
|
|       b*@2

| $ /tmp/ips.test.19031/fakeroot/pkg -R /tmp/ips.test.19031/0/image0 --debug smf_cmds_dir=/tmp/ips.test.19031/0/smf_cmds update b*@2 pkg://test/a@2
|
| pkg update: 'b*@2' matches no installed packages

Note that nonmatch still gets appended to like it was in the past (lines 4031-4032).


Thanks for taking a look. I'll wait to hear whether I understood the scenario you were concerned about before I put back.

Brock

-Shawn

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

Reply via email to