Module paludis :: Class EnvironmentImplementation
[show private | hide private]
[frames | no frames]

Type EnvironmentImplementation

object --+        
         |        
  instance --+    
             |    
   Environment --+
                 |
                EnvironmentImplementation


Represents a working environment, which contains an available packages database and provides various methods for querying package visibility and options. This class can be subclassed in Python.
Method Summary
  __init__(...)
  __getitem__(...)
[selection] -> list of PackageID Return PackageID instances matching a given selection.
  __reduce__(...)
  accept_keywords(KeywordsNameIterable, PackageID)
Do we accept any of the specified keywords for a particular package?
bool accept_license(str, PackageID)
Do we accept a particular license for a particular package?
list of paths bashrc_files()
Return a collection of bashrc files to be used by the various components that are implemented in bash.
list of Repository default_destinations()
Default destination candidates for installing packages.
str distribution()
NEED_DOC
list of paths fetchers_dirs()
Return directories to search for fetcher scripts.
list of paths hook_dirs()
Return directories to search for hooks.
UseFlagNameIterable known_use_expand_names(UseFlagName, PackageID)
Return a collection of known use flag names for a particular package that start with a particular use expand prefix.
Mask mask_for_breakage(PackageID)
Do we have a 'breaks' mask for a particular package?
Mask mask_for_user(PackageID)
Do we have a 'user' mask for a particular package?
list of str mirrors(str)
Return the mirror URI prefixes for a named mirror.
str paludis_command()
Return the command used to launch paludis (the client).
bool query_use(UseFlagName, PackageID)
Is a particular use flag enabled for a particular package?
int reduced_gid()
Group id to use when reduced privs are permissible.
int reduced_uid()
User id to use when reduced privs are permissible.
path root()
Our root location for installs.
CompositeDepSpec set(SetName)
Return a named set.
list of SetName set_names()
Return all known named sets.
  set_paludis_command(str)
Change the command used to launch paludis (the client).
list of paths syncers_dirs()
Return directories to search for syncer scripts.
bool unmasked_by_user(PackageID)
Do we have a user unmask for a particular package?
    Inherited from instance
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Property Summary
    Inherited from Environment
  package_database: [ro] PackageDatabase Our package databas.

Class Variable Summary
int __instance_size__ = 32                                                                    

Method Details

__getitem__(...)
(Indexing operator)

[selection] -> list of PackageID Return PackageID instances matching a given selection.

[selection] -> list of PackageID Return PackageID instances matching a given selection.
Overrides:
paludis.Environment.__getitem__

accept_keywords(KeywordsNameIterable, PackageID)

Do we accept any of the specified keywords for a particular package?

If the collection includes "*", should return true.

accept_keywords(KeywordsNameIterable, PackageID) Do we accept any of the specified keywords for a particular package?

If the collection includes "*", should return true.

accept_license(str, PackageID)

Do we accept a particular license for a particular package?

accept_license(str, PackageID) -> bool Do we accept a particular license for a particular package?
Returns:
bool

bashrc_files()

Return a collection of bashrc files to be used by the various components that are implemented in bash.

bashrc_files() -> list of paths Return a collection of bashrc files to be used by the various components that are implemented in bash.
Returns:
list of paths

default_destinations()

Default destination candidates for installing packages.

default_destinations() -> list of Repository Default destination candidates for installing packages.
Returns:
list of Repository

distribution()

NEED_DOC

distribution() -> str NEED_DOC
Returns:
str

fetchers_dirs()

Return directories to search for fetcher scripts.

fetchers_dirs() -> list of paths Return directories to search for fetcher scripts.
Returns:
list of paths

hook_dirs()

Return directories to search for hooks.

hook_dirs() -> list of paths Return directories to search for hooks.
Returns:
list of paths

known_use_expand_names(UseFlagName, PackageID)

Return a collection of known use flag names for a particular package that start with a particular use expand prefix.

It is up to subclasses to decide whether to return all known use flags with the specified prefix or merely all enabled use flags. It is not safe to assume that all flags in the returned value will be enabled for the specified package.

known_use_expand_names(UseFlagName, PackageID) -> UseFlagNameIterable Return a collection of known use flag names for a particular package that start with a particular use expand prefix.

It is up to subclasses to decide whether to return all known use flags with the specified prefix or merely all enabled use flags. It is not safe to assume that all flags in the returned value will be enabled for the specified package.
Returns:
UseFlagNameIterable

mask_for_breakage(PackageID)

Do we have a 'breaks' mask for a particular package?

Returns None if no.

mask_for_breakage(PackageID) -> Mask Do we have a 'breaks' mask for a particular package?

Returns None if no.
Returns:
Mask

mask_for_user(PackageID)

Do we have a 'user' mask for a particular package?

Returns None if no.

mask_for_user(PackageID) -> Mask Do we have a 'user' mask for a particular package?

Returns None if no.
Returns:
Mask

mirrors(str)

Return the mirror URI prefixes for a named mirror.

mirrors(str) -> list of str Return the mirror URI prefixes for a named mirror.
Returns:
list of str

paludis_command()

Return the command used to launch paludis (the client).

paludis_command() -> str Return the command used to launch paludis (the client).
Returns:
str

query_use(UseFlagName, PackageID)

Is a particular use flag enabled for a particular package?

query_use(UseFlagName, PackageID) -> bool Is a particular use flag enabled for a particular package?
Returns:
bool
Overrides:
paludis.Environment.query_use

reduced_gid()

Group id to use when reduced privs are permissible.

reduced_gid() -> int Group id to use when reduced privs are permissible.
Returns:
int

reduced_uid()

User id to use when reduced privs are permissible.

reduced_uid() -> int User id to use when reduced privs are permissible.
Returns:
int

root()

Our root location for installs.

root() -> path Our root location for installs.
Returns:
path

set(SetName)

Return a named set.

If the named set is not known, returns None.

set(SetName) -> CompositeDepSpec Return a named set.

If the named set is not known, returns None.
Returns:
CompositeDepSpec
Overrides:
paludis.Environment.set

set_names()

Return all known named sets.

set_names() -> list of SetName Return all known named sets.
Returns:
list of SetName

set_paludis_command(str)

Change the command used to launch paludis (the client).

set_paludis_command(str) Change the command used to launch paludis (the client).

syncers_dirs()

Return directories to search for syncer scripts.

syncers_dirs() -> list of paths Return directories to search for syncer scripts.
Returns:
list of paths

unmasked_by_user(PackageID)

Do we have a user unmask for a particular package?

This is only applied to repository and profile style masks, not keywords, licences etc. If true, user_mask shouldn't be used.

unmasked_by_user(PackageID) -> bool Do we have a user unmask for a particular package?

This is only applied to repository and profile style masks, not keywords, licences etc. If true, user_mask shouldn't be used.
Returns:
bool

Class Variable Details

__instance_size__

Type:
int
Value:
32                                                                    

Generated by Epydoc 2.1 on Mon Aug 4 19:40:18 2008 http://epydoc.sf.net