YaST2 Package Manager

Package-Manager Builtins

SUSE Linux AG

YaST2 Team

SUSE Linux AG

Table of Contents

1. Package Manager
1.1. Using the package manager
1.1.1. Introduction
1.1.2. Implementation
1.1.3. Querying the package manager
1.1.3.1. Checking an installed package
1.1.3.2. Checking the installation sources
1.1.3.3. Deleting a package
1.1.3.4. Installing a package
1.1.3.5. Solving dependencies
1.1.3.6. Committing the changes
1.1.4. Example code
I. Access to Installation Sources
Pkg::SourceCacheCopyTo - Copy cache data of all installation sources to the target
Pkg::SourceChangeUrl - Change Source URL
Pkg::SourceCleanupBroken - Clean up all sources that were not properly restored on the lastcall of SourceStartManager or SourceStartCache.
Pkg::SourceCreate - Create a Source
Pkg::SourceCreateType - Create source of required type
Pkg::SourceDelete - Delete a Source
Pkg::SourceEditGet - Get state of Sources
Pkg::SourceEditSet - Configure properties of installation sources
Pkg::SourceFinish - Disable an Installation Source
Pkg::SourceFinishAll - Save and then disable all InstSrces.
Pkg::SourceGeneralData - Get general data about the source
Pkg::SourceGetCurrent - Return the list of all InstSrc Ids.
Pkg::SourceInstallOrder - not implemented, do not use (Explicitly set an install order.)
Pkg::SourceLoad - Load resolvables from the installation sources
Pkg::SourceMediaData - Return media data about the source
Pkg::SourceMoveDownloadArea - Move download area of CURL-based sources to specified directory
Pkg::SourceProduct - Obsoleted function, do not use, see SourceProductData builtin
Pkg::SourceProductData - Return Product data about the source
Pkg::SourceProvideDir - make a directory available at the local filesystem
Pkg::SourceProvideFile - Make a file available at the local filesystem
Pkg::SourceProvideOptionalFile - Make an optional file available at the local filesystem
Pkg::SourceRefreshNow - Attempt to immediately refresh a Source
Pkg::SourceReleaseAll - Release all medias hold by all sources
Pkg::SourceRestore - Restore the sources from the persistent store
Pkg::SourceSaveAll - Save all InstSrces.
Pkg::SourceScan - Scan a Source Media
Pkg::SourceSetAutorefresh - Set whether this source should automaticaly refresh it'smeta data when it gets enabled. (default true, if not CD/DVD)
Pkg::SourceSetEnabled - Set the default activation state of an InsrSrc.
Pkg::SourceSetRamCache - Obsoleted function, do not use
Pkg::SourceStartCache - Make sure the InstSrcManager is up, and return the list of SrcIds.
Pkg::SourceStartManager - Start the source manager - restore the sources and load the resolvables
Pkg::SourceURL - Get full source URL, including password
II. PkgModuleFunctions constructor, destructor and call handling
Pkg::Connect - Explicitly connect to the package manager, if it is already connected do nothing
Pkg::GetAdditionalLocales - return list of additional locales
Pkg::GetLocale - get the currently preferred locale
Pkg::Init - completely initialize package management, throw away the current status
Pkg::InstSysMode - obsoleted - do not use
Pkg::LastError - get current error as string
Pkg::LastErrorDetails - get current error details as string
Pkg::LastErrorId - Obsoleted function, do not use
Pkg::SetAdditionalLocales - set list of additional locales
Pkg::SetLocale - Set Prefered Locale
III. Access to Package Selection Manager
Pkg::ActivateSelections - Activate all selected selections - obsoleted, use PkgSolve() instead
Pkg::ClearSelection - Clear a selected selection - obsoleted, use ResolvableRemove() instead
Pkg::GetPatterns - Return list of patterns matching given status (obsoleted, use ResolvableProperties())
Pkg::GetSelections - Return list of selections matching given status - obsoleted, use ResolvableProperties() instead
Pkg::PatternData - Get Pattern Data
Pkg::SelectionContent - Get list of packages listed in a selection
Pkg::SelectionData - Get Selection Data
Pkg::SetSelection - Set a new selection - obsoleted, use ResolvableInstall() instead
IV. Access to packagemanager
Pkg::AnyToInstall - Check if there are any package to be installed
Pkg::ClearSaveState - clear a saved state (to reduce memory consumption) - do not use, not implemented
Pkg::CreateBackups - whether to create package backups during install or removal
Pkg::DoProvide - Install a list of packages to the system
Pkg::DoRemove - Removes a list of packges from the system
Pkg::FilterPackages - Get list of packages depending on how they were selected
Pkg::GetBackupPath - get current path for update backup of rpm config files
Pkg::GetPackages - Get list of packages (installed, selected, available, to be removed)
Pkg::IsAvailable - Check if package (tag) is available
Pkg::IsManualSelection - Check Status of Selections and if they have changed
Pkg::IsProvided - returns 'true' if the tag is provided by a package in the installed system
Pkg::IsSelected - returns a 'true' if the tag is selected for installation
Pkg::PkgAnyToDelete - Check if there are any package to be deleted
Pkg::PkgCommit - Commit package changes (actually install/delete packages)
Pkg::PkgDelete - Select package for deletion
Pkg::PkgEstablish - establish the pool state
Pkg::PkgFreshen - check all package freshens and schedule matching ones for installation
Pkg::PkgGetFilelist - Get File List of a package
Pkg::PkgGetLicenseToConfirm - Return Licence Text
Pkg::PkgGetLicensesToConfirm - Return Licence Text of several packages
Pkg::PkgGroup - Get rpm group of a package
Pkg::PkgInstall - Select package for installation
Pkg::PkgLocation - Get file location of a package in the source
Pkg::PkgMarkLicenseConfirmed - Mark licence of the package confirmed
Pkg::PkgMediaCount - Return number of packages to be installed
Pkg::PkgMediaNames - Return names of sources in installation order
Pkg::PkgMediaSizes - Return size of packages to be installed
Pkg::PkgNeutral - Set package to neutral (drop install/delete flags)
Pkg::PkgPath - Path to a package path in the source
Pkg::PkgProperties - Return information about a package
Pkg::PkgQueryProvides - List all package instances providing 'tag'
Pkg::PkgSize - Get (installed) size of a package
Pkg::PkgSolve - Solve current package dependencies
Pkg::PkgSolveCheckTargetOnly - Solve packages currently installed on target system.
Pkg::PkgSolveErrors - Returns number of fails
Pkg::PkgSrcInstall - Select source of package for installation
Pkg::PkgSummary - Get summary (aka label) of a package
Pkg::PkgTaboo - Set package to taboo
Pkg::PkgUpdateAll - Update installed packages
Pkg::PkgVersion - Get version (better: edition) of a package
Pkg::Reset - Reset most internal stuff on the package manager.
Pkg::Reset - Reset most internal stuff on the package manager.Reset only packages set by the application, not by the user
Pkg::RestoreState - Restore Saved state - do not use, not implemented
Pkg::RpmChecksig - Check signature of RPM
Pkg::SaveState - Save the current selection state - do not use, not implemented
Pkg::SetBackupPath - set current path for update backup of rpm config files
V. Access to packagemanager
Pkg::IsAnyResolvable - Is there any resolvable in the requried state?
Pkg::ResolvableCountPatches - Count patches which will be selected by ResolvablePreselectPatches() function
Pkg::ResolvableDependencies -
Pkg::ResolvableInstall - Install all resolvables with selected name and kind
Pkg::ResolvableInstallArchVersion - Install all resolvables with selected name, architecture and kind. Use it only in a special case, ResolvableInstall() should be prefrerred.
Pkg::ResolvableNeutral - Remove all transactions from all resolvables with selected name and kind
Pkg::ResolvablePreselectPatches - Preselect patches for auto online update during the installation
Pkg::ResolvableProperties - Return properties of resolvable
Pkg::ResolvableRemove - Removes all resolvables with selected name and kind
Pkg::ResolvableSetSoftLock - Soft lock - it prevents the solver from re-selecting itemif it's recommended (if it's required it will be selected).
VI. Access to Installation Target
Pkg::TargetBlockSize - Return block size of partition at directory
Pkg::TargetCapacity - return capacity of partition at directory
Pkg::TargetDisableSources - Disable all sources configured on the target. Typicallyused on upgrade.
Pkg::TargetFileHasOwner - returns true if the file is owned by a package
Pkg::TargetFinish - finish target usage
Pkg::TargetGetDU - return current DU calculations
Pkg::TargetInit - Initialize Target and load resolvables
Pkg::TargetInitDU - Initialize Disk Usage Calculation
Pkg::TargetInitialize - Initialize Target, read the keys.
Pkg::TargetInstall - install rpm package by filename
Pkg::TargetLoad - Load target resolvables into the pool
Pkg::TargetLogfile - init logfile for target
Pkg::TargetProducts - Return list of maps of all installed products
Pkg::TargetRebuildDB - call "rpm --rebuilddb"
Pkg::TargetRemove - Install package by name
Pkg::TargetStoreRemove - remove all resolvables from the DB in the target system (removes only metadata in the package manager!)
Pkg::TargetUsed - Return usage of partition at directory
VII. Access to Patch Manager
Pkg::YouGetDirectory - obsoleted, do not use
Pkg::YouGetServers - obsoleted, do not use
Pkg::YouGetUserPassword - obsoleted, do not use
Pkg::YouProcessPatche - obsoleted, do not use
Pkg::YouRemovePackages - - obsoleted, do not use
Pkg::YouRetrievePatchInfo - obsoleted, do not use
Pkg::YouSelectPatches - obsoleted, do not use
Pkg::YouSetServer - obsoleted, do not use
Pkg::YouSetUserPassword - obsoleted, do not use
Pkg::YouStatus - obsoleted, do not use
VIII. Register Package Manager callbacks
Pkg::CallbackAcceptFileWithoutChecksum - Register callback function
Pkg::CallbackAcceptNonTrustedGpgKey - Register callback function
Pkg::CallbackAcceptUnknownDigest - Register callback function
Pkg::CallbackAcceptUnknownGpgKey - Register callback function
Pkg::CallbackAcceptUnsignedFile - Register callback function
Pkg::CallbackAcceptVerificationFailed - Register callback function
Pkg::CallbackAcceptWrongDigest - Register callback function
Pkg::CallbackFinishDeltaApply - Register callback function
Pkg::CallbackFinishDeltaDownload - Register callback function
Pkg::CallbackFinishPatchDownload - Register callback function
Pkg::CallbackImportGpgKey - Register callback function
Pkg::CallbackMessage - Register callback function
Pkg::CallbackProblemDeltaApply - Register callback function
Pkg::CallbackProblemDeltaDownload - Register callback function
Pkg::CallbackProblemPatchDownload - Register callback function
Pkg::CallbackProgressDeltaApply - Register callback function
Pkg::CallbackProgressDeltaDownload - Register callback function
Pkg::CallbackProgressPatchDownload - Register callback function
Pkg::CallbackScriptFinish - Register callback function
Pkg::CallbackScriptProblem - Register callback function
Pkg::CallbackScriptProgress - Register callback function
Pkg::CallbackScriptStart - Register callback function
Pkg::CallbackSourceCreateEnd - Register callback function
Pkg::CallbackSourceCreateError - Register callback function
Pkg::CallbackSourceCreateStart - Register callback function
Pkg::CallbackSourceProbeEnd - Register callback function
Pkg::CallbackSourceProbeError - Register callback function
Pkg::CallbackSourceProbeFailed - Register callback function
Pkg::CallbackSourceProbeProgress - Register callback function
Pkg::CallbackSourceProbeStart - Register callback function
Pkg::CallbackSourceProbeStart - Register callback function
Pkg::CallbackSourceProbeSucceeded - Register callback function
Pkg::CallbackSourceProgressData - Register callback function
Pkg::CallbackSourceReportEnd - Register callback function
Pkg::CallbackSourceReportError - Register callback function
Pkg::CallbackSourceReportProgress - Register callback function
Pkg::CallbackStartDeltaApply - Register callback function
Pkg::CallbackStartDeltaDownload - Register callback function
Pkg::CallbackStartPatchDownload - Register callback function
Pkg::CallbackTrustedKeyAdded - Register callback function
Pkg::CallbackTrustedKeyRemoved - Register callback function