On Aug 10, 2009, at 4:31 AM, Jonathan Parès wrote:

Dear all,

As Qualipso project team member (http://qualipso.org/), I want to use Fossology to retrieve some metrics about the licenses available on a FLOSS projects. I would like to retrieve these following metrics with Fossology :

- the number of distinct licenses incorporated (called then LCS-1.2.4);
-  the number of unlicensed files/module (LCS-1.2.5);
-  the percentage of FLOSS licensed components (LCS-3.1.1);

After having tested Fossology, I have seen that the metric LCS-1.2.4 is provided by Fossology. But what about the metrics LCS-1.2.5 and LCS-3.1.1 ? I think they can be retrieved undirectly by inference from other results ? I'm right ?

You would need to query the database directly for LCS-1.2.5. The 1.2 version of fossology will include this in the standard reports.

In the mean time, here is some sql to help you do this by direct database query. The examples use upload 125 only for illustration so make sure you substitute your upload_pk.

The number of files in an upload:
select count(*) from uploadtree where upload_fk=125 and (ufile_mode&x'3C000000'::int)=0;

List the files in upload 125:
select uploadtree_pk, pfile_fk, ufile_name from uploadtree
   where upload_fk=125 and (ufile_mode&x'3C000000'::int)=0;

List all the files with a license for upload_fk 125:
select DISTINCT UT1.uploadtree_pk, UT1.ufile_name,lic_name,licterm_name, licterm_name_confidence
    FROM uploadtree as UT1
    INNER JOIN agent_lic_meta on UT1.pfile_fk=agent_lic_meta.pfile_fk
INNER JOIN agent_lic_raw on agent_lic_meta.lic_fk=agent_lic_raw.lic_pk
    LEFT OUTER JOIN licterm_name on licterm_name.pfile_fk=UT1.pfile_fk
    LEFT OUTER JOIN licterm on licterm_pk=licterm_name.licterm_fk
    WHERE upload_fk=125
    ORDER BY UT1.uploadtree_pk;


Hope that helps,
Bob Gobeille




_______________________________________________
fossology mailing list
[email protected]
http://fossology.org/mailman/listinfo/fossology

Reply via email to