]> git.pld-linux.org Git - projects/pld-ftp-admin.git/blame - bin/pfa-genindex
- add 'separate_noarch' config option (on for Th and off for Ac)
[projects/pld-ftp-admin.git] / bin / pfa-genindex
CommitLineData
df78f748
MM
1#!/usr/bin/env python
2# vi: encoding=utf-8 ts=8 sts=4 sw=4 et
3
4import sys, os
5sys.path.insert(0, os.environ['HOME']+'/pld-ftp-admin/modules')
6from common import checkdir
796b7867 7from config import ftp_dir,all_ftp_archs
df78f748
MM
8import ftpio
9
10if len(sys.argv) < 2:
11 print "Not enough parameters given"
12 print "gen-indexes.py tree [tree2...]"
13 sys.exit(1)
14
15trees=sys.argv[1:]
16
17for tree in trees:
18 checkdir(tree)
19
20ftpio.connect('gen-indexes')
21
22locked=[]
23
24for tree in trees:
25 if ftpio.lock(tree, True):
26 locked.append(tree)
27 else:
28 print "%s tree already locked" % tree
29 for i in locked:
30 ftpio.unlock(i)
31 sys.exit(1)
32
33home=os.environ['HOME']
34
35for tree in trees:
36 print '-------------------------- %s --------------------------' % tree
796b7867 37 for arch in all_ftp_archs:
df78f748 38 print 'ARCHITECTURE: %s' % arch
88a312c9 39 os.system('%s.stat/bin/poldek --cachedir=%s/tmp/poldek --conf %s.stat/etc/poldek.conf -s %s%s/%s/RPMS/ --mkidxz --mkidx-type pdir' %
df78f748
MM
40 (ftp_dir,home,ftp_dir,ftp_dir,tree,arch))
41
42for tree in trees:
43 ftpio.unlock(tree)
44
This page took 0.062108 seconds and 4 git commands to generate.