From f074a600de534c9e2324e89f796a9129b80994f8 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sep 12 2007 21:38:01 +0000 Subject: Use a better method to get the ks method into a repo. Requires a newer version of pykickstart, indicate such in the spec. --- diff --git a/pungi.spec b/pungi.spec index b0f6988..0198e1c 100644 --- a/pungi.spec +++ b/pungi.spec @@ -10,7 +10,7 @@ License: GPLv2 URL: http://hosted.fedoraproject.org/projects/pungi Source0: http://linux.duke.edu/projects/%{name}/release/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires: anaconda-runtime, yum => 3.0.3 +Requires: anaconda-runtime, yum => 3.0.3, pykickstart => 1.13 BuildRequires: python-devel BuildArch: noarch diff --git a/pypungi/gather.py b/pypungi/gather.py index c2ec90b..57439b3 100755 --- a/pypungi/gather.py +++ b/pypungi/gather.py @@ -100,12 +100,10 @@ class Gather(pypungi.PungiBase): arches.append('src') # throw source in there, filter it later # deal with our repos - # Check to see if method was url, add that to the repo list. - if ksparser.handler.method.url: - reponame = "ks-method-url" - repourl = ksparser.handler.method.url - newrepo = ksparser.handler.RepoData(name=reponame, baseurl=repourl) - ksparser.handler.repo.add(newrepo) + try: + ksparser.handler.repo.methodToRepo() + except: + pass for repo in ksparser.handler.repo.repoList: self.logger.info('Adding repo %s' % repo.name)