[50984] trunk/dports

Andrea D'Amore and.damore at macports.org
Fri May 15 01:51:06 PDT 2009


On 15/mag/09, at 05:43, Ryan Schmidt wrote:

> Andrea, I see you fixed this for optipng in r50998, but what about  
> the rest of Vincent's ports?

I assumed he only had one as he wrote "a problem".

> Are you sure no other maintainers' addresses were affected by this  
> problem?

I'm sure every other mail address containing a hypens is affected.

> If you show us how you made the changes originally, maybe we can  
> determine what other ports might be affected. I'm guessing  
> maintainers with hyphens in the portion before the @ are affected,  
> at least.

I used a "find" command to match only 'Portfile' file that are not in  
unix hidden directories:

$ find . -type f ! -regex '.*\/\..*' -name 'Portfile'


I chained find with sed, running it twice, first time to delete  
"@macports.org" in lines starting with "maintainers":

$ find . -type f ! -regex '.*\/\..*' -name 'Portfile' -print0 | xargs  
-0 sed -i '/^maintainers/s/@macports\.org//g'

second time to replace the remaining emails, i.e. all those not in  
@macports.org domain, using backreference:

$ find . -type f ! -regex '.*\/\..*' -name 'Portfile' -print0 | xargs  
-0 sed -i '' '/^maintainers/s/\([a-zA-Z0-9_\.]*\)\@\([a-zA-Z0-9_\.]*\)/ 
\2:\1/g'


As you can see I didn't put a "\-" in the grouping so it was left out,  
my bad.
Other uncommon chars could lead to problem, I'm hereby assuming that  
alpha-digits and the set "-_." covers all email addresses. Any  
different advice?

> I see problems in several ports using this command:
> port -q info --maintainer --name  maintainer:-
>
> Just picking a few:
>
> catdoc ("julian-9k.de at hal")
> flashdot ("macports-elze.de at tobias")
> gpsbabel ("macports-behrendt.net at michael")
> gtkmm1 ("gongloo-server.no-ip.com at charlies")
> httrack ("ross-williams.net at ross")
>
> What prompted you to make this change in the first place?

I was editing portfiles containing my old handles and email.

When I searched for "@macports.org" I got more than 300 hits, and more  
than 1k for plain email address.
Global Keyword in Guide suggests to just keep the handle for those, It  
just seemed natural to me to alter them accordingly to the Guide.

> I'm in favor of obfuscating email addresses in portfiles for the  
> sake of consistency and the potential reduction of spam, but up to  
> now, we've left it to up to each individual maintainer to decide how  
> they wanted to format their email address in the portfile. And I  
> don't recall a mailing list discussion about changing that, and you  
> didn't list a ticket number in your commit message.

You're right and I apologize with everybody for that, I just talked  
about it on the channel.

I've searched the dports tree with find searching for maintainers line  
containig "-", I searched using port -q info for "maintainer:-", I cut  
off everything but the email addresses, I sorted the two files and I  
parsed them with uniq.

This way I've got two files, the actual email containing "-" in  
portfiles and the info from port command.
Does port info take its data from the Portfile or from the Portindex?
I.e. is the output of "port -q info" reliable or has the Portindex  
already rebuilt from the wrong emails?

This time I'm gonna file a ticket before patching.


Regards

Andrea


More information about the macports-dev mailing list