Hi there,
On 05/23/12 01:24 PM, Brock Pytlik wrote:
On 05/22/12 18:10, Tim Foster wrote:
Alright, so this could be a simple user-interface change on my part.
I could make:
# pkg set-publisher -G http://foo bar
delete all instances of http://foo (ie. preserve the current
behaviour) and also make:
I'm not a fan of this change, though I could live with it. Another
suggestion would be this:
1) If a single origin with the uri http://foo is specified (with or
without proxy) -G http://foo removes it
2) If multiple origins with the uri http://foo are specified but one
doesn't have a proxy, -G http://foo removes the unproxied one
3) If multiple origins with the uri http://foo are specified but all
have a proxy, -G http://foo is an error.
So from discussions in the meeting today, I think we reached a consensus.
It was suggested that we simply ensure the user has supplied enough
information so that we can derive their intent, but to continue to only
remove a single origin when a URI is provided on the command line.
This is basically what Brock had suggested above. To rephrase,
1. if single proxied origin exists, but the user doesn't use --proxy
when trying to remove it, we remove the proxied origin so long as it is
the only origin that uses that URI.
2. if multiple proxied origins exist for a single URI and the user
hasn't used --proxy and no matching unproxied origins exist, then we
report an error.
Here's what that looks like:
[configuring our image]
$ pkg --no-refresh -g http://foo test
$ pkg set-publisher --no-refresh -g http://foo --proxy http://bar test
$ pkg set-publisher --no-refresh -g http://foo --proxy http://baz test
$ pkg publisher
PUBLISHER TYPE STATUS P LOCATION
test origin online F http://foo/
test origin online T http://foo/
test origin online T http://foo/
[ item 1. above]
$ pkg set-publisher --no-refresh -G http://foo test
$ pkg publisher
PUBLISHER TYPE STATUS P LOCATION
test origin online T http://foo/
test origin online T http://foo/
[ item 2. above]
$ pkg set-publisher --no-refresh -G http://foo test
pkg set-publisher: Repository origin 'http://foo/' matches more than one
origin
[removing a proxied origin]
$ pkg set-publisher --no-refresh -G http://foo --proxy http://bar test
$ pkg publisher
PUBLISHER TYPE STATUS P LOCATION
test origin online T http://foo/
[trying to remove an non-existent origin]
$ pkg set-publisher --no-refresh -G http://foo --proxy http://none test
pkg set-publisher: Unknown repository origin 'http://foo/' with proxy
'http://none'
$ pkg publisher
PUBLISHER TYPE STATUS P LOCATION
test origin online T http://foo/
[reconfiguring the image, and removing all origins]
$ pkg publisher
PUBLISHER TYPE STATUS P LOCATION
test origin online F http://foo/
test origin online T http://foo/
test origin online T http://foo/
$ pkg set-publisher -G'*' test
$ pkg publisher
PUBLISHER TYPE STATUS P LOCATION
test
If that reflects what we discussed in the meeting, and everyone's happy,
then I'll send a webrev with this change.
cheers,
tim
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss