[svn] r3607 - trunk/tools/yam

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Thu Sep 29 14:19:54 CEST 2005


Author: dag
Date: 2005-09-29 14:19:53 +0200 (Thu, 29 Sep 2005)
New Revision: 3607

Modified:
   trunk/tools/yam/ChangeLog
   trunk/tools/yam/Makefile
   trunk/tools/yam/TODO
   trunk/tools/yam/yam
   trunk/tools/yam/yam.spec
Log:
Added cachedir config option (used by createrepo as md5 cache)

Modified: trunk/tools/yam/ChangeLog
===================================================================
--- trunk/tools/yam/ChangeLog	2005-09-28 19:16:29 UTC (rev 3606)
+++ trunk/tools/yam/ChangeLog	2005-09-29 12:19:53 UTC (rev 3607)
@@ -11,6 +11,7 @@
 - Added architectures ppc64pseries and ppc64iseries to ppc (Tim Verhoeven)
 - Added lftp-mirror-options config option
 - Fixed a bug with the metadata config option (Alain Rykaert)
+- Added cachedir config option (used by createrepo as md5 cache)
 
 * 0.7.3 - released 25/03/2005
 - Added ia64 support (Gareth Armstrong)

Modified: trunk/tools/yam/Makefile
===================================================================
--- trunk/tools/yam/Makefile	2005-09-28 19:16:29 UTC (rev 3606)
+++ trunk/tools/yam/Makefile	2005-09-29 12:19:53 UTC (rev 3607)
@@ -10,6 +10,7 @@
 httpddir = $(sysconfdir)/httpd/conf.d
 initrddir = $(sysconfdir)/rc.d/init.d
 
+cachedir = $(localstatedir)/cache/yam
 htmldir = $(datadir)/yam/html
 srcdir = $(localstatedir)/yam
 wwwdir = $(localstatedir)/www/yam
@@ -28,6 +29,7 @@
 
 	install -d -m0755 $(DESTDIR)$(srcdir)/{all/local,iso}/
 	install -d -m0755 $(DESTDIR)$(wwwdir)
+	install -d -m0755 $(DESTDIR)$(cachedir)
 	
 	@if [ -z "$(DESTDIR)" -a -x "/sbin/chkconfig" ]; then \
 		/sbin/chkconfig --add yam; \

Modified: trunk/tools/yam/TODO
===================================================================
--- trunk/tools/yam/TODO	2005-09-28 19:16:29 UTC (rev 3606)
+++ trunk/tools/yam/TODO	2005-09-29 12:19:53 UTC (rev 3607)
@@ -16,7 +16,6 @@
 + Create anaconda-style metadata for booting an updated installation
 + Create group information (createrepo -g comps.xml RPMS.os)   
 + Complain when a required tool is not available
-+ Make createrepo use md5sum caching
 + Check directory inode's mtime to force metadata generation
 
 ### Reporting utility

Modified: trunk/tools/yam/yam
===================================================================
--- trunk/tools/yam/yam	2005-09-28 19:16:29 UTC (rev 3606)
+++ trunk/tools/yam/yam	2005-09-29 12:19:53 UTC (rev 3607)
@@ -132,6 +132,7 @@
 			else:
 				die(6, 'Error accessing file: %s' % self.configfile)
 
+		self.cachedir = self.getoption('main', 'cachedir', '/var/cache/yam')
 		self.htmldir = self.getoption('main', 'htmldir', '/usr/share/yam/html')
 #		self.lockfile = self.getoption('main', 'lockfile', '/var/run/yam.pid')
 		self.pxelinux = self.getoption('main', 'pxelinux', '/usr/lib/syslinux/pxelinux.0')
@@ -140,7 +141,7 @@
 		self.wwwdir = self.getoption('main', 'wwwdir', '/var/www/yam')
 
 		self.arch = self.getoption('main', 'arch', 'i386')
-		self.metadata = self.getoption('main', 'metadata', 'apt yum createrepo'))
+		self.metadata = self.getoption('main', 'metadata', 'apt yum createrepo')
 
 		self.quiet = not self.getoption('main', 'quiet', 'no') in disable
 		if op.verbose == 1 and self.quiet:
@@ -353,7 +354,7 @@
 	def createrepo(self):
 		"Create a new-style Yum repository"
 		if not cf.cmd['createrepo']: return
-		opts = ''
+		opts = ' --cachedir ' + cf.cachedir
 		if op.verbose <= 1: opts = ' -q' + opts
 		elif op.verbose >= 3: opts = ' -v' + opts
 #		info(1, '%s: Create new-style Yum repository' % self.nick)

Modified: trunk/tools/yam/yam.spec
===================================================================
--- trunk/tools/yam/yam.spec	2005-09-28 19:16:29 UTC (rev 3606)
+++ trunk/tools/yam/yam.spec	2005-09-29 12:19:53 UTC (rev 3607)
@@ -63,8 +63,9 @@
 %config %{_initrddir}/yam
 %{_bindir}/yam
 %{_datadir}/yam/
+%{_localstatedir}/cache/yam/
+%{_localstatedir}/www/yam/
 %{_localstatedir}/yam/
-%{_localstatedir}/www/yam/
 
 %changelog
 * Tue Apr 26 2005 Dag Wieers <dag at wieers.com> - 0.8.0-1




More information about the commits mailing list