[MacPorts] #20874: interactive mode falsely reports PortIndex incompatible or corrupt

MacPorts noreply at macports.org
Tue Dec 22 03:50:00 PST 2009


#20874: interactive mode falsely reports PortIndex incompatible or corrupt
--------------------------+-------------------------------------------------
 Reporter:  senz@…        |       Owner:  macports-tickets@…                   
     Type:  defect        |      Status:  new                                  
 Priority:  Normal        |   Milestone:  MacPorts Future                      
Component:  base          |     Version:  1.8.0                                
 Keywords:                |        Port:                                       
--------------------------+-------------------------------------------------

Comment(by edward@…):

 I ''might'' have discovered the source of this problem, and would like a
 second set of eyes to verify my diving down the correct rabbit hole.

 The problem lies not with PortIndex being corrupt, but with the internal
 cache of PortIndex.quick becoming stale. When macport1.0 layer of MacPorts
 is initialized, among other things it calls _mports_load_quickindex, which
 eagerly loads each source's PortIndex.quick into a global  array.

 When we run mportsync, it is possible that PortIndex for a source will get
 updated, in which case the data we cached from PortIndex.quick at launch
 time is likely no longer valid. The problem is that we never refresh this
 cached version from PortIndex.quick, so we are seeking to arbitrary places
 in PortIndex; when we seek to the middle of a index entry (which we are
 bound to do repeatedly) parsing will fail resulting in the litany of
 exceptions see above.

 I will be attaching a patch shortly to this ticket which resolves this
 issue on my end. I have not tested it against multiple sources, and would
 not mind someone doing so. Other thoughts and comments are also welcome.

-- 
Ticket URL: <http://trac.macports.org/ticket/20874#comment:10>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list