| Home | Trees | Indices | Help |
|
|---|
|
|
Author: Fabio Erculiani <lxnay@sabayonlinux.org>
Contact: lxnay@sabayonlinux.org
Copyright: Fabio Erculiani
License: GPL-2
Entropy Framework constants module.
This module contains all the Entropy constants used all around the "entropy" package.
Some of the constants in this module are used as "default" for the SystemSettings interface. So, make sure to read the documentation of SystemSettings in the "entropy.core" module.
Even if possible, etpConst, etpUi, etpCache and etpSys objects *SHOULD* be never ever modified manually. This freedom could change in future, so, if you want to produce a stable code, DON'T do that at all!
Basic Entropy constants handling functions are available in this module and are all prefixed with "const_*" or "initconfig_*". If you are writing a third party application, you should always try to avoid to deal directly with functions here unless specified otherwise. In fact, usually these here are wrapper in upper-level modules (entropy.client, entropy.server, entropy.services).
| Functions | |||
| None |
|
||
| None |
|
||
| int |
|
||
| tuple (string, dict) |
|
||
| None |
|
||
| None |
|
||
| None |
|
||
|
|||
| None |
|
||
| None |
|
||
| None |
|
||
| None |
|
||
| None |
|
||
| integer(8) (octal) |
|
||
| None |
|
||
| None |
|
||
| None |
|
||
| bool |
|
||
| None |
|
||
| None |
|
||
| Variables | |
ETP_ARCH_MAP =
|
|
ETP_ARCH_CONST =
|
|
etpSys =
|
|
etpUi =
|
|
ETP_LOGLEVEL_NORMAL = 1
|
|
ETP_LOGLEVEL_VERBOSE = 2
|
|
ETP_LOGPRI_INFO =
|
|
ETP_LOGPRI_WARNING =
|
|
ETP_LOGPRI_ERROR =
|
|
etpCache =
|
|
etpConst =
|
|
arch =
|
|
arches =
|
|
| Function Details |
Main constants configurators, this is the only function that you should call from the outside, anytime you want. it will reset all the variables excluding those backed up previously.
|
Initialization of all the Entropy base settings.
|
Change current process scheduler "nice" level.
|
Extract repository information from the provided repository string, usually contained in the repository settings file, repositories.conf.
|
Read Entropy release file content and fill etpConst['entropyversion']
|
Setup Entropy pid file, if possible and if UID = 0 (root). If the application is run with --no-pid-handling argument, this function will have no effect. If just_read is specified, this function will only try to read the current pid string in the Entropy pid file (etpConst['pidfile']). If any other entropy istance is currently owning the contained pid, etpConst['applicationlock'] becomes True.
|
Setup entropy file needing strict permissions, no world readable.
|
Setup entropy pid file permissions, if possible.
|
Setup Entropy directory structure, as much automagically as possible.
|
Setup Entropy lock file paths.
|
Analyze a server repository string (usually contained in server.conf), extracting all the parameters.
|
Setup permissions and group id (GID) to a directory, recursively.
|
Setup file permissions and group id (GID).
|
This function get the current permissions of the specified file. If you want to use the returning value with const_set_chmod you need to convert it back to int.
|
This function sets specified permissions to a file. If they differ from the current ones.
|
This function tries to retrieve the "entropy" user group GID.
|
This function looks for an "entropy" user group. If not available, it tries to create one.
|
Live environments (Operating System running off a CD/DVD) must feature the "cdroot" parameter in kernel /proc/cmdline Sample code: >>> from entropy.const import const_islive >>> const_islive() False
|
Entropy threads killer. Even if Python threads cannot be stopped or killed, TimeScheduled ones can, exporting the kill() method. Sample code: >>> from entropy.const import const_kill_threads >>> const_kill_threads()
|
Entropy debugging output write functions.
|
| Variables Details |
ETP_ARCH_MAP
|
etpSys
|
etpUi
|
etpCache
|
etpConst
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Aug 5 16:58:52 2009 | http://epydoc.sourceforge.net |