Brock Pytlik wrote:
Rich Burridge wrote:
4134 pkg operations should report operation sizes
Bugid: http://defect.opensolaris.org/bz/show_bug.cgi?id=4134
7736 image plan should provide space requirements for operation
Bugid: http://defect.opensolaris.org/bz/show_bug.cgi?id=7736
Last message:
http://mail.opensolaris.org/pipermail/pkg-discuss/2009-May/013742.html
Last webrev: http://cr.opensolaris.org/~richb/pkg-4134-v3/
In general, we've been moving away from having anything below the API
print directly to the screen since that doesn't allow other clients to
take advantage of that information. I suspect the Package and Update
managers might be interested in having this information available to
them as well. That said, the changes you propose match the current
approach the other verbose info code currently takes, so I won't press
hard for a change here. Long term, I think the right approach might be
to have the api methods take a function (possibly two, one for errors
and one for normal messaging) from the outside clients which accepts a
string and displays it as needed, or we need to integrate our verbose
messaging into the progress tracker more fully, if we're going with that
as the way to convey information out to the user in the middle of a
process.
You'll note that Rich did provide a method on the imageplan to get this
information, so it is effectively exposed via the API since the
imageplan is as well.
I guess the real question is whether the show_size() method should
contain presentation code at all, and we should rely on the client to
show that information itself.
Of course, the other issue at the moment is the structure of the cli
client which relies on things like 'verbose', etc. to enact certain
behaviours as part of normal operations instead of doing those things
itself.
Long-term, I'd like to see a better separation between the presentation
layer (client) and API.
Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss