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

Diff of /src/packages/query_ebuild.py

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

Revision 1.3 Revision 1.4
20if 0: 20if 0:
21 send_file = html_file 21 send_file = html_file
22else: 22else:
23 # let's try the database 23 # let's try the database
24 # connect 24 # connect
25 pieces = gentoo.portage.pkgsplit(ebuild) 25 pieces = gentoo.pkgsplit(ebuild)
26 name = pieces[0] 26 name = pieces[0]
27 if pieces[2] == 'r0': 27 if pieces[2] == 'r0':
28 version = pieces[1] 28 version = pieces[1]
29 else: 29 else:
30 version = '-'.join(pieces[1:]) 30 version = '-'.join(pieces[1:])
31 db = ebuilddb.db_connect() 31 db = ebuilddb.db_connect()
32 # query 32 # query
33 query = ('SELECT ebuild.category,ebuild.name,version,when_found,' 33 query = ('SELECT ebuild.category,ebuild.name,version,when_found,'
34 'description,changelog,arch,homepage,license ' 34 'description,changelog,arch,homepage,license,is_masked '
35 'FROM ebuild,package WHERE ebuild.name="%s" AND ' 35 'FROM ebuild,package WHERE ebuild.name="%s" AND '
36 'version="%s" AND ' 36 'version="%s" AND '
37 'ebuild.name=package.name AND ebuild.category=package.category ' 37 'ebuild.name=package.name AND ebuild.category=package.category '
38 'ORDER by when_found DESC LIMIT 1' % (name,version)) 38 'ORDER by when_found DESC LIMIT 1' % (name,version))
39 #print query 39 #print query
41 c.execute(query) 41 c.execute(query)
42 result = c.fetchone() 42 result = c.fetchone()
43 if result: 43 if result:
44 #print result 44 #print result
45 eb = gentoo.query_to_dict(result) 45 eb = gentoo.query_to_dict(result)
46 sys.stdout.write(gentoo.ebuild_to_html(eb,show_bugs=1)) 46 sys.stdout.write(gentoo.ebuild_to_html(eb,show_bugs=0, full=True))
47 sys.exit(0) 47 sys.exit(0)
48 # else 404 48 # else 404
49 else: 49 else:
50 send_file = os.path.join(PKG_DIR,"%s.html" % DEFAULT_EBUILD) 50 send_file = os.path.join(PKG_DIR,"%s.html" % DEFAULT_EBUILD)
51 51

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20