Add back changes I missed somehow:

Fix srpm repodata making
This commit is contained in:
Jesse Keating 2008-04-16 22:22:14 -04:00
parent c0d44a06a6
commit b71ae43cc5
3 changed files with 16 additions and 8 deletions

View File

@ -1,7 +1,7 @@
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: pungi Name: pungi
Version: 1.2.14 Version: 1.2.15
Release: 1%{?dist} Release: 1%{?dist}
Summary: Distribution compose tool Summary: Distribution compose tool
@ -10,7 +10,7 @@ License: GPLv2
URL: https://fedorahosted.org/pungi URL: https://fedorahosted.org/pungi
Source0: https://fedorahosted.org/pungi/attachment/wiki/%{version}/%{name}-%{version}.tar.bz2 Source0: https://fedorahosted.org/pungi/attachment/wiki/%{version}/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: anaconda-runtime >= 11.4.0.41, yum => 3.2.13, repoview Requires: anaconda-runtime >= 11.4.0.67, yum => 3.2.13, repoview
BuildRequires: python-devel BuildRequires: python-devel
BuildArch: noarch BuildArch: noarch
@ -55,11 +55,16 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Wed Apr 16 2008 jkeating <jkeating@redhat.com> 1.2.14-1 * Wed Apr 16 2008 jkeating <jkeating@redhat.com> 1.2.15-1
- Disable comps cleanup until xslt is fixed - Disable comps cleanup until xslt is fixed
- Add support for yum repo costs - Add support for yum repo costs
- Adjust manifest for Fedora 9 (kernels, languages, flash) - Adjust manifest for Fedora 9 (kernels, languages, flash)
* Mon Apr 08 2008 Jesse Keating <jkeating@redhat.com> - 1.2.14-1
- Create repodata for source.
- Fix SRPM splittree making
- Bump anaconda require up for fixed splittree
* Tue Apr 01 2008 Jesse Keating <jkeating@redhat.com> - 1.2.13-1 * Tue Apr 01 2008 Jesse Keating <jkeating@redhat.com> - 1.2.13-1
- Use the yum api for merging comps. - Use the yum api for merging comps.

View File

@ -107,7 +107,8 @@ def main():
mypungi.topdir = os.path.join(config.get('default', 'destdir'), mypungi.topdir = os.path.join(config.get('default', 'destdir'),
config.get('default', 'version'), config.get('default', 'version'),
config.get('default', 'flavor'), config.get('default', 'flavor'),
'source', 'SRPM') 'source', 'SRPMS')
mypungi.doCreaterepo(comps=False)
if opts.do_all or opts.do_createiso: if opts.do_all or opts.do_createiso:
mypungi.doCreateIsos(split=opts.nosplitmedia) mypungi.doCreateIsos(split=opts.nosplitmedia)

View File

@ -114,11 +114,13 @@ class Pungi(pypungi.PungiBase):
# run the command # run the command
pypungi._doRunCommand(repoview, self.logger) pypungi._doRunCommand(repoview, self.logger)
def doCreaterepo(self): def doCreaterepo(self, comps=True):
"""Run createrepo to generate repodata in the tree.""" """Run createrepo to generate repodata in the tree."""
compsfile = os.path.join(self.workdir, '%s-%s-comps.xml' % (self.config.get('default', 'name'), self.config.get('default', 'version'))) compsfile = None
if comps:
compsfile = os.path.join(self.workdir, '%s-%s-comps.xml' % (self.config.get('default', 'name'), self.config.get('default', 'version')))
# setup the cache dirs # setup the cache dirs
for target in ['createrepocache', 'repoviewcache']: for target in ['createrepocache', 'repoviewcache']:
@ -283,7 +285,7 @@ class Pungi(pypungi.PungiBase):
timber.dist_dir = os.path.join(self.config.get('default', 'destdir'), timber.dist_dir = os.path.join(self.config.get('default', 'destdir'),
self.config.get('default', 'version'), self.config.get('default', 'version'),
self.config.get('default', 'flavor'), self.config.get('default', 'flavor'),
'source', 'SRPM') 'source', 'SRPMS')
timber.src_dir = os.path.join(self.config.get('default', 'destdir'), timber.src_dir = os.path.join(self.config.get('default', 'destdir'),
self.config.get('default', 'version'), self.config.get('default', 'version'),
self.config.get('default', 'flavor'), self.config.get('default', 'flavor'),
@ -550,7 +552,7 @@ cost=500
dirs = os.listdir(self.archdir) dirs = os.listdir(self.archdir)
for directory in dirs: for directory in dirs:
if directory.startswith('os-disc') or directory.startswith('SRPM-disc'): if directory.startswith('os-disc') or directory.startswith('SRPMS-disc'):
if os.path.exists(os.path.join(self.workdir, directory)): if os.path.exists(os.path.join(self.workdir, directory)):
shutil.rmtree(os.path.join(self.workdir, directory)) shutil.rmtree(os.path.join(self.workdir, directory))
shutil.move(os.path.join(self.archdir, directory), os.path.join(self.workdir, directory)) shutil.move(os.path.join(self.archdir, directory), os.path.join(self.workdir, directory))