- 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>
- Set up arch in __init__.py as it's needed for logging
- 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>
- 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', 'product_path', 'Packages')
config.set('default', 'cachedir', '/var/cache/pungi')
config.set('default', 'arch', yum.rpmUtils.arch.getBaseArch())
# set configs from cli options
config.set('default', 'name', opts.name)

View File

@ -15,8 +15,6 @@
import logging
import os
import subprocess
import yum
import os
class PungiBase():
"""The base Pungi class. Set up config items and logging here"""
@ -24,16 +22,6 @@ class PungiBase():
def __init__(self, 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.workdir = os.path.join(self.config.get('default', 'destdir'),