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

Diff of /src/packages/ebuilddb.py

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

Revision 1.7 Revision 1.8
1#!/usr/bin/python -O 1#!/usr/bin/python -O
2 2
3__revision__ = '$Revision: 1.7 $' 3__revision__ = '$Revision: 1.8 $'
4# $Source: /var/cvsroot/gentoo/src/packages/ebuilddb.py,v $ 4# $Source: /var/cvsroot/gentoo/src/packages/ebuilddb.py,v $
5 5
6import config 6import config
7import sys 7import sys
8import os 8import os
118 except IOError: 118 except IOError:
119 print 'Error opening %s' % filename 119 print 'Error opening %s' % filename
120 lines = [] 120 lines = []
121 lines = [ s.strip() for s in lines ] 121 lines = [ s.strip() for s in lines ]
122 try: 122 try:
123 ebuild['archs'] = lines[8] 123 ebuild['archs'] = ','.join(lines[8].split())
124 except IndexError: 124 except IndexError:
125 ebuild['archs'] = '' 125 ebuild['archs'] = ''
126 try: 126 try:
127 ebuild['homepage'] = lines[5] 127 ebuild['homepage'] = lines[5]
128 except IndexError: 128 except IndexError:
184 184
185 if not (result or rebuild): 185 if not (result or rebuild):
186 create_ebuild_record(db,fields) 186 create_ebuild_record(db,fields)
187 elif result and rebuild: 187 elif result and rebuild:
188 fields['prevarch'] = result[6] 188 fields['prevarch'] = result[6]
189 if ' ' in fields['prevarch']:
190 # old db layout
191 fields['prevarch'] = ','.join(fields['prevarch'].split())
189 fields['arch'] = [4] 192 fields['arch'] = [4]
190 update_ebuild_record(db, fields) 193 update_ebuild_record(db, fields)
194 elif rebuild:
195 pass
191 elif result[4] != fields['archs']: 196 elif result[4].split(',') != fields['archs'].split(','):
192 #print 'ebuild archs=',fields['archs'] 197 #print 'ebuild archs=',fields['archs']
193 #print 'db archs=',result[4] 198 #print 'db archs=',result[4]
194 #print 199 #print
195 # keywords change, update db 200 # keywords change, update db
196 fields['prevarch'] = result[4] 201 fields['prevarch'] = result[4]

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20