Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 236666 - sys-apps/hal-0.5.11-r2 fails at hal-config-examples/migrate-xorg-to-fdi.py
Summary: sys-apps/hal-0.5.11-r2 fails at hal-config-examples/migrate-xorg-to-fdi.py
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
: 236737 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-04 09:05 UTC by meyerm
Modified: 2009-02-04 14:07 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description meyerm 2008-09-04 09:05:43 UTC
hal-0.5.11-r2 can't be built on my system (-r1 is installed). This is not #224277 as my ebuild is already using the right path. I removed the redirection of stderr to /dev/null (indeed a bad idea ;-) ) and got the following error:

make[1]: Leaving directory `/var/tmp/portage/sys-apps/hal-0.5.11-r2/work/hal-0.5.11'
 * Migrating xorg.conf Core Keyboard configuration to HAL FDI file...
Traceback (most recent call last):
  File "/var/tmp/portage/sys-apps/hal-0.5.11-r2/work/hal-config-examples/migrate-xorg-to-fdi.py", line 51, in <module>
    keyboard = xf86config.getCoreKeyboard(configuration)
  File "/usr/lib/python2.5/site-packages/xf86config.py", line 173, in getCoreKeyboard
    for i in xconfig.layout[0].inputs:
IndexError: index out-of-bounds
 *
 * ERROR: sys-apps/hal-0.5.11-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_install
 *             environment, line 3700:  Called die
 * The specific snippet of code:
 *           "${WORKDIR}/${PN}-config-examples/migrate-xorg-to-fdi.py" > "${D}/etc/hal/fdi/policy/10-x11-input.fdi" || die;
 *  The die message:
 *   (no error message)
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-apps/hal-0.5.11-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/hal-0.5.11-r2/temp/environment'.
 *

So it's failing at accessing xconfig.layout[0].inputs since the script assumes an exiting layout-configuration. But I'm happily relying on the automatic configuration of xorg and have only a screen (because of multiscreen setups) and a keyboard config (to get localized mapping) section. The rest (including a layout section) is left for xorg to find out by itself which works quite well.
Comment 1 Robert Piasek (RETIRED) gentoo-dev 2008-09-04 10:19:37 UTC
Hal ebuild assumes that one did not convert to xorg to use hal setup and runs the conversion every time.

                # Automagic conversion!
                elog "Migrating xorg.conf Core Keyboard configuration to HAL FDI file..."
                "${WORKDIR}/${PN}-config-examples/migrate-xorg-to-fdi.py" 2> /dev/null > "${D}/etc/hal/fdi/policy/10-x11-input.fdi" || die


migrate-xorg-to-fdi.py checks for CoreKeyboard:
./migrate-xorg-to-fdi.py 
No CoreKeyboard

here:
   except XF86SectionMissing:
      sys.stderr.write("No CoreKeyboard\n")
      sys.exit(-1)

So instead of using || die you can check for $? and use elog "Migration skipped, no Keyboard Section found" or similar.
Comment 2 Duncan 2008-09-04 12:13:02 UTC
I'm getting this too.

According to the xorg.conf manpage, if there's no Option "CoreKeyboard", it takes the first InputDevice section with a keyboard or kbd driver.  I'm relying on that and thus have no such option in my single input-dev keyboard section (using the "kbd" driver).  Thus the search ends with an index out of bounds error.

As in comment #1 I would have had the conversion done with an earlier version and thus would have deleted that section as the instructions said to, but I tried it and had a broken X, so I put it back.  But it's not converting anyway, due to the above mentioned lack of Option "CoreKeyboard".

Duncan
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-09-05 00:59:35 UTC
*** Bug 236737 has been marked as a duplicate of this bug. ***
Comment 4 Nate Weibley 2008-09-05 03:08:50 UTC
I'm getting the same error output from portage but going to the work directory and manually running migrate-xorg-to-fdi.py gives me:

Traceback (most recent call last):
  File "./migrate-xorg-to-fdi.py", line 10, in <module>
    import xf86config
ImportError: No module named xf86config
Comment 5 Tony Vroon (RETIRED) gentoo-dev 2009-02-04 14:07:22 UTC
This script is problematic for a lot of people. We will aim to update documentation on migrating from old-style X.Org to HAL and stop trying to automate the process.
It is error-prone and as implemented caused a circular dependency between X.Org and HAL.