Package portage :: Package package :: Package ebuild :: Package _config :: Module LicenseManager :: Class LicenseManager
[hide private]

Class LicenseManager

source code

object --+
         |
        LicenseManager

Instance Methods [hide private]
 
__init__(self, license_group_locations, abs_user_config, user_config=True)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_read_user_config(self, abs_user_config) source code
 
_read_license_groups(self, locations) source code
 
extract_global_changes(self, old='') source code
 
expandLicenseTokens(self, tokens)
Take a token from ACCEPT_LICENSE or package.license and expand it if it's a group token (indicated by @) or just return it if it's not a group.
source code
 
_expandLicenseToken(self, token, traversed_groups) source code
 
_getPkgAcceptLicense(self, cpv, slot, repo)
Get an ACCEPT_LICENSE list, accounting for package.license.
source code
 
get_prunned_accept_license(self, cpv, use, lic, slot, repo)
Generate a pruned version of ACCEPT_LICENSE, by intersection with LICENSE.
source code
List
getMissingLicenses(self, cpv, use, lic, slot, repo)
Take a LICENSE string and return a list of any licenses that the user may need to accept for the given package.
source code
 
_getMaskedLicenses(self, license_struct, acceptable_licenses) source code
 
set_accept_license_str(self, accept_license_str) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, license_group_locations, abs_user_config, user_config=True)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

expandLicenseTokens(self, tokens)

source code 

Take a token from ACCEPT_LICENSE or package.license and expand it if it's a group token (indicated by @) or just return it if it's not a group. If a group is negated then negate all group elements.

get_prunned_accept_license(self, cpv, use, lic, slot, repo)

source code 

Generate a pruned version of ACCEPT_LICENSE, by intersection with LICENSE. This is required since otherwise ACCEPT_LICENSE might be too big (bigger than ARG_MAX), causing execve() calls to fail with E2BIG errors as in bug #262647.

getMissingLicenses(self, cpv, use, lic, slot, repo)

source code 

Take a LICENSE string and return a list of any licenses that the user may need to accept for the given package. The returned list will not contain any licenses that have already been accepted. This method can throw an InvalidDependString exception.

Parameters:
  • cpv (String) - The package name (for package.license support)
  • use (String) - "USE" from the cpv's metadata
  • lic (String) - "LICENSE" from the cpv's metadata
  • slot (String) - "SLOT" from the cpv's metadata
Returns: List
A list of licenses that have not been accepted.