Bug 515106 - don't install duplicate files
Summary: don't install duplicate files
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ibus
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Peng Huang
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-02 04:33 UTC by Matthias Clasen
Modified: 2009-08-05 23:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-05 23:38:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Matthias Clasen 2009-08-02 04:33:58 UTC
I'm looking for space to save on the live cd, and I notice that the three biggest files in ibus are simply copies of files shipped in pygtk2:

/usr/lib/python2.6/site-packages/ibus/keysyms.py and its compiled versions.

Considering that you are depending on pygtk2 anyway, it would seem much better to simply use the file from pygtk2 instead of shipping a copy.

Comment 1 Peng Huang 2009-08-04 09:34:56 UTC
If use keysym from pygtk2, it has a problem. It will cause ibus python library must depend on X. If $DISPLAY does not exist, ibus can not import keysyms from pygtk successfully. 

BTW, I think I could remove two dicts to reduce the size of it.

Comment 2 Matthias Clasen 2009-08-04 12:55:48 UTC
What is the problem with depending on X, considering we are talking about an X input method there ?!

Comment 3 Matthias Clasen 2009-08-04 13:10:21 UTC
Also, doesn't this do what you need anyway ?

mclasen@planemask system-config-selinux]$ python
Python 2.6.2 (r262:71600, Jul 30 2009, 17:08:54) 
[GCC 4.4.1 20090725 (Red Hat 4.4.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gtk import keysyms
>>> print keysyms.KP_Home
65429
>>>

Comment 4 Peng Huang 2009-08-05 00:10:07 UTC
The ibus python library is also used by input method engine. And I think engines should not depend on X. For future, maybe we will use ibus without X. (For example in console, or frame buffer).

Please try below commands:
[phuang@phuang-notebook ~]$ unset DISPLAY 
[phuang@phuang-notebook ~]$ python
Python 2.6 (r26:66714, Jun  8 2009, 16:07:26) 
[GCC 4.4.0 20090506 (Red Hat 4.4.0-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gtk import keysyms
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 79, in <module>
    _init()
  File "/usr/lib/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 67, in _init
    _gtk.init_check()
RuntimeError: could not open display
>>>

Comment 5 Matthias Clasen 2009-08-05 01:09:18 UTC
> The ibus python library is also used by input method engine. And I think
> engines should not depend on X. For future, maybe we will use ibus without X.
> (For example in console, or frame buffer).

If there's no X, then those X keysyms won't do you any good either..
but anyway, I'll make room somewhere else on the live cd.

Comment 6 Peng Huang 2009-08-05 23:38:32 UTC
Removed two dicts to reduce the size from 143K + 97K + 97K to 30K + 42K + 42K.
Fixed in ibus-1.2.0.20090806-1.fc12
Before:
-rw-r--r-- 1 root root 143K 08-03 14:54 /usr/lib/python2.6/site-packages/ibus/keysyms.py
-rw-r--r-- 2 root root  97K 08-03 14:55 /usr/lib/python2.6/site-packages/ibus/keysyms.pyc
-rw-r--r-- 2 root root  97K 08-03 14:55 /usr/lib/python2.6/site-packages/ibus/keysyms.pyo

After:
-rw-r--r-- 1 root root 30K 08-06 07:28 /usr/lib/python2.6/site-packages/ibus/keysyms.py
-rw-r--r-- 2 root root 42K 08-06 07:28 /usr/lib/python2.6/site-packages/ibus/keysyms.pyc
-rw-r--r-- 2 root root 42K 08-06 07:28 /usr/lib/python2.6/site-packages/ibus/keysyms.pyo


Note You need to log in before you can comment on or make changes to this bug.