Install proper branding packages from repo (#813969)

The product string is not the best source for package names.
This commit is contained in:
Martin Gracik 2012-05-21 10:42:06 +02:00
parent a17746f69c
commit 910c54e394
2 changed files with 22 additions and 2 deletions

View File

@ -97,8 +97,6 @@ installpkg gnome-themes-standard gnome-icon-theme-legacy
## branding & logos ## branding & logos
installpkg fedora-gnome-theme fedora-icon-theme installpkg fedora-gnome-theme fedora-icon-theme
installpkg ${product.name}-logos
installpkg ${product.name}-release
## debugging/bug reporting tools ## debugging/bug reporting tools
installpkg gdb-gdbserver installpkg gdb-gdbserver

View File

@ -76,8 +76,30 @@ class RuntimeBuilder(object):
yum=yum, templatedir=templatedir) yum=yum, templatedir=templatedir)
self._runner.defaults = self.vars self._runner.defaults = self.vars
def _install_branding(self):
release = None
for pkg in self.yum.whatProvides('/etc/system-release', None, None):
if pkg.name.startswith('generic'):
continue
else:
release = pkg.name
break
if not release:
logger.error('could not get the release')
return
# release
logger.info('got release: %s', release)
self._runner.installpkg(release)
# logos
release, _suffix = release.split('-', 1)
self._runner.installpkg('%s-logos' % release)
def install(self): def install(self):
'''Install packages and do initial setup with runtime-install.tmpl''' '''Install packages and do initial setup with runtime-install.tmpl'''
self._install_branding()
self._runner.run("runtime-install.tmpl") self._runner.run("runtime-install.tmpl")
def writepkglists(self, pkglistdir): def writepkglists(self, pkglistdir):