[svn] r4751 - trunk/tools/yam

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Thu Sep 21 22:02:07 CEST 2006


Author: dag
Date: 2006-09-21 22:02:05 +0200 (Thu, 21 Sep 2006)
New Revision: 4751

Modified:
   trunk/tools/yam/ChangeLog
   trunk/tools/yam/yam
Log:
Fixed leftover repo name reference (Justin B Hochstetler)

Modified: trunk/tools/yam/ChangeLog
===================================================================
--- trunk/tools/yam/ChangeLog	2006-09-20 23:14:07 UTC (rev 4750)
+++ trunk/tools/yam/ChangeLog	2006-09-21 20:02:05 UTC (rev 4751)
@@ -2,6 +2,7 @@
 - Fixed a problem with specific python versions (Justin B Hochstetler)
 - Fixed the non-functional -r option
 - Apply -r option to repository generation as well
+- Fixed leftover repo name reference (Justin B Hochstetler)
 
 * 0.8.2 - Finally fixed - released 19/09/2006
 - Use exec in conjunction with system()

Modified: trunk/tools/yam/yam
===================================================================
--- trunk/tools/yam/yam	2006-09-20 23:14:07 UTC (rev 4750)
+++ trunk/tools/yam/yam	2006-09-21 20:02:05 UTC (rev 4751)
@@ -659,7 +659,7 @@
 			opts = opts + ' -n'
 		if os.path.exists(self.wwwdir):
 			if os.path.isdir(os.path.join(self.wwwdir, '.oldheaders')):
-				remove(os.path.join(repodir, '.oldheaders'))
+				remove(os.path.join(self.wwwdir, '.oldheaders'))
 			info(2, '%s: Create (old-style) yum repository for %s' % (self.dist.nick, self.name))
 			ret = run('%s %s -l %s' % (cf.cmd['yumarch'], opts, self.wwwdir))
 			if ret:
@@ -1318,6 +1318,16 @@
 	if not cf.cmd['createrepo'] and not cf.cmd['yumarch'] and not cf.cmd['genbasedir']:
 		error(1, 'No tools found to generate repository metadata. Please install apt, yum or createrepo.')
 
+	### Set proxy-related environment variables
+	if cf.no_proxy:
+		os.environ['no_proxy'] = cf.no_proxy
+	if cf.ftp_proxy:
+		os.environ['ftp_proxy'] = cf.ftp_proxy
+	if cf.http_proxy:
+		os.environ['http_proxy'] = cf.http_proxy
+	if cf.https_proxy:
+		os.environ['https_proxy'] = cf.https_proxy
+
 	### List the distributions in order of appearance
 	if not op.dists:
 		dists = cf.dists
@@ -1332,19 +1342,8 @@
 			if not append:
 				error(1, 'Distribution %s not defined' % name)
 
-	### Set proxy-related environment variables
-	if cf.no_proxy:
-		os.environ['no_proxy'] = cf.no_proxy
-	if cf.ftp_proxy:
-		os.environ['ftp_proxy'] = cf.ftp_proxy
-	if cf.http_proxy:
-		os.environ['http_proxy'] = cf.http_proxy
-	if cf.https_proxy:
-		os.environ['https_proxy'] = cf.https_proxy
-
 	### Mounting and mirroring available distributions/repositories
 	for dist in dists:
-
 		dist.findisos()
 		### Mount ISOs
 		if dist.isos:
@@ -1360,7 +1359,7 @@
 			for repo in dist.listrepos(op.repos):
 				if not dist.lock('update', repo.name):
 					continue
-				if repo in ('os', 'core'):
+				if repo.name in ('os', 'core'):
 					if not dist.isos:
 						repo.mirror()
 				elif repo in dist.listrepos():



More information about the svn-commits mailing list