- Set arch using rpmUtils, and do it in /usr/bin/pungi

This commit is contained in:
Jesse Keating 2007-08-27 10:39:12 -04:00 committed by Jesse Keating
parent c53ff26201
commit 54737ebb70
3 changed files with 2 additions and 12 deletions

View File

@ -1,6 +1,7 @@
* Mon Aug 27 2007 Jesse Keating <jkeating@redhat.com> * Mon Aug 27 2007 Jesse Keating <jkeating@redhat.com>
- Set up arch in __init__.py as it's needed for logging - Set up arch in __init__.py as it's needed for logging
- Add support for $releasever in repo uris. - Add support for $releasever in repo uris.
- Set arch using rpmUtils, and do it in /usr/bin/pungi
* Sun Aug 26 2007 Jesse Keating <jkeating@redhat.com> * Sun Aug 26 2007 Jesse Keating <jkeating@redhat.com>
- Add better support for %packages syntax using native pykickstart - Add better support for %packages syntax using native pykickstart

1
pungi
View File

@ -61,6 +61,7 @@ def main():
config.set('default', 'relnotepkgs', relnotepkgs) config.set('default', 'relnotepkgs', relnotepkgs)
config.set('default', 'product_path', 'Packages') config.set('default', 'product_path', 'Packages')
config.set('default', 'cachedir', '/var/cache/pungi') config.set('default', 'cachedir', '/var/cache/pungi')
config.set('default', 'arch', yum.rpmUtils.arch.getBaseArch())
# set configs from cli options # set configs from cli options
config.set('default', 'name', opts.name) config.set('default', 'name', opts.name)

View File

@ -15,8 +15,6 @@
import logging import logging
import os import os
import subprocess import subprocess
import yum
import os
class PungiBase(): class PungiBase():
"""The base Pungi class. Set up config items and logging here""" """The base Pungi class. Set up config items and logging here"""
@ -24,16 +22,6 @@ class PungiBase():
def __init__(self, config): def __init__(self, config):
self.config = config self.config = config
hostarch = os.uname()[4]
if hostarch in yum.rpmUtils.arch.getArchList('athlon'):
config.set('default', 'arch', 'i386')
elif hostarch == 'ppc':
config.set('default', 'arch', 'ppc')
elif hostarch == 'sparc':
config.set('default', 'arch', 'sparc')
else:
config.set('default', 'arch', hostarch)
self.doLoggerSetup() self.doLoggerSetup()
self.workdir = os.path.join(self.config.get('default', 'destdir'), self.workdir = os.path.join(self.config.get('default', 'destdir'),