YaST Pkg Bindings-openSUSE 10.3

From openSUSE

Here is an overview of changes in Pkg Bindings in openSUSE 10.3 release (yast2-pkg-bindings-2.15.*):


Functions Divided into More Parts

Note: The old functions are still present for backward compatibility.

  • Pkg::SetLocale() and Pkg::GetLocale() were split into Pkg::Set/GetTextLocale(), Pkg::Set/GetPackageLocale() to set the communication language (error messages, callbacks...) and the language packages independently
  • Pkg::SourceCreate() — was split into Pkg::RepositoryAdd(), Pkg::RepositoryScan() and Pkg::RepositoryProbe() so adding a repository can be more fine-tuned


New Functions

  • Pkg::PkgDU() — computes disk usage of the package using the current partitioning
  • Pkg::IsAnyResolvable() — is there any resolvable in the required state (selected, installed...)? (Pkg::PkgAnyToInstall() and Pkg::PkgAnyToDelete() are obsoleted by this function.)
  • Pkg::PkgAvailable(), Pkg::PkgInstalled() — use package names for searching (Pkg::IsAvailable(), Pkg::IsProvided() use Provides property of packages)
  • Pkg::SourceProvideDirectory() — optional and/or recursive directory download from a repository, this is a generic call which obsoletes Pkg::SourceProvideDir()


Enhanced/Changed Functions

  • Pkg::PkgUpdateAll() — new options "silent_downgrades" and "keep_installed_patches" for solver during update
  • Pkg::SourceEditSet/Get() can retrieve and set alias of a source
  • Pkg::SourceMediaData() — dropped "media_id" and "media_vendor" tags from the result map, requires loaded resolvables in the pool to get the number of media
  • Pkg::ResolvableProperties() — returns also license with it's status for the required resolvable and type of the product (base vs. addon)
  • Pkg::LastError() — in addition to the error message there is also the history of exceptions in the result, the result is more detailed
  • Pkg::PkgMediaNames() — returns repository names instead of product names