[MacPorts] #12596: "list must have an even number of elements"

MacPorts noreply at macports.org
Mon Oct 13 20:58:59 PDT 2008


#12596: "list must have an even number of elements"
--------------------------------------+-------------------------------------
  Reporter:  david.reitter at gmail.com  |       Owner:  mww at macports.org  
      Type:  defect                   |      Status:  assigned          
  Priority:  Normal                   |   Milestone:  MacPorts base bugs
 Component:  base                     |     Version:  1.5.0             
Resolution:                           |    Keywords:                    
      Port:                           |  
--------------------------------------+-------------------------------------

Comment(by chris at behanna.org):

 Replying to [comment:9 chris@…]:

 A slightly better version, IMHO, as it points out that the problem stems
 back to a malformed Portfile:

 {{{
 --- base/src/receipt1.0/receipt_flat.tcl.orig   2008-10-13
 23:34:15.000000000 -0400
 +++ base/src/receipt1.0/receipt_flat.tcl        2008-10-13
 23:54:53.000000000 -0400
 @@ -181,7 +181,11 @@

                 # Remove any line starting with #
                 while {[regexp "(^|\n)#.*\n(.*)\$" $receipt_contents match
 foo receipt_contents]} {}
 -               array set receipt_$ref $receipt_contents
 +               if { [catch {array set receipt_$ref $receipt_contents}
 rcpterr] } {
 +                       puts "Malformed package receipt for $name $version
 $revision $variants"
 +                       puts "receipt_contents = '$receipt_contents'"
 +                       error $rcpterr
 +               }
         } else {
                 # This is old Images format
 }}}

 The problem was an extra newline in the Portfile.  There's no way I could
 have figured that out from the original error message.

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


More information about the macports-tickets mailing list