Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

Y2PM Class Reference

#include <Y2PM.h>

List of all members.

Public Types

typedef PM::LocaleSet LocaleSet
typedef PM::LocaleOrder LocaleOrder

Static Public Member Functions

PMError rcInit ()
PMError rcSave ()
PMError rcCopyTo ()
PMError setCandidateOrder (PM::CandidateOrder neworder_r)
LocaleOrder getLocaleFallback (const LangCode &locale_r)
LocaleOrder getLocaleFallback ()
const LangCodegetPreferredLocale ()
PMError setPreferredLocale (const LangCode &preferred_locale_r)
const LocaleSetgetRequestedLocales ()
PMError setRequestedLocales (const LocaleSet &requested_locales_r)
PMError setRequestedLocales (const LangCode &requested_locale_r)
PMError addRequestedLocales (const LocaleSet &requested_locales_r)
PMError addRequestedLocales (const LangCode &requested_locale_r)
PMError delRequestedLocales (const LocaleSet &requested_locales_r)
PMError delRequestedLocales (const LangCode &requested_locale_r)
PkgArch baseArch (void)
const PM::ArchSetallowedArchs (void)
void setAllowedArchs (const PM::ArchSet &allowed_archs)
bool runningFromSystem ()
void setNotRunningFromSystem ()
bool cacheToRamdisk ()
void setCacheToRamdisk (const bool val_r)
InstTargetinstTarget ()
PMError instTargetInit (Pathname root_r="")
PMError instTargetUpdate ()
PMError instTargetClose ()
bool noAutoInstSrcManager ()
bool hasInstSrcManager ()
InstSrcManagerinstSrcManager ()
void ISM_RanksCanged ()
PMPackageManagerpackageManager ()
PMSelectionManagerselectionManager ()
PMYouPatchManageryouPatchManager ()
void packageSelectionSaveState ()
bool packageSelectionRestoreState ()
bool packageSelectionDiffState ()
void packageSelectionClearSaveState ()
int commitPackages (unsigned int media_nr, std::list< std::string > &errors_r, std::list< std::string > &remaining_r, std::list< std::string > &srcremaining_r)
int commitPackages (unsigned int media_nr, std::list< std::string > &errors_r, std::list< std::string > &remaining_r, std::list< std::string > &srcremaining_r, PM::ISrcIdList installrank)
PMError installFile (const Pathname &path_r)
PMError removePackage (const std::string &pkgname_r)

Static Private Member Functions

void cleanupAtExit ()
LocaleSettingslocaleSettings ()
PMError preferredLocaleChanged ()
PMError requestedLocalesChanged (const LocaleSet &addLocales_r, const LocaleSet &delLocales_r)

Static Private Attributes

Pathname _system_rootdir
bool _cache_to_ramdisk
PkgArch _base_arch
PM::ArchSet _allowed_archs
InstTarget_instTarget = 0
InstSrcManager_instSrcManager = 0
PMPackageManager_packageManager = 0
PMSelectionManager_selectionManager = 0
PMYouPatchManager_youPatchManager = 0


Detailed Description

Core class providing access to all components of the Package Management creating them on demand.


Member Typedef Documentation

typedef PM::LocaleOrder Y2PM::LocaleOrder
 

typedef PM::LocaleSet Y2PM::LocaleSet
 


Member Function Documentation

PMError Y2PM::addRequestedLocales const LangCode requested_locale_r  )  [inline, static]
 

PMError Y2PM::addRequestedLocales const LocaleSet requested_locales_r  )  [static]
 

Add locales to requested locales.

const PM::ArchSet& Y2PM::allowedArchs void   )  [inline, static]
 

Access to the list of allowed architectures

PkgArch Y2PM::baseArch void   )  [static]
 

Access to the (target) base architecture

bool Y2PM::cacheToRamdisk  )  [inline, static]
 

If false, InstSrc will not create a data cache in ramdisk, if not running from system.

void Y2PM::cleanupAtExit  )  [static, private]
 

int Y2PM::commitPackages unsigned int  media_nr,
std::list< std::string > &  errors_r,
std::list< std::string > &  remaining_r,
std::list< std::string > &  srcremaining_r,
PM::ISrcIdList  installrank
[static]
 

OBSOLETE, using installrank argument *

int Y2PM::commitPackages unsigned int  media_nr,
std::list< std::string > &  errors_r,
std::list< std::string > &  remaining_r,
std::list< std::string > &  srcremaining_r
[static]
 

package deletion/installation main loop deletes/installs all packages currently marked in packageManager() if media_nr == 0, install everything regardless of media nr if media_nr > 0, install only from this media nr return list of failed package names in errors_r return list of unavailable packages (due to InstSrc errors or wrong media nr) in remaining_r return list of unavailable source packages (due to InstSrc errors or wrong media nr) in srcremaining_r return number of sucessfully installed packages

PMError Y2PM::delRequestedLocales const LangCode requested_locale_r  )  [inline, static]
 

PMError Y2PM::delRequestedLocales const LocaleSet requested_locales_r  )  [static]
 

Remove locales from requested locales.

LocaleOrder Y2PM::getLocaleFallback  )  [inline, static]
 

Return the locale fallbacks for PreferredLocale.

Y2PM::LocaleOrder Y2PM::getLocaleFallback const LangCode locale_r  )  [static]
 

Return an ordered list of locales to try. For 'de_DE' you may for example get a list like: { de_DE, de, en }

const LangCode & Y2PM::getPreferredLocale  )  [static]
 

