| 1 | #!/usr/bin/python -O |
1 | #!/usr/bin/python -O |
| 2 | |
2 | |
| 3 | __revision__ = '$Revision: 1.5 $' |
3 | __revision__ = '$Revision: 1.6 $' |
| 4 | # $Source: /var/cvsroot/gentoo/src/packages/ebuilddb.py,v $ |
4 | # $Source: /var/cvsroot/gentoo/src/packages/ebuilddb.py,v $ |
| 5 | |
5 | |
| 6 | import config |
6 | import config |
| 7 | import sys |
7 | import sys |
| 8 | import os |
8 | import os |
| … | |
… | |
| 149 | def is_masked(tree, ebuild): |
149 | def is_masked(tree, ebuild): |
| 150 | """Return true if packages is masked in tree""" |
150 | """Return true if packages is masked in tree""" |
| 151 | return (not tree.visible(['%(category)s/%(name)s-%(version)s' % ebuild])) |
151 | return (not tree.visible(['%(category)s/%(name)s-%(version)s' % ebuild])) |
| 152 | |
152 | |
| 153 | def main(): |
153 | def main(): |
|
|
154 | """Main program entry point""" |
|
|
155 | # We need to "fake" as repoman so portage will ignore local system |
|
|
156 | # settings |
|
|
157 | os.environ['PORTAGE_CALLER'] = 'repoman' |
|
|
158 | |
| 154 | ebuilds = find_ebuilds() |
159 | ebuilds = find_ebuilds() |
| 155 | db = db_connect() |
160 | db = db_connect() |
| 156 | |
161 | |
| 157 | sys.path = ["/usr/lib/portage/pym"]+sys.path |
162 | sys.path = ["/usr/lib/portage/pym"]+sys.path |
| 158 | import portage |
163 | import portage |