diff options
author | Paul Nasrat <pnasrat@redhat.com> | 2005-06-30 18:21:15 +0000 |
---|---|---|
committer | Paul Nasrat <pnasrat@redhat.com> | 2005-06-30 18:21:15 +0000 |
commit | 28ea383920ee48113227880e68bafd3fc92b08a6 (patch) | |
tree | b14221ecb3f9b86a70b553f8b2e17ce114e8a4c7 /yuminstall.py | |
parent | ec1b91ef580cfa3c7ec8a2cf07981d27f5ab6ba6 (diff) | |
download | anaconda-28ea383920ee48113227880e68bafd3fc92b08a6.tar.gz anaconda-28ea383920ee48113227880e68bafd3fc92b08a6.tar.xz anaconda-28ea383920ee48113227880e68bafd3fc92b08a6.zip |
Initial stubbing for yum back end
Diffstat (limited to 'yuminstall.py')
-rw-r--r-- | yuminstall.py | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/yuminstall.py b/yuminstall.py new file mode 100644 index 000000000..21e60df18 --- /dev/null +++ b/yuminstall.py @@ -0,0 +1,101 @@ +# +# Copyright (c) 2005 Red Hat, Inc. +# +# This software may be freely redistributed under the terms of the GNU +# library public license. +# +# You should have received a copy of the GNU Library Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# + +from flags import flags + +import yum +import yum.repos +from yum.config import yumconf + +class AnacondaYumConf(yumconf): + """Dynamic yum configuration""" + + def __init__( self, configfile = None, root = '/'): + self.configdata = { + 'debuglevel': 2, + 'errorlevel': 2, + 'retries': 10, + 'recent': 7, + 'cachedir': '/var/cache/yum', + 'logfile': '/tmp/anaconda-yum.log', + 'reposdir': [], + 'syslog_ident': None, + 'syslog_facility': 'LOG_USER', + 'distroverpkg': 'fedora-release', + 'installroot': root, + 'commands': [], + 'exclude': [], + 'failovermethod': 'roundrobin', + 'yumversion': 'unversioned', + 'proxy': None, + 'proxy_username': None, + 'proxy_password': None, + 'pluginpath': '/usr/lib/yum-plugins', + 'installonlypkgs': [], + 'kernelpkgnames': ['kernel','kernel-smp', + 'kernel-enterprise', 'kernel-bigmem', + 'kernel-BOOT']), + 'exactarchlist': ['kernel', 'kernel-smp', 'glibc', + 'kernel-hugemem', 'kernel-enterprise', + 'kernel-bigmem']), + 'tsflags': [], + 'assumeyes': False, + 'alwaysprompt': True, + 'exactarch': True, + 'tolerant': True, + 'diskspacecheck': True, + 'overwrite_groups': False, + 'keepalive': True, + 'gpgcheck': False, + 'obsoletes': False, + 'showdupesfromrepos': False, + 'enabled': True, + 'plugins': False, + 'enablegroups': True, + 'uid': 0, + 'cache': 0, + 'progress_obj': None, + 'timeout', 30.0, + } + + +class AnacondaYum(yum.YumBase): + + def __init__(self, method, id, intf, instPath): + self.updates = [] + self.localPackages = [] + + def doConfigSetup(self, fn=None, root='/'): + self.conf = AnacondaYumConf() + repo = yum.repos.Repository() + repo.set('baseurl','file:///mnt/source') + self.repos.add(repo) + + def errorlog(self, value, msg): + pass + + def filelog(self, value, msg): + pass + + def log(self, value, msg): + pass + +def doYumInstall(method, id, intf, instPath): + if flags.test: + return + +# XXX: Only operate on nfs trees for now + if not id.methodstr.startswith('nfs:/'): + from packages import doInstall + return doInstall(method, id, intf, instPath) + + + |