Module paludis :: Class EnvironmentImplementation
[hide private]

Class 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.

Instance Methods [hide private]
 
__getitem__(...)
[selection] -> list of PackageID Return PackageID instances matching a given selection.
 
__init__(...)
Raises an exception This class cannot be instantiated from Python
 
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.
Mask
mask_for_breakage(PackageID)
Do we have a 'breaks' mask for a particular package?
Mask
mask_for_user(PackageID, bool)
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).
int
reduced_gid()
Group id to use when reduced privs are permissible.
int
reduced_uid()
User id to use when reduced privs are permissible.
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 Environment: __reduce__

Inherited from unreachable.instance: __new__

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

Class Variables [hide private]
  __instance_size__ = 32
Properties [hide private]

Inherited from Environment: package_database

Inherited from object: __class__

Method Details [hide private]

__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: Environment.__getitem__

__init__(...)
(Constructor)

 

Raises an exception This class cannot be instantiated from Python

Overrides: object.__init__
(inherited documentation)

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
Overrides: default_destinations

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

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, bool)

 

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

Returns None if no. The second parameter should be true if the mask will be overridden and false otherwise.

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

Returns None if no. The second parameter should be true if the mask will be overridden and false otherwise.

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

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

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: Environment.set

set_names()

 

Return all known named sets.

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

Returns: list of SetName
Overrides: set_names

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