diff --git a/cli.py b/cli.py
index ef362d5..588e5e5 100644
--- a/cli.py
+++ b/cli.py
@@ -37,7 +37,7 @@ import yum.Errors
 import yum.logginglevels
 import yum.misc
 import yum.plugins
-import rpmUtils.arch
+from rpmUtils.arch import isMultiLibArch
 import rpmUtils.miscutils
 from yum.packages import parsePackages
 from yum import _
@@ -1046,7 +1046,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
         installedByKey = self.rpmdb.searchNevra(name=pkg.name)
         comparable = []
         for instpo in installedByKey:
-            if rpmUtils.arch.isMultiLibArch(instpo.arch) == rpmUtils.arch.isMultiLibArch(pkg.arch):
+            if isMultiLibArch(instpo.arch) == isMultiLibArch(pkg.arch):
                 comparable.append(instpo)
             else:
                 self.verbose_logger.log(yum.logginglevels.DEBUG_3,
diff --git a/rpmUtils/arch.py b/rpmUtils/arch.py
index e88cbde..0b43946 100644
--- a/rpmUtils/arch.py
+++ b/rpmUtils/arch.py
@@ -380,3 +380,33 @@ def getBaseArch(myarch=None):
     
         return basearch
         
+
+class ArchStorage(object):
+    """class for keeping track of what arch we have set and doing various 
+       permutations based on it"""
+    def __init__(self):
+        self.canonarch = None 
+        self.basearch = None
+        self.bestarch = None
+        self.compatarch = None
+        self.archlist = []
+        self.multilib = False
+        self.setup_arch()
+
+    def setup_arch(self, arch=None):
+        if arch:
+            self.canonarch = arch
+        else:
+            self.canonarch = getCanonArch()
+        
+        self.basearch = getBaseArch(myarch=self.canonarch)
+        self.archlist = getArchList(thisarch=self.canonarch)
+        self.bestarch = getBestArch(myarch=self.canonarch)
+        self.compatarch = getMultiArchInfo(arch=self.canonarch)
+        self.multilib = isMultiLibArch(arch=self.canonarch)
+
+
+    def get_best_arch_from_list(self,archlist, fromarch=None):
+        if not fromarch:
+            fromarch = self.canonarch
+        return getBestArchFromList(archlist, myarch=fromarch)
diff --git a/yum/__init__.py b/yum/__init__.py
index 53f03f9..d10c03d 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -44,7 +44,7 @@ import Errors
 import rpmsack
 import rpmUtils.updates
 import rpmUtils.arch
-from rpmUtils.arch import getCanonArch, archDifference, canCoinstall
+from rpmUtils.arch import canCoinstall, getBaseArch, ArchStorage
 import rpmUtils.transaction
 import comps
 import config
@@ -101,7 +101,8 @@ class _YumPreBaseConf:
         self.syslog_ident = None
         self.syslog_facility = None
         self.syslog_device = '/dev/log'
-
+        self.arch = None
+        self.releasever = None
 
 class YumBase(depsolve.Depsolve):
     """This is a primary structure and base class. It houses the objects and
@@ -129,9 +130,10 @@ class YumBase(depsolve.Depsolve):
         self.localPackages = [] # for local package handling
 
         self.mediagrabber = None
-
+        self.arch = ArchStorage()
         self.preconf = _YumPreBaseConf()
 
+
     def __del__(self):
         self.close()
         self.closeRpmDB()
@@ -203,6 +205,13 @@ class YumBase(depsolve.Depsolve):
         syslog_ident    = self.preconf.syslog_ident
         syslog_facility = self.preconf.syslog_facility
         syslog_device   = self.preconf.syslog_device
+        releasever = self.preconf.releasever
+        arch = self.preconf.arch
+
+        if arch: # if preconf is setting an arch we need to pass that up
+            self.arch.setup_arch(arch)
+        else:
+            arch = self.arch.canonarch
 
         #  We don't want people accessing/altering preconf after it becomes
         # worthless. So we delete it, and thus. it'll raise AttributeError
@@ -215,6 +224,9 @@ class YumBase(depsolve.Depsolve):
             fn = '/etc/yum.conf'
 
         startupconf = config.readStartupConfig(fn, root)
+        startupconf.arch = arch
+        startupconf.basearch = self.arch.basearch
+
         if startupconf.gaftonmode:
             global _
             _ = yum.i18n.dummy_wrapper
@@ -227,6 +239,8 @@ class YumBase(depsolve.Depsolve):
             startupconf.syslog_ident = syslog_ident
         if syslog_facility != None:
             startupconf.syslog_facility = syslog_facility
+        if releasever != None:
+            startupconf.releasever = releasever
 
         self.doLoggingSetup(startupconf.debuglevel, startupconf.errorlevel,
                             startupconf.syslog_ident,
@@ -481,7 +495,7 @@ class YumBase(depsolve.Depsolve):
         self.verbose_logger.debug(_('Setting up Package Sacks'))
         sack_st = time.time()
         if not archlist:
-            archlist = rpmUtils.arch.getArchList()
+            archlist = self.arch.archlist
         
         archdict = {}
         for arch in archlist:
@@ -864,11 +878,10 @@ class YumBase(depsolve.Depsolve):
     def _getPackagesToRemoveAllArch(self,po):
         ''' get all compatible arch packages in pkgSack'''
         pkgs = []
-        if rpmUtils.arch.isMultiLibArch():
-            archs = rpmUtils.arch.getArchList() 
+        if self.arch.multilib:
             n,a,e,v,r = po.pkgtup
             # skip for all compat archs
-            for a in archs:
+            for a in self.arch.archlist:
                 pkgtup = (n,a,e,v,r)
                 matched = self.pkgSack.searchNevra(n,e,v,r,a) 
                 pkgs.extend(matched)
@@ -882,10 +895,9 @@ class YumBase(depsolve.Depsolve):
 
     def _skipFromTransaction(self,po):
         skipped =  []
-        archs = rpmUtils.arch.getArchList() 
         n,a,e,v,r = po.pkgtup
         # skip for all compat archs
-        for a in archs:
+        for a in self.arch.archlist:
             pkgtup = (n,a,e,v,r)
             if self.tsInfo.exists(pkgtup):
                 for txmbr in self.tsInfo.getMembers(pkgtup):
@@ -2222,7 +2234,7 @@ class YumBase(depsolve.Depsolve):
                     # sure we'll catch it if its added later in this transaction
                     pkgs = self.pkgSack.searchNevra(name=condreq)
                     if pkgs:
-                        if rpmUtils.arch.isMultiLibArch():
+                        if self.arch.multilib:
                             if self.conf.multilib_policy == 'best':
                                 use = []
                                 best = rpmUtils.arch.legitMultiArchesInSameLib()
@@ -2628,7 +2640,7 @@ class YumBase(depsolve.Depsolve):
 
                 
                 # only do these things if we're multilib
-                if rpmUtils.arch.isMultiLibArch():
+                if self.arch.multilib:
                     if was_pattern or not nevra_dict['arch']: # and only if they
                                                               # they didn't specify an arch
                         if self.conf.multilib_policy == 'best':
@@ -3099,7 +3111,7 @@ class YumBase(depsolve.Depsolve):
         # do this: but it's not a config file sort of thing
         # FIXME: Should add noarch, yum localinstall works ...
         # just rm this method?
-        if po.arch not in rpmUtils.arch.getArchList():
+        if po.arch not in self.arch.archlist:
             self.logger.critical(_('Cannot add package %s to transaction. Not a compatible architecture: %s'), pkg, po.arch)
             return tx_return
         
@@ -3185,7 +3197,7 @@ class YumBase(depsolve.Depsolve):
             self.verbose_logger.log(logginglevels.INFO_2,
                 _('Examining %s: %s'), po.localpath, po)
 
-        if po.arch not in rpmUtils.arch.getArchList():
+        if po.arch not in self.arch.archlist:
             self.logger.critical(_('Cannot add package %s to transaction. Not a compatible architecture: %s'), pkg, po.arch)
             return []
 
@@ -3269,7 +3281,7 @@ class YumBase(depsolve.Depsolve):
             self.verbose_logger.log(logginglevels.INFO_2,
                 _('Examining %s: %s'), po.localpath, po)
 
-        if po.arch not in rpmUtils.arch.getArchList():
+        if po.arch not in self.arch.archlist:
             self.logger.critical(_('Cannot add package %s to transaction. Not a compatible architecture: %s'), pkg, po.arch)
             return []
 
diff --git a/yum/config.py b/yum/config.py
index fd3ad7b..4737bd1 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -29,7 +29,6 @@ from iniparse import INIConfig
 from iniparse.compat import NoSectionError, NoOptionError, ConfigParser
 from iniparse.compat import ParsingError
 import rpmUtils.transaction
-import rpmUtils.arch
 import Errors
 
 # Alter/patch these to change the default checking...
@@ -771,9 +770,10 @@ def readStartupConfig(configfile, root):
     for path in startupconf.pluginpath:
         if not path[0] == '/':
             raise Errors.ConfigError("All plugin search paths must be absolute")
-
     # Stuff this here to avoid later re-parsing
     startupconf._parser = parser
+    # setup the release ver here
+    startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg)
 
     return startupconf
 
@@ -789,9 +789,9 @@ def readMainConfig(startupconf):
 
     # Set up substitution vars
     yumvars = _getEnvVar()
-    yumvars['basearch'] = rpmUtils.arch.getBaseArch()          # FIXME make this configurable??
-    yumvars['arch'] = rpmUtils.arch.getCanonArch()             # FIXME make this configurable??
-    yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
+    yumvars['basearch'] = startupconf.basearch
+    yumvars['arch'] = startupconf.arch
+    yumvars['releasever'] = startupconf.releasever
 
     # Read [main] section
     yumconf = YumConf()
diff --git a/yum/update_md.py b/yum/update_md.py
index b297704..c15bae4 100644
--- a/yum/update_md.py
+++ b/yum/update_md.py
@@ -113,6 +113,8 @@ class UpdateNotice(object):
             head += "Description : %s\n" % '\n'.join(desc)
 
         #  Get a list of arches we care about:
+        #XXX ARCH CHANGE - what happens here if we set the arch - we need to
+        # pass this in, perhaps
         arches = set(rpmUtils.arch.getArchList())
 
         filelist = "      Files :"
