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

Diff of /src/packages/gentoo.py

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

Revision 1.9 Revision 1.10
1#!/usr/bin/python -O 1#!/usr/bin/python -O
2"""These functions mainly take ebuild info (grabbed from the database and 2"""These functions mainly take ebuild info (grabbed from the database and
3 convert it to HTML. See the "main" function at the bottom.""" 3 convert it to HTML. See the "main" function at the bottom."""
4 4
5__revision__ = "$Revision: 1.9 $" 5__revision__ = "$Revision: 1.10 $"
6# $Source: /var/cvsroot/gentoo/src/packages/gentoo.py,v $ 6# $Source: /var/cvsroot/gentoo/src/packages/gentoo.py,v $
7 7
8import config 8import config
9import os 9import os
10import time 10import time
292 292
293def get_most_recent(db, max=config.MAXPERPAGE, arch="", branch="", new = False): 293def get_most_recent(db, max=config.MAXPERPAGE, arch="", branch="", new = False):
294 c = db.cursor() 294 c = db.cursor()
295 extra = '' 295 extra = ''
296 if arch: 296 if arch:
297 stable_extra = ('ebuild.arch REGEXP "^%s| %s" ' 297 stable_extra = ('ebuild.arch REGEXP "^%s[[:>:]]|[[:blank:]]%s[[:>:]]" '
298 ' AND ebuild.prevarch NOT REGEXP"^%s| %s"'
299 % (arch,arch,arch,arch)) 298 % (arch,arch))
300 testing_extra = ('ebuild.arch REGEXP "^~%s| ~%s" ' 299 testing_extra = ('ebuild.arch REGEXP "[~]%s[[:>:]]" ' % arch)
301 ' AND ebuild.prevarch NOT REGEXP "^~%s| ~%s"'
302 % (arch,arch,arch,arch))
303 if branch == 'stable': 300 if branch == 'stable':
304 extra = ' AND (%s) ' % stable_extra 301 extra = ' AND (%s) ' % stable_extra
305 elif branch == 'testing': 302 elif branch == 'testing':
306 extra = ' AND (%s) ' % testing_extra 303 extra = ' AND (%s) ' % testing_extra
307 else: 304 else:

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20