/[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.14 Revision 1.16.2.6
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.14 $" 5__revision__ = "$Revision: 1.16.2.6 $"
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
11import string
12import sys 11import sys
13import ebuilddb 12import ebuilddb
14import bugs 13import bugs
15import changelogs 14import changelogs
16from cgi import escape 15from cgi import escape
17from urllib import quote 16from urllib import quote
18 17from portage_versions import pkgcmp, pkgsplit
19endversion={"pre":-2,"p":0,"alpha":-4,"beta":-3,"rc":-1}
20# as there's no reliable way to set {}.keys() order
21# netversion_keys will be used instead of endversion.keys
22# to have fixed search order, so that "pre" is checked
23# before "p"
24endversion_keys = ["pre", "p", "alpha", "beta", "rc"]
25 18
26def is_new(db, ebuild): 19def is_new(db, ebuild):
27 """Check for newness.""" 20 """Check for newness."""
28 21
29 c = db.cursor() 22 c = db.cursor()
33 results = c.fetchall() 26 results = c.fetchall()
34 if len(results) == 1 and results[0][0]: 27 if len(results) == 1 and results[0][0]:
35 return 1 28 return 1
36 return 0 29 return 0
37 30
38def changelog_to_html(changelog): 31changelog_to_html = changelogs.bugs_to_html
39 """HTML-ize a changelog entry"""
40 html = ""
41 for char in changelog:
42 if char == '\n':
43 html = "%s<br>" % html
44 else:
45 html = "%s%s" % (html, escape(char))
46 html = changelogs.bugs_to_html(html)
47 return html
48 32
49def homepage_to_html(homepage): 33def homepage_to_html(homepage):
50 """convert HOMEPAGE entry to HTML""" 34 """convert HOMEPAGE entry to HTML"""
51 if not homepage.strip(): 35 if not homepage.strip():
52 return "?" 36 return "?"
67 if not license.strip(): return "?" 51 if not license.strip(): return "?"
68 license = license.replace('|',' ') 52 license = license.replace('|',' ')
69 license = license.replace('(', '') 53 license = license.replace('(', '')
70 license = license.replace(')', '') 54 license = license.replace(')', '')
71 pieces = license.split() 55 pieces = license.split()
72 html = ['<a href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/*checkout*/' 56 html = ['<a href="http://sources.gentoo.org/viewcvs.py/*checkout*/'
73 'licenses/%s">%s</a>' % (piece, piece) for piece in pieces] 57 'gentoo-x86/licenses/%s">%s</a>' % (piece, piece) for piece in pieces]
74 return '<br>\n'.join(html) 58 return '<br>\n'.join(html)
75 59
76def package_to_html(pkginfo, db, full=False): 60def package_to_html(pkginfo, db, full=False):
77 """This function needs a database (db) connection because it performs a 61 """This function needs a database (db) connection because it performs a
78 query_to_dict on the package""" 62 query_to_dict on the package"""
109 ) 93 )
110 rows = [] 94 rows = []
111 ebuilds.sort(cmp_ebuilds) 95 ebuilds.sort(cmp_ebuilds)
112 ebuilds.reverse() 96 ebuilds.reverse()
113 for ebuild in ebuilds: 97 for ebuild in ebuilds:
114 archs = ebuild['arch'].split() 98 archs = ebuild['arch'].split(',')
115 row_start = ('<tr>\n\t<th class="releases"><a href="%sebuilds/?%s-%s"' 99 row_start = ('<tr>\n\t<th class="releases"><a href="%sebuilds/?%s-%s"'
116 ' title="%s">%s</a></th>\n' % (config.FEHOME, 100 ' title="%s">%s</a></th>\n' % (config.FEHOME,
117 ebuild['name'], ebuild['version'], ebuild['time'], 101 ebuild['name'], ebuild['version'], ebuild['time'],
118 ebuild['version'])) 102 ebuild['version']))
119 row_data = [] 103 row_data = []
190 """This actually will (should) take either a package or ebuild dict 174 """This actually will (should) take either a package or ebuild dict
191 as an argument""" 175 as an argument"""
192 176
193 import forums 177 import forums
194 178
195 changelogurl = ('http://www.gentoo.org/cgi-bin/viewcvs.cgi/*checkout*/' 179 changelogurl = ('http://sources.gentoo.org/viewcvs.py/*checkout*/'
196 '%s/%s/ChangeLog' % (pkg['category'],pkg['name'])) 180 'gentoo-x86/%s/%s/ChangeLog' % (pkg['category'],pkg['name']))
197 cat_header = '<th class="category">Category</th>' 181 cat_header = '<th class="category">Category</th>'
198 license_header = '<th class="license">License</th>' 182 license_header = '<th class="license">License</th>'
199 category = ('<td class="category">' 183 category = ('<td class="category">'
200 '<a href="%spackages/?category=%s">%s</a></td>' % (config.FEHOME, 184 '<a href="%spackages/?category=%s">%s</a></td>' % (config.FEHOME,
201 pkg['category'], pkg['category'])) 185 pkg['category'], pkg['category']))
207 '<a href="%s">ChangeLog</a></td>' % changelogurl) 191 '<a href="%s">ChangeLog</a></td>' % changelogurl)
208 similar = ('<td class="similar" rowspan="2">' 192 similar = ('<td class="similar" rowspan="2">'
209 '%s</td>' % create_similar_pkgs_link(pkg)) 193 '%s</td>' % create_similar_pkgs_link(pkg))
210 related_bugs = ('<td class="related_bugs" rowspan="2">' 194 related_bugs = ('<td class="related_bugs" rowspan="2">'
211 '%s</td>' % create_related_bugs_link(pkg)) 195 '%s</td>' % create_related_bugs_link(pkg))
212 forums = ('<td class="forums" rowspan="2">' 196 forums_link = ('<td class="forums" rowspan="2">'
213 '%s</td>' % forums.create_forums_link(pkg)) 197 '%s</td>' % forums.create_forums_link(pkg))
214 198
215 return '\n\t'.join(['<table class="general_info">', 199 return '\n\t'.join(['<table class="general_info">',
216 '<tr>', 200 '<tr>',
217 cat_header, 201 cat_header,
218 homepage, 202 homepage,
219 license_header, 203 license_header,
220 changelog, 204 changelog,
221 similar, 205 similar,
222 related_bugs, 206 related_bugs,
223 forums, 207 forums_link,
224 '</tr>', 208 '</tr>',
225 '<tr>', 209 '<tr>',
226 category, 210 category,
227 license, 211 license,
228 '</tr>', 212 '</tr>',
229 '</table>']) 213 '</table>'])
230 214
231def create_similar_pkgs_link(pkg): 215def create_similar_pkgs_link(pkg):
232 """Create a link to similar packages""" 216 """Create a link to similar packages"""
233 217
234 def strip_chars(mystring): 218 return '<a href="/similar/?package=%(category)s/%(name)s">Similar</a>' % pkg
235 newstring = ''
236 for char in mystring:
237 if char not in string.punctuation:
238 newstring = newstring + char
239 else:
240 newstring = newstring + ' '
241 return newstring
242
243 description = strip_chars(pkg['description'].lower())
244
245 words = [word for word in description.split()
246 if word and len(word)>2 and word not in config.EXCLUDED_FROM_SIMILAR]
247 words = words[:config.SIMILAR_MAX_WORDS] + [pkg['name']]
248 #query = ['[[:<:]]%s[[:>:]].*' % word for word in words]
249 query = ['[[:<:]]%s.*' % word for word in words]
250 query = '(%s){%s,}' % ('|'.join(query), config.SIMILAR_MIN_MATCHES)
251 url = '%ssearch/?sstring=%s' % (config.FEHOME, escape(query))
252 return '<a href="%s">Similar</a>' % url
253 219
254def create_related_bugs_link(pkg): 220def create_related_bugs_link(pkg):
255 """Create a link to related bugs""" 221 """Create a link to related bugs"""
256 222
257 url = ('http://bugs.gentoo.org/buglist.cgi?query_format=' 223 url = ('http://bugs.gentoo.org/buglist.cgi?query_format='
292 258
293def get_most_recent(db, max=config.MAXPERPAGE, arch="", branch="", new = False): 259def get_most_recent(db, max=config.MAXPERPAGE, arch="", branch="", new = False):
294 c = db.cursor() 260 c = db.cursor()
295 extra = '' 261 extra = ''
296 if arch: 262 if arch:
297 stable_extra = ('ebuild.arch REGEXP "^%s[[:>:]]|[[:blank:]]%s[[:>:]]" ' 263 stable_extra = ('FIND_IN_SET("%s", ebuild.arch) > 0 AND '
298 % (arch,arch)) 264 'FIND_IN_SET("%s", ebuild.prevarch) = 0 ' % (arch, arch))
299 testing_extra = ('ebuild.arch REGEXP "[~]%s[[:>:]]" ' % arch) 265 testing_extra = ('FIND_IN_SET("~%s", ebuild.arch) > 0 AND '
266 'FIND_IN_SET("~%s", ebuild.prevarch) = 0 ' % (arch, arch))
300 if branch == 'stable': 267 if branch == 'stable':
301 extra = ' AND (%s) ' % stable_extra 268 extra = ' AND (%s) ' % stable_extra
302 elif branch == 'testing': 269 elif branch == 'testing':
303 extra = ' AND (%s) ' % testing_extra 270 extra = ' AND (%s) ' % testing_extra
304 else: 271 else:
305 extra = ' AND ((%s) OR (%s)) ' % (stable_extra, testing_extra) 272 extra = ' AND ((%s) OR (%s)) ' % (stable_extra, testing_extra)
306 273
307 if new: 274 if new:
308 extra = ('%s AND package.new=1 ' % extra) 275 extra = ('%s AND package.new=1 ' % extra)
309 276
310 query = """SELECT ebuild.category,ebuild.name,version,when_found,description, 277 query = """SELECT ebuild.category,ebuild.name,version,ebuild.when_found,description,
311 changelog,arch,homepage,license,is_masked FROM ebuild,package WHERE ebuild.name=\ 278 changelog,arch,homepage,license,is_masked FROM ebuild,package WHERE ebuild.name=\
312 package.name AND ebuild.category=package.category %s ORDER by when_found DESC \ 279 package.name AND ebuild.category=package.category %s ORDER by ebuild.when_found DESC \
313 LIMIT %s""" % (extra,max) 280 LIMIT %s""" % (extra,max)
314 c.execute(query) 281 c.execute(query)
315 results = c.fetchall() 282 results = c.fetchall()
316 return results 283 return results
317 284
357 """Compare two ebuilds""" 324 """Compare two ebuilds"""
358 fields_a = pkgsplit('%s-%s' % (a['name'], a['version'])) 325 fields_a = pkgsplit('%s-%s' % (a['name'], a['version']))
359 fields_b = pkgsplit('%s-%s' % (b['name'], b['version'])) 326 fields_b = pkgsplit('%s-%s' % (b['name'], b['version']))
360 return pkgcmp(fields_a, fields_b) 327 return pkgcmp(fields_a, fields_b)
361 328
362pkgcache={}
363
364def pkgsplit(mypkg,silent=1):
365 try:
366 if not pkgcache[mypkg]:
367 return None
368 return pkgcache[mypkg][:]
369 except KeyError:
370 pass
371 myparts=string.split(mypkg,'-')
372 if len(myparts)<2:
373 if not silent:
374 print "!!! Name error in",mypkg+": missing a version or name part."
375 pkgcache[mypkg]=None
376 return None
377 for x in myparts:
378 if len(x)==0:
379 if not silent:
380 print "!!! Name error in",mypkg+": empty \"-\" part."
381 pkgcache[mypkg]=None
382 return None
383 #verify rev
384 revok=0
385 myrev=myparts[-1]
386 if len(myrev) and myrev[0]=="r":
387 try:
388 int(myrev[1:])
389 revok=1
390 except SystemExit, e:
391 raise
392 except:
393 pass
394 if revok:
395 if ververify(myparts[-2]):
396 if len(myparts)==2:
397 pkgcache[mypkg]=None
398 return None
399 else:
400 for x in myparts[:-2]:
401 if ververify(x):
402 pkgcache[mypkg]=None
403 return None
404 #names can't have versiony looking parts
405 myval=[string.join(myparts[:-2],"-"),myparts[-2],myparts[-1]]
406 pkgcache[mypkg]=myval
407 return myval
408 else:
409 pkgcache[mypkg]=None
410 return None
411
412 elif ververify(myparts[-1],silent=silent):
413 if len(myparts)==1:
414 if not silent:
415 print "!!! Name error in",mypkg+": missing name part."
416 pkgcache[mypkg]=None
417 return None
418 else:
419 for x in myparts[:-1]:
420 if ververify(x):
421 if not silent:
422 print "!!! Name error in",mypkg+": multiple version parts."
423 pkgcache[mypkg]=None
424 return None
425 myval=[string.join(myparts[:-1],"-"),myparts[-1],"r0"]
426 pkgcache[mypkg]=myval[:]
427 return myval
428 else:
429 pkgcache[mypkg]=None
430 return None
431
432vercache={}
433def ververify(myorigval,silent=1):
434 try:
435 return vercache[myorigval]
436 except KeyError:
437 pass
438 if len(myorigval)==0:
439 if not silent:
440 print "!!! Name error: package contains empty \"-\" part."
441 return 0
442 myval=string.split(myorigval,'.')
443 if len(myval)==0:
444 if not silent:
445 print "!!! Name error: empty version string."
446 vercache[myorigval]=0
447 return 0
448 #all but the last version must be a numeric
449 for x in myval[:-1]:
450 if not len(x):
451 if not silent:
452 print "!!! Name error in",myorigval+": two decimal points in a row"
453 vercache[myorigval]=0
454 return 0
455 try:
456 foo=int(x)
457 except SystemExit, e:
458 raise
459 except:
460 if not silent:
461 print "!!! Name error in",myorigval+": \""+x+"\" is not a valid version component."
462 vercache[myorigval]=0
463 return 0
464 if not len(myval[-1]):
465 if not silent:
466 print "!!! Name error in",myorigval+": two decimal points in a row"
467 vercache[myorigval]=0
468 return 0
469 try:
470 foo=int(myval[-1])
471 vercache[myorigval]=1
472 return 1
473 except SystemExit, e:
474 raise
475 except:
476 pass
477 #ok, our last component is not a plain number or blank, let's continue
478 if myval[-1][-1] in string.lowercase:
479 try:
480 foo=int(myval[-1][:-1])
481 vercache[myorigval]=1
482 return 1
483 # 1a, 2.0b, etc.
484 except SystemExit, e:
485 raise
486 except:
487 pass
488 #ok, maybe we have a 1_alpha or 1_beta2; let's see
489 #ep="endpart"
490 ep=string.split(myval[-1],"_")
491 if len(ep)!=2:
492 if not silent:
493 print "!!! Name error in",myorigval
494 vercache[myorigval]=0
495 return 0
496 try:
497 foo=int(ep[0][-1])
498 chk=ep[0]
499 except SystemExit, e:
500 raise
501 except:
502 # because it's ok last char is not numeric. example: foo-1.0.0a_pre1
503 chk=ep[0][:-1]
504
505 try:
506 foo=int(chk)
507 except SystemExit, e:
508 raise
509 except:
510 #this needs to be numeric or numeric+single letter,
511 #i.e. the "1" in "1_alpha" or "1a_alpha"
512 if not silent:
513 print "!!! Name error in",myorigval+": characters before _ must be numeric or numeric+single letter"
514 vercache[myorigval]=0
515 return 0
516 for mye in endversion_keys:
517 if ep[1][0:len(mye)]==mye:
518 if len(mye)==len(ep[1]):
519 #no trailing numeric; ok
520 vercache[myorigval]=1
521 return 1
522 else:
523 try:
524 foo=int(ep[1][len(mye):])
525 vercache[myorigval]=1
526 return 1
527 except SystemExit, e:
528 raise
529 except:
530 #if no endversions work, *then* we return 0
531 pass
532 if not silent:
533 print "!!! Name error in",myorigval
534 vercache[myorigval]=0
535 return 0
536
537def relparse(myver):
538 "converts last version part into three components"
539 number=0
540 suffix=0
541 endtype=0
542 endnumber=0
543
544 mynewver=string.split(myver,"_")
545 myver=mynewver[0]
546
547 #normal number or number with letter at end
548 divider=len(myver)-1
549 if myver[divider:] not in "1234567890":
550 #letter at end
551 suffix=ord(myver[divider:])
552 number=string.atof(myver[0:divider])
553 else:
554 number=string.atof(myver)
555
556 if len(mynewver)==2:
557 #an endversion
558 for x in endversion_keys:
559 elen=len(x)
560 if mynewver[1][:elen] == x:
561 endtype=endversion[x]
562 try:
563 endnumber=string.atof(mynewver[1][elen:])
564 except:
565 endnumber=0
566 break
567 return [number,suffix,endtype,endnumber]
568
569# vercmp:
570# ripped from portage.py to prevent having to import
571vcmpcache={}
572def vercmp(val1,val2):
573 if val1==val2:
574 #quick short-circuit
575 return 0
576 valkey=val1+" "+val2
577 try:
578 return vcmpcache[valkey]
579 try:
580 return -vcmpcache[val2+" "+val1]
581 except KeyError:
582 pass
583 except KeyError:
584 pass
585
586 # consider 1_p2 vc 1.1
587 # after expansion will become (1_p2,0) vc (1,1)
588 # then 1_p2 is compared with 1 before 0 is compared with 1
589 # to solve the bug we need to convert it to (1,0_p2)
590 # by splitting _prepart part and adding it back _after_expansion
591 val1_prepart = val2_prepart = ''
592 if val1.count('_'):
593 val1, val1_prepart = val1.split('_', 1)
594 if val2.count('_'):
595 val2, val2_prepart = val2.split('_', 1)
596
597 # replace '-' by '.'
598 # FIXME: Is it needed? can val1/2 contain '-'?
599 val1=string.split(val1,'-')
600 if len(val1)==2:
601 val1[0]=val1[0]+"."+val1[1]
602 val2=string.split(val2,'-')
603 if len(val2)==2:
604 val2[0]=val2[0]+"."+val2[1]
605
606 val1=string.split(val1[0],'.')
607 val2=string.split(val2[0],'.')
608
609 #add back decimal point so that .03 does not become "3" !
610 for x in range(1,len(val1)):
611 if val1[x][0] == '0' :
612 val1[x]='.' + val1[x]
613 for x in range(1,len(val2)):
614 if val2[x][0] == '0' :
615 val2[x]='.' + val2[x]
616
617 # extend version numbers
618 if len(val2)<len(val1):
619 val2.extend(["0"]*(len(val1)-len(val2)))
620 elif len(val1)<len(val2):
621 val1.extend(["0"]*(len(val2)-len(val1)))
622
623 # add back _prepart tails
624 if val1_prepart:
625 val1[-1] += '_' + val1_prepart
626 if val2_prepart:
627 val2[-1] += '_' + val2_prepart
628 #The above code will extend version numbers out so they
629 #have the same number of digits.
630 for x in range(0,len(val1)):
631 cmp1=relparse(val1[x])
632 cmp2=relparse(val2[x])
633 for y in range(0,4):
634 myret=cmp1[y]-cmp2[y]
635 if myret != 0:
636 vcmpcache[valkey]=myret
637 return myret
638 vcmpcache[valkey]=0
639 return 0
640
641# pkgcmp:
642# ripped from portage.py to prevent having to import
643def pkgcmp(pkg1,pkg2):
644 """if returnval is less than zero, then pkg2 is newer than pkg1, zero if equal and positive if older."""
645 if pkg1[0] != pkg2[0]:
646 return None
647 mycmp=vercmp(pkg1[1],pkg2[1])
648 if mycmp>0:
649 return 1
650 if mycmp<0:
651 return -1
652 r1=int(pkg1[2][1:])
653 r2=int(pkg2[2][1:])
654 if r1>r2:
655 return 1
656 if r2>r1:
657 return -1
658 return 0
659
660def ebuilds_to_rss(fp, ebuilds, simple=False, subtitle=""): 329def ebuilds_to_rss(fp, ebuilds, simple=False, subtitle='', arch='', branch=''):
661 """write out ebuild info to RSS file (fp)""" 330 """write out ebuild info to RSS file (fp)"""
662 331
663 # web link for RSS feed 332 # web link for RSS feed
333 link = config.FEHOME
334 subtitle = subtitle
335 if arch != '':
336 link = '%sarchs/%s/' % (link, arch)
337 subtitle = '%s' % arch
338 if branch != '':
339 link = '%s%s/' % (link, branch)
340 subtitle = '%s %s' % (subtitle, branch)
341
342 title = 'packages.gentoo.org'
664 if subtitle: 343 if subtitle:
665 link = '%s/%s' % (config.FEHOME, subtitle.replace(' ','/',1)) 344 title = '%s [ %s ]' % (title, subtitle)
666 else:
667 link = config.FEHOME
668 345
669 pubDate = time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()) 346 pubDate = time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())
670 fp.write("""<?xml version="1.0" encoding="UTF-8"?> 347 fp.write("""<rss version="2.0">
671 <rss version="2.0">
672 <channel> 348 <channel>
673 <title>packages.gentoo.org [ %s ]</title> 349 <title>%s</title>
674 <link>%s</link> 350 <link>%s</link>
675 <description>Latest ebuilds from the Gentoo Linux portage tree</description> 351 <description>Latest ebuilds from the Gentoo Linux portage tree</description>
676 <webMaster>www@gentoo.org</webMaster> 352 <webMaster>www@gentoo.org</webMaster>
677 353
678 <image> 354 <image>
680 <url>%s</url> 356 <url>%s</url>
681 <link>%s</link> 357 <link>%s</link>
682 </image> 358 </image>
683 359
684 <managingEditor>marduk@gentoo.org</managingEditor> 360 <managingEditor>marduk@gentoo.org</managingEditor>
685 <pubDate>%s</pubDate>""" % (subtitle, link, config.RSS_IMAGE, 361 <pubDate>%s</pubDate>""" % (title, link, config.RSS_IMAGE,
686 config.FEHOME, pubDate)) 362 config.FEHOME, pubDate))
687 363
688 for ebuild in ebuilds: 364 for ebuild in ebuilds:
689 if simple: 365 if simple:
690 description = escape(ebuild['description']) 366 description = escape(ebuild['description'])
713 ebuild['time'].strftime("%a, %d %b %Y %H:%M:%S +0000")) 389 ebuild['time'].strftime("%a, %d %b %Y %H:%M:%S +0000"))
714 ) 390 )
715 391
716 fp.write("\n\ 392 fp.write("\n\
717 <textInput>\n\ 393 <textInput>\n\
718 <title>Search the Online Package Database</title>\n\ 394 <title>Search</title>\n\
719 <link>%s/search/</link>\n\ 395 <link>%s/search/</link>\n\
720 <description>emerge -Ss</description>\n\ 396 <description>Search the Online Package Database</description>\n\
721 <name>sstring</name>\n\ 397 <name>sstring</name>\n\
722 </textInput>\n\ 398 </textInput>\n\
723 </channel>\n\ 399 </channel>\n\
724 </rss>\n" % config.FEHOME) 400 </rss>\n" % config.FEHOME)
725 401
769 continue 445 continue
770 index.write("""</table>\n""") 446 index.write("""</table>\n""")
771 index.close() 447 index.close()
772 448
773 subtitle = ' %s %s' % (arch, branch) 449 subtitle = ' %s %s' % (arch, branch)
774 rss = open(os.path.join(config.LOCALHOME, "archs", arch, branch, 450 rss = open(
451 os.path.join(
452 config.LOCALHOME,
453 "archs",
454 arch,
455 branch,
775 config.RSS), 'w') 456 config.RSS
776 ebuilds_to_rss(rss, ebuilds, simple=False, subtitle=subtitle) 457 ),
458 'w'
459 )
460 ebuilds_to_rss(
461 rss,
462 ebuilds,
463 simple=False,
464 arch=arch,
465 branch=branch
466 )
777 rss.close() 467 rss.close()
778 468
779 rss2 = open(os.path.join(config.LOCALHOME, "archs", arch, branch, 469 rss2 = open(
470 os.path.join(
471 config.LOCALHOME,
472 "archs",
473 arch,
474 branch,
780 config.RSS2), 'w') 475 config.RSS2
781 ebuilds_to_rss(rss2, ebuilds, simple=True, subtitle=subtitle) 476 ),
477 'w'
478 )
479 ebuilds_to_rss(
480 rss2,
481 ebuilds,
482 simple=True,
483 arch=arch,
484 branch=branch
485 )
782 rss.close() 486 rss.close()
783 487
784if __name__ == '__main__': 488if __name__ == '__main__':
785 sys.exit(main()) 489 sys.exit(main())

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.16.2.6

  ViewVC Help
Powered by ViewVC 1.1.20