Module package :: Class Package
[hide private]
[frames] | no frames]

Class Package

source code

Package management. Returned Package NEVRA+ objects:

Instance Methods [hide private]
 
__init__(self, apply=True, importkeys=False) source code
dict
install(self, names)
Install packages by name.
source code
dict
uninstall(self, names)
Uninstall (erase) packages by name.
source code
dict
update(self, names=None)
Update installed packages.
source code
Class Methods [hide private]
tuple
summary(cls, tsInfo, states=('i', 'u'))
Get transaction summary.
source code
tuple
installed(cls, tsInfo)
Get transaction summary for installed packages.
source code
tuple
erased(cls, tsInfo)
Get transaction summary for erased packages.
source code
Method Details [hide private]

summary(cls, tsInfo, states=('i', 'u'))
Class Method

source code 

Get transaction summary.

Parameters:
  • tsInfo (YumTransaction) - A yum transaction.
  • states (tuple|list) - A list of yum transaction states.
Returns: tuple
(resolved[],deps[])

installed(cls, tsInfo)
Class Method

source code 

Get transaction summary for installed packages.

Parameters:
  • tsInfo (YumTransaction) - A yum transaction.
Returns: tuple
(resolved[],deps[])

erased(cls, tsInfo)
Class Method

source code 

Get transaction summary for erased packages.

Parameters:
  • tsInfo (YumTransaction) - A yum transaction.
Returns: tuple
(resolved[],deps[])

__init__(self, apply=True, importkeys=False)
(Constructor)

source code 
Parameters:
  • apply (bool) - Apply changes (not dry-run).
  • importkeys (bool) - Allow the import of GPG keys.

install(self, names)

source code 

Install packages by name.

Parameters:
  • names ([str,]) - A list of package names.
Returns: dict
Packages installed. {resolved=[Package,],deps=[Package,]}
Decorators:
  • @remote
  • @pam(user= 'root')

uninstall(self, names)

source code 

Uninstall (erase) packages by name.

Parameters:
  • names (list) - A list of package names to be removed.
Returns: dict
Packages uninstalled (erased). {resolved=[Package,],deps=[Package,]}
Decorators:
  • @remote
  • @pam(user= 'root')

update(self, names=None)

source code 

Update installed packages. When (names) is not specified, all packages are updated.

Parameters:
  • names ([str,]) - A list of package names.
Returns: dict
Packages installed (updated). {resolved=[Package,],deps=[Package,]}
Decorators:
  • @remote
  • @pam(user= 'root')