Bug 515106 - don't install duplicate files
don't install duplicate files
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: ibus (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Peng Huang
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-02 00:33 EDT by Matthias Clasen
Modified: 2009-08-05 19:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-08-05 19:38:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthias Clasen 2009-08-02 00:33:58 EDT
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 05:34:56 EDT
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 08:55:48 EDT
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 09:10:21 EDT
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-04 20:10:07 EDT
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-04 21:09:18 EDT
> 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 19:38:32 EDT
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.