Small bug in ports.php

Juan Manuel Palacios jmpp at macports.org
Thu Nov 22 11:09:32 PST 2007


	Sometimes transcripts are the best:

[14:40] @<jmpp> there is a bug in ports.php by which multiple  
maintainers are listed as 'maintainer1maintainer2'
[14:40] @<jmpp> but I'll look into it later
[14:41] @<jmpp> I know where it originates
[14:41] @<jmpp> I made a change to how the sql instructions are  
created in PortIndex2MySQL
[14:41] @<jmpp> but I didn't adapt the ports.php client in turn
[14:41] @<jmpp> but, again, I'll look into it later ;)


	That bug might also affect the categories. From PortIndex2MySQL:

     set primary 1
     foreach category $categories {
         set category [sql_escape $category]
         puts $sqlfile_fd "INSERT INTO categories VALUES ('$portname',  
'$category', $primary);"
         incr primary
     }

     set primary 1
     foreach maintainer $maintainers {
         set maintainer [sql_escape $maintainer]
         puts $sqlfile_fd "INSERT INTO maintainers VALUES  
('$portname', '$maintainer', $primary);"
         incr primary
     }


	But it seems like I was mistaken in the assertion I made in the  
transcript above. I reverted the behavior of the primary key for  
categories and maintainers in r31415 and regenerated the database with  
the new script, but the behavior persists as shown by a simple query  
such as http://apollo.homeunix.net/macports/ports.php?by=cat&substr=lang

	I'd be grateful if anyone beats me to looking into this issue...  
Ryan? ;-)

	Regards,...


-jmpp

PS: In trunk/www/ports.php, the sections querying the db for  
maintainer and category information are clearly labeled /* MAINTAINERS  
*/ and /* CATEGORIES */, respectively.



More information about the macports-dev mailing list