You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2015/09/15 16:31:45 UTC

[jira] [Commented] (COMDEV-156) parseprojects.py: Calculation of projectJsonFilename is flawed

    [ https://issues.apache.org/jira/browse/COMDEV-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14745532#comment-14745532 ] 

Sebb commented on COMDEV-156:
-----------------------------

Another problem with using the URL is that it is not stable - it may change.

Some projects don't include the PMC name in the project name - e.g. Apache RAT - or the name is included, but not at the start - e.g. Apache .NET Ant Library.
In such cases it would be useful to prefix the project name with the PMC name (and drop it from the rest of the filename if necessary).

Further, it would be clearer to translate .NET to dotnet, rather than _net

> parseprojects.py: Calculation of projectJsonFilename is flawed
> --------------------------------------------------------------
>
>                 Key: COMDEV-156
>                 URL: https://issues.apache.org/jira/browse/COMDEV-156
>             Project: Community Development
>          Issue Type: Bug
>          Components: Projects New
>            Reporter: Sebb
>
> The parseprojects.py script calculates the projectJsonFilename variable from the DOAP homepage entry.  If the homepage has path components after tlp.apache.org then the last one is used and appended to the tlp.
> This process is not guaranteed to result in a unique file name. For example the entry
> <homepage rdf:resource="http://commons.apache.org/beanutils/index.html"/>
> is converted to
> commons-index.html
> It so happens that the other Commons DOAPs don't include the index.html so they are unique, but this is just chance. There are other ways that this approach can fail as there is no standard convention for project homepage URLs within a TLP website (nor should one be enforced).
> It would be a lot simpler (and more reliable) to use the DOAP name field.
> Trim the leading Apache, convert to lower case, remove/replace spaces and sanitiize illegal filename characters.
> [The original code only allowed alphanumeric characters plus '-' and '+'. Everything else was converted to '_'.
> There may still be duplicate names, but that is an issue for the project to resolve as that is not allowed (and the code can report duplicates).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)