/[gentoo]/src/packages/daily.py
Gentoo

Diff of /src/packages/daily.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
71db = ebuilddb.db_connect() 71db = ebuilddb.db_connect()
72c = db.cursor() 72c = db.cursor()
73 73
74extra = '' 74extra = ''
75if arch: 75if arch:
76 stable_extra = ('ebuild.arch REGEXP "^%s| %s" '
77 ' AND ebuild.prevarch NOT REGEXP"^%s| %s"'
78 % (arch,arch,arch,arch))
79 testing_extra = ('ebuild.arch REGEXP "^~%s| ~%s" '
80 ' AND ebuild.prevarch NOT REGEXP "^~%s| ~%s"'
81 % (arch,arch,arch,arch))
76 if branch == 'stable': 82 if branch == 'stable':
77 extra = ' AND ebuild.arch REGEXP "^%s| %s" ' % (arch,arch) 83 extra = ' AND (%s) ' % stable_extra
78 elif branch == 'testing': 84 elif branch == 'testing':
79 extra = ' AND ebuild.arch REGEXP "^~%s| ~%s" ' % (arch,arch) 85 extra = ' AND (%s) ' % testing_extra
80 else: 86 else:
81 extra = ' AND ebuild.arch LIKE "%%%s%%" ' % arch 87 extra = ' AND ((%s) OR (%s)) ' % (stable_extra, testing_extra)
82 88
83query = ('SELECT ebuild.category,' 89query = ('SELECT ebuild.category,'
84 'ebuild.name,' 90 'ebuild.name,'
85 'version,' 91 'version,'
86 'when_found,' 92 'when_found,'
87 'description,' 93 'description,'
107 113
108# cache to file, if not todays date 114# cache to file, if not todays date
109if today[:3] != (year,month,day): 115if today[:3] != (year,month,day):
110 filename = os.path.join(config.LOCALHOME,'daily','cache', 116 filename = os.path.join(config.LOCALHOME,'daily','cache',
111 '%d%02d%02d-%s-%s.html' % (year,month,day,arch,branch)) 117 '%d%02d%02d-%s-%s.html' % (year,month,day,arch,branch))
112 open(filename,'w').write(s) 118 open(filename,'w').write(s)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20