Michal Pryc wrote:
> [snip]
> For the 2008.11 we will add license tab for packages. If this will be
> not provided by the API then we will need to pull the license calling
> other methods.
>
>
I looked into this a bit, and I've added a new piece to the API, info.
It lets the caller retrieve package information for all the fmri strings
provided. In this function, there's an argument which chooses whether or
not to retrieve the licenses. Are there other bits of information you
might need for a package which aren't captured by PackageInfo? Will this
info function provide the interface to the licenses you need?
def info(self, fmri_strings, local, get_licenses):
# fmri_strings: fmri names
# local: whether information is gathered locally or remotely
# get_licenses: whether to retrieve the text of the licenses
# Returns: A tuple consisting of:
# a list of PackageInfo's for all fmri's whose
information
# was found
# a list of all the fmri strings whose information could
# not be found
class PackageInfo(object):
def __init__(name=None, summary=None,
state=None,
authority=None, version=None,
build_release=None,
branch=None,
packaging_date=None,
size = None, fmri = None, licenses=None):
self.name = name
self.summary = summary
self.state = state,
self.authority = fmri.strip_auth_pfx(authority)
self.version = version
self.build_release = build_release
self.branch = branch
self.packaging_date = packaging_date
self.size = size
self.fmri = fmri
self.licenses = licenses
Thanks,
Brock
[snip]
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss