YaST2 Package Manager
YaST2 Package Manager
Package-Manager Builtins
SUSE Linux AG
YaST2
Team
SUSE Linux AG
Copyright © 2004 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::SourceSetRamCache
- Obsoleted function, do not use
Pkg::SourceStartManager
- Make sure the InstSrcManager is up and knows all available InstSrces.
Pkg::SourceStartCache
- Make sure the InstSrcManager is up, and return the list of SrcIds.
Pkg::SourceCleanupBroken
- Clean up all sources that were not properly restored on the lastcall of SourceStartManager or SourceStartCache.
Pkg::SourceGetCurrent
- Return the list of all InstSrc Ids.
Pkg::SourceReleaseAll
- Release all medias hold by all sources
Pkg::SourceSaveAll
- Save all InstSrces.
Pkg::SourceFinishAll
- Save and then disable all InstSrces.
Pkg::SourceGeneralData
- Get general data about the source
Pkg::SourceURL
- Get full source URL, including password
Pkg::SourceMediaData
- Return media data about the source
Pkg::SourceProductData
- Return Product data about the source
Pkg::SourceProduct
- Obsoleted function, do not use, see SourceProductData builtin
Pkg::SourceProvideFile
- Make a file available at the local filesystem
Pkg::SourceProvideOptionalFile
- Make an optional file available at the local filesystem
Pkg::SourceProvideDir
- make a directory available at the local filesystem
Pkg::SourceChangeUrl
- Change Source URL
Pkg::SourceInstallOrder
- not implemented, do not use (Explicitly set an install order.)
Pkg::SourceCacheCopyTo
- Copy cache data of all installation sources to the target
Pkg::SourceScan
- Scan a Source Media
Pkg::SourceCreate
- Create a Source
Pkg::SourceSetEnabled
- Set the default activation state of an InsrSrc.
Pkg::SourceSetAutorefresh
- Set whether this source should automaticaly refresh it'smeta data when it gets enabled. (default true, if not CD/DVD)
Pkg::SourceFinish
- Disable an Installation Source
Pkg::SourceRefreshNow
- Attempt to immediately refresh a Source
Pkg::SourceDelete
- Delete a Source
Pkg::SourceEditGet
- Get state of Sources
Pkg::SourceEditSet
- Rearange known InstSrces rank and default state
Pkg::SourceMoveDownloadArea
- Move download area of CURL-based sources to specified directory
II. PkgModuleFunctions constructor, destructor and call handling
Pkg::Connect
- Explicitly connect to the package manager, if it is already connected do nothing
Pkg::InstSysMode
- obsoleted - do not use
Pkg::SetLocale
- Set Prefered Locale
Pkg::GetLocale
- get the currently preferred locale
Pkg::SetAdditionalLocales
- set list of additional locales
Pkg::GetAdditionalLocales
- return list of additional locales
Pkg::LastError
- get current error as string
Pkg::LastErrorDetails
- get current error details as string
Pkg::LastErrorId
- Obsoleted function, do not use
Pkg::Init
- completely initialize package management, throw away the current status
III. Access to Package Selection Manager
Pkg::GetSelections
- Return list of selections matching given status - obsoleted, use ResolvableProperties() instead
Pkg::GetPatterns
- Return list of patterns matching given status (obsoleted, use ResolvableProperties())
Pkg::PatternData
- Get Pattern Data
Pkg::SelectionData
- Get Selection Data
Pkg::SelectionContent
- Get list of packages listed in a selection
Pkg::SetSelection
- Set a new selection - obsoleted, use ResolvableInstall() instead
Pkg::ClearSelection
- Clear a selected selection - obsoleted, use ResolvableRemove() instead
Pkg::ActivateSelections
- Activate all selected selections - obsoleted, use PkgSolve() instead
IV. Access to packagemanager
Pkg::PkgQueryProvides
- List all package instances providing 'tag'
Pkg::PkgMediaNames
- Return names of sources in installation order
Pkg::PkgMediaSizes
- Return size of packages to be installed
Pkg::PkgMediaCount
- Return number of packages to be installed
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::IsAvailable
- Check if package (tag) is available
Pkg::DoProvide
- Install a list of packages to the system
Pkg::DoRemove
- Removes a list of packges from the system
Pkg::PkgSummary
- Get summary (aka label) of a package
Pkg::PkgVersion
- Get version (better: edition) of a package
Pkg::PkgSize
- Get (installed) size of a package
Pkg::PkgGroup
- Get rpm group of a package
Pkg::PkgProperties
- Return information about a package
Pkg::PkgLocation
- Get file location of a package in the source
Pkg::PkgPath
- Path to a package path in the source
Pkg::PkgGetFilelist
- Get File List of a package
Pkg::SaveState
- Save the current selection state - do not use, not implemented
Pkg::RestoreState
- Restore Saved state - do not use, not implemented
Pkg::ClearSaveState
- clear a saved state (to reduce memory consumption) - do not use, not implemented
Pkg::IsManualSelection
- Check Status of Selections and if they have changed
Pkg::PkgAnyToDelete
- Check if there are any package to be deleted
Pkg::AnyToInstall
- Check if there are any package to be installed
Pkg::FilterPackages
- Get list of packages depending on how they were selected
Pkg::GetPackages
- Get list of packages (installed, selected, available, to be removed)
Pkg::PkgUpdateAll
- Update Packages marked for installation
Pkg::PkgInstall
- Select package for installation
Pkg::PkgSrcInstall
- Select source of package for installation
Pkg::PkgDelete
- Select package for deletion
Pkg::PkgTaboo
- Set package to taboo
Pkg::PkgNeutral
- Set package to neutral (drop install/delete flags)
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::PkgSolve
- Solve current package dependencies
Pkg::PkgEstablish
- establish the pool state
Pkg::PkgFreshen
- check all package freshens and schedule matching ones for installation
Pkg::PkgSolveCheckTargetOnly
- Solve packages currently installed on target system.
Pkg::PkgSolveErrors
- Returns number of fails
Pkg::PkgCommit
- Commit package changes (actually install/delete packages)
Pkg::GetBackupPath
- get current path for update backup of rpm config files
Pkg::SetBackupPath
- set current path for update backup of rpm config files
Pkg::CreateBackups
- whether to create package backups during install or removal
Pkg::PkgGetLicenseToConfirm
- Return Licence Text
Pkg::PkgGetLicensesToConfirm
- Return Licence Text of several packages
Pkg::PkgMarkLicenseConfirmed
- Mark licence of the package confirmed
Pkg::RpmChecksig
- Check signature of RPM
V. Access to packagemanager
Pkg::ResolvableInstall
- Install all resolvables with selected name and kind
Pkg::ResolvableRemove
- Removes all resolvables with selected name and kind
Pkg::ResolvableNeutral
- Remove all transactions from 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).
Pkg::ResolvableProperties
- Return properties of resolvable
Pkg::ResolvablePreselectPatches
- Preselect patches for auto online update during the installation
VI. Access to Installation Target
Pkg::TargetInit
- Initialize Target
Pkg::TargetDisableSources
- Disable all sources configured on the target. Typicallyused on upgrade.
Pkg::TargetFinish
- finish target usage
Pkg::TargetInstall
- install rpm package by filename
Pkg::TargetRemove
- Install package by name
Pkg::TargetLogfile
- init logfile for target
Pkg::TargetCapacity
- return capacity of partition at directory
Pkg::TargetUsed
- Return usage of partition at directory
Pkg::TargetBlockSize
- Return block size of partition at directory
Pkg::TargetProducts
- Return list of maps of all installed products
Pkg::TargetRebuildDB
- call "rpm --rebuilddb"
Pkg::TargetInitDU
- Initialize Disk Usage Calculation
Pkg::TargetGetDU
- return current DU calculations
Pkg::TargetFileHasOwner
- returns true if the file is owned by a package
VII. Access to Patch Manager
Pkg::YouStatus
- obsoleted, do not use
Pkg::YouSetServer
- obsoleted, do not use
Pkg::YouGetUserPassword
- obsoleted, do not use
Pkg::YouSetUserPassword
- obsoleted, do not use
Pkg::YouGetServers
- obsoleted, do not use
Pkg::YouGetDirectory
- obsoleted, do not use
Pkg::YouRetrievePatchInfo
- obsoleted, do not use
Pkg::YouProcessPatche
- obsoleted, do not use
Pkg::YouSelectPatches
- obsoleted, do not use
Pkg::YouRemovePackages
- - obsoleted, do not use
VIII. Register Package Manager callbacks
Pkg::CallbackProgressSourceRefresh
- Register a callback function
Pkg::CallbackImportGpgKey
- Register callback function
Pkg::CallbackAcceptUnknownGpgKey
- Register callback function
Pkg::CallbackAcceptUnsignedFile
- Register callback function
Pkg::CallbackAcceptFileWithoutChecksum
- Register callback function
Pkg::CallbackAcceptVerificationFailed
- Register callback function
Pkg::CallbackAcceptWrongDigest
- Register callback function
Pkg::CallbackAcceptUnknownDigest
- Register callback function
Pkg::CallbackTrustedKeyAdded
- Register callback function
Pkg::CallbackTrustedKeyRemoved
- Register callback function