Bug #1923
Missing file from license histogram
| Status: | Closed | Start date: | 05/08/2012 | |
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | Nomos | |||
| Target version: | 2.0.0 | |||
| Rank: | Tester: |
Description
License histogram
http://fossology.usa.hp.com/?mod=nomoslicense&upload=974&item=433167771
shows 1 Sleepycat license (last one in license list). But clicking on "Show" shows zero files.
Reported by Bryan Sutula
History
Updated by Bob Gobeille about 1 year ago
http://fossology.usa.hp.com/?mod=nomoslicense&upload=974&item=433231658
will show you the directory containing the one Sleepycat file.
Updated by Bob Gobeille about 1 year ago
- Assignee set to Dong Ma
Updated by Bob Gobeille about 1 year ago
Sutula also noticed that the license highlighting for Sleepycat doesn't work. It does work for other licenses.
Updated by Dong Ma about 1 year ago
- Status changed from New to Feedback
Fixed on fo.usa.hp.com, this bug is specific on fo.usa.hp.com upgrade.
It caused by there are 2 same rf_shotname 'Sleepycat' in the license_ref table. One is added by nomos and another added by license_ref table initialize.
Nomos analysis result is use the first one, but the UI query use the second one, so missing the files. So I consider it's a bug about license_ref table initialize when have exist license_ref data added by nomos.
Also I found similar things for other rf_shortname.fossology=> select count(rf_shortname), rf_shortname from license_ref group by rf_shortname order by count(rf_shortname) desc;
count | rf_shortname
-------+---------------------------
2 | Hacktivismo
2 | Cisco
2 | CMU
2 | W3C
2 | Bitstream
2 | X11
2 | BSD
2 | 3DFX
2 | Apache
2 | Adobe
2 | Ruby
2 | Eclipse
2 | QPL
2 | Jabber
2 | RCSL
2 | Epinions
2 | OpenSSL
2 | BitTorrent
2 | GFDL
2 | gSOAP
2 | Mibble
2 | IBM
2 | Intel
2 | Fair
2 | CeCILL-B
2 | OASIS
2 | Vovida
2 | Apple
2 | NRL
2 | ImageMagick
2 | Motorola
2 | CeCILL-C
2 | Ricoh
2 | OpenGroup
2 | HP
2 | RedHat
2 | CompuServe
2 | EU-DataGrid
2 | SISSL
2 | Hauppauge
2 | MitreCVW
2 | Unicode
2 | Boost
1 | LaTeX1.2
1 | ZPL2.0
1 | Link-exception
......
Following is my fix method. Bob can you review it if it correct.
fossology=> SELECT rf_pk FROM license_ref WHERE rf_shortname='Sleepycat';
rf_pk
-------
908
159
(2 rows)
fossology=> SELECT * FROM license_ref WHERE rf_shortname='Sleepycat';
rf_pk | rf_shortname | rf_text | rf_url | rf_add_date | rf_copyleft | rf_OSIapproved | rf_fullname | rf_FSFfree | rf_GPLv2compatible | rf_GPLv3compatible | rf_notes | rf_Fedora | marydone | rf_active | rf_text_updatable | rf_md5 | rf_detect or_type
-------+--------------+------------------------------------------------------ -------------------------+--------------------------------------------------+ -------------+-------------+----------------+-------------------+------------ --------------------------------------+----------+-----------+----------+ -----------+-------------------+----------------------------------+---------- --------
908 | Sleepycat | The Sleepycat License\r | http://www.opensource.org/licenses/sleepycat.php | | | | Sleepycat License | | | | | | f | f | f | 1f2f20ae5b13a7f588317e2ad34079ff | 2
: Copyright (c) 1990-1999\r
: Sleepycat Software. All rights reserved.\r
: \r
: Redistribution and use in source and binary forms, wi th or without\r
: modification, are permitted provided that the followi ng conditions\r
: are met:\r
: \r
: Redistributions of source code must retain the above copyright\r
: notice, this list of conditions and the following dis claimer.\r
: Redistributions in binary form must reproduce the abo ve copyright\r
: notice, this list of conditions and the following dis claimer in the\r
: documentation and/or other materials provided with th e distribution.\r
: Redistributions in any form must be accompanied by in formation on\r
: how to obtain complete source code for the DB softwar e and any\r
: accompanying software that uses the DB software. The source code\r
: must either be included in the distribution or be ava ilable for no\r
: more than the cost of distribution plus a nominal fee , and must be\r
: freely redistributable under reasonable conditions. F or an\r
: executable file, complete source code means the sourc e code for all\r
: modules it contains. It does not include source code for modules or\r
: files that typically accompany the major components o f the operating\r
: system on which the executable file runs.\r
: THIS SOFTWARE IS PROVIDED BY SLEEPYCAT SOFTWARE ``AS IS\'\' AND ANY EXPRESS\r
: OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
: WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICUL AR PURPOSE, OR\r
: NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL S LEEPYCAT SOFTWARE\r
: BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECI AL, EXEMPLARY, OR\r
: CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
: SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR P ROFITS; OR BUSINESS\r
: INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIA BILITY, WHETHER IN\r
: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIG ENCE OR OTHERWISE)\r
: ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, E VEN IF ADVISED OF\r
: THE POSSIBILITY OF SUCH DAMAGE.\r
: \r
: Copyright (c) 1990, 1993, 1994, 1995\r
: The Regents of the University of California. All righ ts reserved.\r
: \r
: Redistribution and use in source and binary forms, wi th or without\r
: modification, are permitted provided that the followi ng conditions\r
: are met:\r
: \r
: Redistributions of source code must retain the above copyright\r
: notice, this list of conditions and the following dis claimer.\r
: Redistributions in binary form must reproduce the abo ve copyright\r
: notice, this list of conditions and the following dis claimer in the\r
: documentation and/or other materials provided with th e distribution.\r
: Neither the name of the University nor the names of i ts contributors\r
: may be used to endorse or promote products derived fr om this software\r
: without specific prior written permission.\r
: THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBU TORS ``AS IS\'\' AND\r
: ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
: IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
: ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONT RIBUTORS BE LIABLE\r
: FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPL ARY, OR CONSEQUENTIAL\r
: DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT O F SUBSTITUTE GOODS\r
: OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINE SS INTERRUPTION)\r
: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHE R IN CONTRACT, STRICT\r
: LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY\r
: OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T HE POSSIBILITY OF\r
: SUCH DAMAGE.\r
: \r
: Copyright (c) 1995, 1996\r
: The President and Fellows of Harvard University. All rights reserved.\r
: \r
: Redistribution and use in source and binary forms, wi th or without\r
: modification, are permitted provided that the followi ng conditions\r
: are met:\r
: \r
: Redistributions of source code must retain the above copyright\r
: notice, this list of conditions and the following dis claimer.\r
: Redistributions in binary form must reproduce the abo ve copyright\r
: notice, this list of conditions and the following dis claimer in the\r
: documentation and/or other materials provided with th e distribution.\r
: Neither the name of the University nor the names of i ts contributors\r
: may be used to endorse or promote products derived fr om this software\r
: without specific prior written permission.\r
: THIS SOFTWARE IS PROVIDED BY HARVARD AND ITS CONTRIBU TORS ``AS IS\'\' AND\r
: ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
: IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
: ARE DISCLAIMED. IN NO EVENT SHALL HARVARD OR ITS CONT RIBUTORS BE LIABLE\r
: FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPL ARY, OR CONSEQUENTIAL\r
: DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT O F SUBSTITUTE GOODS\r
: OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINE SS INTERRUPTION)\r
: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHE R IN CONTRACT, STRICT\r
: LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY\r
: OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T HE POSSIBILITY OF\r
: SUCH DAMAGE.
159 | Sleepycat | License by Nomos. | | | | | | | | | | | f | t | f | | 2
(2 rows)
fossology=> Delete FROM license_ref WHERE rf_pk = 159;
DELETE 1fossology=> update license_ref set rf_pk = 159 where rf_shortname='Sleepycat' ;
UPDATE 1
Updated by Bob Gobeille about 1 year ago
Though what you did fixes the immediate problem for Sleepycat, I don't believe it is the correct solution. Nor does it fix similar problems with Hacktivismo, Cisco, CMU, etc., as you pointed out.
One solution would be to make rf_shortname a unique field. I've not wanted to do this because if we ever support a template based license scanner (like Ninka, bSAM was also template based), then we can have multiple license references refer to the same license.
So I think the best solution for now is that when "Show" Sleepycat is clicked, the results should be for every rf_pk where rf_shortname = 'sleepycat'.
Updated by Dong Ma about 1 year ago
- Status changed from Feedback to Resolved
Rollback yesterday's database change fix.
Checked in new fix in revision5848.
Updated by Bob Gobeille about 1 year ago
- Status changed from Resolved to Closed
verified fixed and fix copied to fo.usa