From 54737ebb70ad17a964c9d03b1ad9907200fa8994 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 27 Aug 2007 10:39:12 -0400 Subject: [PATCH] - Set arch using rpmUtils, and do it in /usr/bin/pungi --- Changelog | 1 + pungi | 1 + pypungi/__init__.py | 12 ------------ 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Changelog b/Changelog index b2b44625..9ef83ae2 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,7 @@ * Mon Aug 27 2007 Jesse Keating - 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 - Add better support for %packages syntax using native pykickstart diff --git a/pungi b/pungi index 6743e156..c2c73f37 100755 --- a/pungi +++ b/pungi @@ -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) diff --git a/pypungi/__init__.py b/pypungi/__init__.py index 93c2a1c6..de36fa83 100644 --- a/pypungi/__init__.py +++ b/pypungi/__init__.py @@ -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'),