Return the preferred locale. The preferred language for labels, descritions, etc. passed to the UI.

const Y2PM::LocaleSet & Y2PM::getRequestedLocales  )  [static]
 

Return requested locales. Languages to be supported by the system, i.e. language specific packages to be installed by e.g. selections.

bool Y2PM::hasInstSrcManager  )  [inline, static]
 

Returns true, if an InstSrcManager is present.

PMError Y2PM::installFile const Pathname path_r  )  [static]
 

Install a single rpm file.

InstSrcManager & Y2PM::instSrcManager  )  [static]
 

Access to the installation source manager

InstTarget & Y2PM::instTarget  )  [static]
 

Access to the installation target. Target is uninitialized untill instTargetInit and after instTargetClose.

PMError Y2PM::instTargetClose  )  [static]
 

Shutdown access to the installation target. Provided packages and selections will be withdrawn from existing managers.

PMError Y2PM::instTargetInit Pathname  root_r = ""  )  [static]
 

Initialize the installation target to use the system located below root_r. If the installation target is already initialized, a provided root_r must match the root path in use, otherwise an error is returned. If no root_r (or an empty path) is provided, an already initialized target is used, otherwise it's initialized to use "/".

If the installation target actually gets initialized, packages and selections are loaded into already existing managers. Otherwise managers will retrieve their data as they are created.

Use instTargetUpdate if you want to make shure, that installation target and managers exist and are up to date.

PMError Y2PM::instTargetUpdate  )  [static]
 

Make shure, that installation target is initialized and managers exist. Check whether databases on target need to be reread, and load the updated content into the managers.

NOTE: If the installation target has to use some other location than "/", make shure you explicitly call instTargetInit before.

void Y2PM::ISM_RanksCanged  )  [static]
 

Triggered by InstSrcManager whenever InstSrc ranks were changed. We have to adjust e.g. package candidate lists as the InstSrc rank is a criteria for candidate selection.

Y2PM::LocaleSettings & Y2PM::localeSettings  )  [inline, static, private]
 

bool Y2PM::noAutoInstSrcManager  )  [static]
 

Special call to create the instSrcManager (if it does not already exist), but prevent autoenabling of any InstSrc'es found in the cache.

Returns true, if the call succeeded. Otherwise the instSrcManager has already been constructed, and may or may not contain enabled InstSrc'es.

PMPackageManager & Y2PM::packageManager  )  [static]
 

Access to the Package manager

void Y2PM::packageSelectionClearSaveState  )  [static]
 

[package/selectionManager] Forgett a previously saved selection.

bool Y2PM::packageSelectionDiffState  )  [static]
 

[package/selectionManager] Return true if current selection differs from previously saved selection.

bool Y2PM::packageSelectionRestoreState  )  [static]
 

[package/selectionManager] Restore previously saved selection.

void Y2PM::packageSelectionSaveState  )  [static]
 

[package/selectionManager] Save current selection

PMError Y2PM::preferredLocaleChanged  )  [static, private]
 

Triggered if preferred locale value actually changed.

PMError Y2PM::rcCopyTo  )  [static]
 

PMError Y2PM::rcInit  )  [static]
 

PMError Y2PM::rcSave  )  [static]
 

PMError Y2PM::removePackage const std::string &  pkgname_r  )  [static]
 

Remove a single package by name.

PMError Y2PM::requestedLocalesChanged const LocaleSet addLocales_r,
const LocaleSet delLocales_r
[static, private]
 

Triggered if requested locale value actually changed.

bool Y2PM::runningFromSystem  )  [inline, static]
 

If false, root is ramdisk, and system to install is (or will be) mounted below _system_rootdir. Need to know this e.g. in InstSrc to determine, wheter to write a chache on 'enable' or to wait until system to be installed is available below _system_rootdir.

PMSelectionManager & Y2PM::selectionManager  )  [static]
 

Access to the Selection manager

void Y2PM::setAllowedArchs const PM::ArchSet allowed_archs  )  [inline, static]
 

void Y2PM::setCacheToRamdisk const bool  val_r  )  [inline, static]
 

PMError Y2PM::setCandidateOrder PM::CandidateOrder  neworder_r  )  [static]
 

void Y2PM::setNotRunningFromSystem  )  [inline, static]
 

PMError Y2PM::setPreferredLocale const LangCode preferred_locale_r  )  [static]
 

Change the preferred locale.

PMError Y2PM::setRequestedLocales const LangCode requested_locale_r  )  [inline, static]
 

PMError Y2PM::setRequestedLocales const LocaleSet requested_locales_r  )  [static]
 

Change requested locales.

PMYouPatchManager & Y2PM::youPatchManager  )  [static]
 

Access to the YouPatch manager


Member Data Documentation

std::list< PkgArch > Y2PM::_allowed_archs [static, private]
 

PkgArch Y2PM::_base_arch [static, private]
 

bool Y2PM::_cache_to_ramdisk [static, private]
 

InstSrcManager * Y2PM::_instSrcManager = 0 [static, private]
 

InstTarget * Y2PM::_instTarget = 0 [static, private]
 

PMPackageManager * Y2PM::_packageManager = 0 [static, private]
 

PMSelectionManager * Y2PM::_selectionManager = 0 [static, private]
 

Pathname Y2PM::_system_rootdir [static, private]
 

PMYouPatchManager * Y2PM::_youPatchManager = 0 [static, private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 14:30:33 2007 for yast2-packagemanager by doxygen 1.3.6