[Pkg-ime-devel] Bug#646958: libgooglepinyin0: architecture dependent file in /usr/share

Jakub Wilk jwilk at debian.org
Fri Oct 28 18:03:04 UTC 2011


Package: libgooglepinyin0
Version: 0.1.1-1
Severity: serious
Justification: Policy 9.1.1

libgooglepinyin0 ships its dictionary file in /usr/share, but the file 
format is not architecture-independent. The code that creates the file 
looks like this:

| bool DictTrie::save_dict(FILE *fp) {
|   if (NULL == fp)
|     return false;
|
|   if (fwrite(&lma_node_num_le0_, sizeof(size_t), 1, fp) != 1)
|     return false;
|
|   if (fwrite(&lma_node_num_ge1_, sizeof(size_t), 1, fp) != 1)
|     return false;
|
|   if (fwrite(&lma_idx_buf_len_, sizeof(size_t), 1, fp) != 1)
|     return false;
|
|   if (fwrite(&top_lmas_num_, sizeof(size_t), 1, fp) != 1)
|     return false;
|
|   if (fwrite(root_, sizeof(LmaNodeLE0), lma_node_num_le0_, fp)
|       != lma_node_num_le0_)
|     return false;
|
|   if (fwrite(nodes_ge1_, sizeof(LmaNodeGE1), lma_node_num_ge1_, fp)
|       != lma_node_num_ge1_)
|     return false;
|
|   if (fwrite(lma_idx_buf_, sizeof(unsigned char), lma_idx_buf_len_, fp) !=
|       lma_idx_buf_len_)
|     return false;
|
|   return true;
| }

So the format depends on size of size_t (and on endianness, but the 
package doesn't build on big-endian machines so far, so that's 
unimportant).

Please either make the format architecture-independent or move the file 
into a subdirectory of /usr/lib/<multiarch-triplet>.

-- 
Jakub Wilk





More information about the Pkg-ime-devel mailing list