fabtools.rpm
¶
RPM packages¶
This module provides tools to manage CentOS/RHEL/SL/Fedora packages and repositories.
See also
-
fabtools.rpm.
update
(kernel=False)[source]¶ Upgrade all packages, skip obsoletes if
obsoletes=0
inyum.conf
.Exclude kernel upgrades by default.
-
fabtools.rpm.
upgrade
(kernel=False)[source]¶ Upgrade all packages, including obsoletes.
Exclude kernel upgrades by default.
-
fabtools.rpm.
groupupdate
(group, options=None)[source]¶ Update an existing software group, skip obsoletes if
obsoletes=1
inyum.conf
.Extra options may be passed to
yum
if necessary.
-
fabtools.rpm.
install
(packages, repos=None, yes=None, options=None)[source]¶ Install one or more RPM packages.
Extra repos may be passed to
yum
to enable extra repositories at install time.Extra yes may be passed to
yum
to validate license if necessary.Extra options may be passed to
yum
if necessary (e.g.['--nogpgcheck', '--exclude=package']
).import fabtools # Install a single package, in an alternative install root fabtools.rpm.install('emacs', options='--installroot=/my/new/location') # Install multiple packages silently fabtools.rpm.install([ 'unzip', 'nano' ], '--quiet')
-
fabtools.rpm.
groupinstall
(group, options=None)[source]¶ Install a group of packages.
You can use
yum grouplist
to get the list of groups.Extra options may be passed to
yum
if necessary like (e.g.['--nogpgcheck', '--exclude=package']
).import fabtools # Install development packages fabtools.rpm.groupinstall('Development tools')
-
fabtools.rpm.
uninstall
(packages, options=None)[source]¶ Remove one or more packages.
Extra options may be passed to
yum
if necessary.
-
fabtools.rpm.
groupuninstall
(group, options=None)[source]¶ Remove an existing software group.
Extra options may be passed to
yum
if necessary.
-
fabtools.rpm.
repolist
(status='', media=None)[source]¶ Get the list of
yum
repositories.Returns enabled repositories by default. Extra status may be passed to list disabled repositories if necessary.
Media and debug repositories are kept disabled, except if you pass media.
import fabtools # Install a package that may be included in disabled repositories fabtools.rpm.install('vim', fabtools.rpm.repolist('disabled'))