A strange warning message shown up while doing my weekly update:

* Messages for package dev-python/pygobject-2.28.6-r52:

* Unable to establish /usr/lib64/python2.7/site-packages/pygtk.py symlink
* Unable to establish /usr/lib64/python2.7/site-packages/pygtk.pth symlink

* Messages for package dev-python/pygtk-2.24.0-r2:

* Unable to establish /usr/lib64/python2.7/site-packages/pygtk.py symlink
* Unable to establish /usr/lib64/python2.7/site-packages/pygtk.pth symlink

I found a thread discussing the issue but it dated way back in 2007 and the Python was around 2.5 era. Even it’s almost six-year-old, it’s still very helpful.

My Python 2.7 can import gtk or pygtk without any issues, not quite sure if the warning messages actually means something was broken on my system.

However, it seems to re-emerge normally after following the suggestion by the post:

emerge -q1 pygobject pygtk

This time, no warning messages is shown.

I looked into the ebuild:

pkg_postinst() {
  create_symlinks() {
    alternatives_auto_makesym "$(python_get_sitedir)/pygtk.py" pygtk.py-[0-9].[0-9]
    alternatives_auto_makesym "$(python_get_sitedir)/pygtk.pth" pygtk.pth-[0-9].[0-9]
  }
  python_execute_function create_symlinks

  python_mod_optimize glib gobject gtk-2.0 pygtk.py
}

I know nothing about the ebuild writing, not sure which one is source or destination, but there is no file with the version number:

 ~ $ ls -1 --file-type /usr/lib64/python2.7/site-packages/pygtk*
/usr/lib64/python2.7/site-packages/pygtk.pth
/usr/lib64/python2.7/site-packages/pygtk.py
/usr/lib64/python2.7/site-packages/pygtk.pyc
/usr/lib64/python2.7/site-packages/pygtk.pyo

Nothing has changed after re-emerge beside the file timestamps. Still seeing no symlinks. Also, as mentioned in the discussion, equery reports that those files belong to dev-python/pygobject.

Not sure what was going on, but since re-emerge works and everything seems to work just fine, so I just dropped the issue and logged the strange messages here. Probably just a harmless glitch.