[svn] r4741 - in trunk/tools/yam: . config/dists
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Tue Sep 19 06:17:10 CEST 2006
Author: dag
Date: 2006-09-19 06:17:10 +0200 (Tue, 19 Sep 2006)
New Revision: 4741
Modified:
trunk/tools/yam/ChangeLog
trunk/tools/yam/config/dists/centos2-i386.conf
trunk/tools/yam/config/dists/centos3.conf
trunk/tools/yam/config/dists/centos4.conf
trunk/tools/yam/config/dists/fc4.conf
trunk/tools/yam/config/dists/fc5.conf
trunk/tools/yam/config/dists/rhel2.1as.conf
trunk/tools/yam/config/dists/rhel3as-i386.conf
trunk/tools/yam/config/dists/rhel3as-x86_64.conf
trunk/tools/yam/config/dists/rhel4as.conf
trunk/tools/yam/config/dists/yd4.conf
trunk/tools/yam/yam
Log:
Repoview fixes.
Modified: trunk/tools/yam/ChangeLog
===================================================================
--- trunk/tools/yam/ChangeLog 2006-09-19 03:35:23 UTC (rev 4740)
+++ trunk/tools/yam/ChangeLog 2006-09-19 04:17:10 UTC (rev 4741)
@@ -8,6 +8,7 @@
- Don't create the repo srcdir since it might be a symlink (Gareth Armstrong)
- Create Repo class and moved repository-related functionality to this class
- Fixed groupfile option of createrepo (Bowie Bailey)
+- Fix repoview creation
* 0.8.1 - Long overdue - released 22/08/2006
- Added gensystemid to installation (Ian Forde)
Modified: trunk/tools/yam/config/dists/centos2-i386.conf
===================================================================
--- trunk/tools/yam/config/dists/centos2-i386.conf 2006-09-19 03:35:23 UTC (rev 4740)
+++ trunk/tools/yam/config/dists/centos2-i386.conf 2006-09-19 04:17:10 UTC (rev 4741)
@@ -4,7 +4,7 @@
[centos2-i386]
name = CentOS $release ($arch)
release = 2
-metadata = repomd yum
+metadata = repomd yum repoview
### ISO images
iso = http://mirror.centos.org/centos/$release/final/$arch-disc?.iso
Modified: trunk/tools/yam/config/dists/centos3.conf
===================================================================
--- trunk/tools/yam/config/dists/centos3.conf 2006-09-19 03:35:23 UTC (rev 4740)
+++ trunk/tools/yam/config/dists/centos3.conf 2006-09-19 04:17:10 UTC (rev 4741)
@@ -6,7 +6,7 @@
release = 3.7
#arch = i386 x86_64 ia64 s390 s390x
arch = i386
-metadata = repomd yum
+metadata = repomd yum repoview
### ISO images
iso = http://mirror.centos.org/pub/centos/$release/isos/$arch/CentOS-$release-$arch-bin?of3.iso
Modified: trunk/tools/yam/config/dists/centos4.conf
===================================================================
--- trunk/tools/yam/config/dists/centos4.conf 2006-09-19 03:35:23 UTC (rev 4740)
+++ trunk/tools/yam/config/dists/centos4.conf 2006-09-19 04:17:10 UTC (rev 4741)
@@ -6,7 +6,7 @@
release = 4
#arch = i386 x86_64 ia64 s390 s390x alpha
arch = i386
-metadata = repomd
+metadata = repomd repoview
### ISO images
iso = http://mirror.centos.org/pub/centos/$release/isos/$arch/CentOS-$release-$arch-bin?of4.iso
Modified: trunk/tools/yam/config/dists/fc4.conf
===================================================================
--- trunk/tools/yam/config/dists/fc4.conf 2006-09-19 03:35:23 UTC (rev 4740)
+++ trunk/tools/yam/config/dists/fc4.conf 2006-09-19 04:17:10 UTC (rev 4741)
@@ -5,7 +5,7 @@
name = Fedora Core $release ($arch)
release = 4
arch = i386
-metadata = apt repomd
+metadata = apt repomd repoview
### ISO images
iso = FC$release-$arch-disc?.iso
Modified: trunk/tools/yam/config/dists/fc5.conf
===================================================================
--- trunk/tools/yam/config/dists/fc5.conf 2006-09-19 03:35:23 UTC (rev 4740)
+++ trunk/tools/yam/config/dists/fc5.conf 2006-09-19 04:17:10 UTC (rev 4741)
@@ -6,7 +6,7 @@
release = 5
#arch = i386 x86_64 ppc
arch = i386
-metadata = repomd
+metadata = repomd repoview
### ISO images
iso = http://download.fedora.redhat.com/pub/fedora/linux/core/$version/$arch/iso/FC-$version-$arch-disc?.iso
Modified: trunk/tools/yam/config/dists/rhel2.1as.conf
===================================================================
--- trunk/tools/yam/config/dists/rhel2.1as.conf 2006-09-19 03:35:23 UTC (rev 4740)
+++ trunk/tools/yam/config/dists/rhel2.1as.conf 2006-09-19 04:17:10 UTC (rev 4741)
@@ -5,7 +5,7 @@
name = Red Hat Advanced Server $release U6 ($arch)
release = 2.1
arch = i386
-metadata = repomd yum
+metadata = repomd yum repoview
### ISO images
iso = RHEL${release}AS-U6-re1207.RC.0-i386-disc?.iso
Modified: trunk/tools/yam/config/dists/rhel3as-i386.conf
===================================================================
--- trunk/tools/yam/config/dists/rhel3as-i386.conf 2006-09-19 03:35:23 UTC (rev 4740)
+++ trunk/tools/yam/config/dists/rhel3as-i386.conf 2006-09-19 04:17:10 UTC (rev 4741)
@@ -5,7 +5,7 @@
name = Red Hat Advanced Server $release U8 ($arch)
release = 3
arch = i386
-metadata = repomd yum
+metadata = repomd yum repoview
### ISO images
iso = rhel-$release-u8-$arch-as-disc?.iso
Modified: trunk/tools/yam/config/dists/rhel3as-x86_64.conf
===================================================================
--- trunk/tools/yam/config/dists/rhel3as-x86_64.conf 2006-09-19 03:35:23 UTC (rev 4740)
+++ trunk/tools/yam/config/dists/rhel3as-x86_64.conf 2006-09-19 04:17:10 UTC (rev 4741)
@@ -5,7 +5,7 @@
name = Red Hat Advanced Server $release U8 ($arch)
release = 3
arch = x86_64
-metadata = repomd yum
+metadata = repomd yum repoview
### ISO images
iso = rhel-$release-u8-$arch-as-disc?.iso
Modified: trunk/tools/yam/config/dists/rhel4as.conf
===================================================================
--- trunk/tools/yam/config/dists/rhel4as.conf 2006-09-19 03:35:23 UTC (rev 4740)
+++ trunk/tools/yam/config/dists/rhel4as.conf 2006-09-19 04:17:10 UTC (rev 4741)
@@ -6,7 +6,7 @@
release = 4
#arch = i386 x86_64 ia64 ppc s390 s390x
arch = i386
-metadata = repomd yum
+metadata = repomd yum repoview
### ISO images
#iso = RHEL$release-U3-$arch-AS-disc?.iso
Modified: trunk/tools/yam/config/dists/yd4.conf
===================================================================
--- trunk/tools/yam/config/dists/yd4.conf 2006-09-19 03:35:23 UTC (rev 4740)
+++ trunk/tools/yam/config/dists/yd4.conf 2006-09-19 04:17:10 UTC (rev 4741)
@@ -4,7 +4,7 @@
name = Yellow Dog Linux $release ($arch)
release = 4.0
arch = ppc
-metadata = repomd
+metadata = repomd repoview
### ISO images
iso = yellowdog-$release-orion-20041107-install?.iso
Modified: trunk/tools/yam/yam
===================================================================
--- trunk/tools/yam/yam 2006-09-19 03:35:23 UTC (rev 4740)
+++ trunk/tools/yam/yam 2006-09-19 04:17:10 UTC (rev 4741)
@@ -207,7 +207,7 @@
self.rhndownloadall = self.getoption('main', 'rhn-download-all', 'no') not in disable
- self.skipmetadata = self.getoption('main', 'skip-metadata', 'all')
+# self.skipmetadata = self.getoption('main', 'skip-metadata', 'all')
self.shareiso = self.getoption('main', 'shareiso', 'yes') not in disable
@@ -524,15 +524,11 @@
def clean(self):
info(5, '%s: Removing %s symlinks' % (self.dist.nick, self.name))
- repodir = os.path.join(self.wwwdir, 'RPMS.' + self.name)
+ mkdir(self.wwwdir)
remove(glob.glob(os.path.join(self.wwwdir, '*.rpm')))
def linkall(self):
"Symlink all RPM packages that match a given arch"
-
- mkdir(self.wwwdir)
- mkdir(os.path.join(cf.wwwdir, self.dist.nick, 'RPMS.all'))
-
srcdir = os.path.join(cf.srcdir, 'all', self.name)
info(5, '%s: Symlink %s packages from %s' % (self.dist.nick, self.name, srcdir))
os.path.walk(os.path.join(cf.srcdir, 'all', self.name), rpmlink, (self.dist, self.name))
@@ -574,8 +570,8 @@
info(5, '%s: New repository %s detected.' % (self.dist.nick, self.name))
writesha1(sha1file + '.tmp', cursha1)
self.changed = True
- if 'all' not in cf.skipmetadata.split():
- self.repos['all'].new = True
+# if 'all' not in cf.skipmetadata.split():
+# self.repos['all'].new = True
def writesha1(self):
"Verify .newsha1sum and write a .sha1sum file per repository"
@@ -724,16 +720,21 @@
if not cf.cmd['repoview']:
return
opts = ''
+ if op.force:
+ opts = ' --force'
if op.verbose <= 2:
- opts = ' -q' + opts
+ opts = ' --quiet' + opts
if os.path.exists(self.wwwdir):
+ info(2, '%s: Create Repoview index for %s' % (self.dist.nick, self.name))
title = '%s repository for %s' % (self.name, self.dist.nick)
+ ret = run('%s %s --title="%s" %s' % (cf.cmd['repoview'], opts, title, self.wwwdir))
+ if ret:
+ raise(YamMirrorException('%s failed with return code: %s' % (cf.cmd['repoview'], ret)))
url = 'http://yam/%s/RPMS.%s/' % (self.dist.nick, self.name)
- info(2, '%s: Create Repoview index for %s' % (self.dist.nick, self.name))
- ret = run('%s %s -t "%s" -u "%s" -q %s' % (cf.cmd['repoview'], opts, title, url, self.wwwdir))
+ ret = run('%s %s --url="%s" %s' % (cf.cmd['repoview'], opts, url, self.wwwdir))
if ret:
raise(YamMirrorException('%s failed with return code: %s' % (cf.cmd['repoview'], ret)))
-
+
class YamMirrorException(Exception):
def __init__(self, value):
self.value = value
@@ -748,7 +749,6 @@
def sha1dir(dir):
"Return sha1sum of a directory"
- ### FIXME: Add file sizes and mtime to sha1sum
files = glob.glob(dir + '/*.rpm')
files.sort()
output = ''
@@ -1277,12 +1277,12 @@
return
def rpmlink((dist, repo), dirpath, filelist):
- as = ['noarch', ]
+ archlist = ['noarch', ]
if archs.has_key(dist.arch):
- as.extend(archs[dist.arch])
+ archlist.extend(archs[dist.arch])
else:
- as.extend(dist.arch)
- for arch in as:
+ archlist.extend(dist.arch)
+ for arch in archlist:
regexp = re.compile('.+[\._-]' + arch + '\.rpm$')
for file in filelist:
src = os.path.join(dirpath, file)
@@ -1380,18 +1380,15 @@
for dist in dists:
repos = dist.listrepos()
- ### FIXME: This got lost when introducing the Repo class
-# if dist.isos:
-# repos = repos + ['os']
-
info(1, '%s: Generating %s meta-data' % (dist.nick, dist.name))
if not dist.lock('generate'):
continue
dist.html()
- ### FIXME: This got lost when introducing the Repo class
-# dist.clean('all')
+ info(5, '%s: Removing %s symlinks' % (dist.nick, 'all'))
+ mkdir(os.path.join(cf.wwwdir, dist.nick, 'RPMS.all'))
+ remove(glob.glob(os.path.join(cf.wwwdir, dist.nick, 'RPMS.all', '*.rpm')))
for repo in repos:
# repo.lock()
More information about the svn-commits
mailing list