dapper->hardy missing files on upgrade

Bug #213566 reported by Michael Vogt
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xkeyboard-config (Ubuntu)
Fix Released
High
Michael Vogt

Bug Description

Binary package hint: xkeyboard-config

On a dapper->hardy upgrade there are files missing that lead to gnome-keyboard-preferences being unsuable:

$ ls -l /usr/share/X11/xkb/rules
total 108
-rw-r--r-- 1 root root 91 Mar 30 18:36 README
-rw-r--r-- 1 root root 31233 Mar 30 18:36 base
-rw-r--r-- 1 root root 27644 Mar 30 18:36 base.lst
lrwxrwxrwx 1 root root 21 Sep 28 2006 base.xml -> /etc/X11/xkb/base.xml
-rw-r--r-- 1 root root 3247 Mar 30 18:36 sgi
-rw-r--r-- 1 root root 2342 Mar 30 18:36 sun
-rw-r--r-- 1 root root 26386 Mar 30 18:36 sun.xml
-rw-r--r-- 1 root root 794 Mar 30 18:36 xfree98
-rw-r--r-- 1 root root 1184 Mar 30 18:36 xkb.dtd
$ dpkg -l xkb-data
ii xkb-data 1.1~cvs.20080104.1-1ubuntu3 X Keyboard Extension (XKB) configuration data

On a fresh system it looks like this:
$ ls -l /usr/share/X11/xkb/rules
total 108
-rw-r--r-- 1 root root 31233 2008-02-26 16:28 base
-rw-r--r-- 1 root root 27644 2008-02-26 16:28 base.lst
lrwxrwxrwx 1 root root 21 2008-02-29 11:28 base.xml -> /etc/X11/xkb/base.xml
-rw-r--r-- 1 root root 91 2008-02-26 16:28 README
-rw-r--r-- 1 root root 3247 2008-02-26 16:28 sgi
-rw-r--r-- 1 root root 2342 2008-02-26 16:28 sun
-rw-r--r-- 1 root root 26386 2008-02-26 16:28 sun.xml
lrwxrwxrwx 1 root root 4 2008-02-29 11:28 xfree86 -> base
lrwxrwxrwx 1 root root 8 2008-02-29 11:28 xfree86.lst -> base.lst
lrwxrwxrwx 1 root root 8 2008-02-29 11:28 xfree86.xml -> base.xml
-rw-r--r-- 1 root root 794 2008-02-26 16:28 xfree98
-rw-r--r-- 1 root root 1184 2008-02-26 16:28 xkb.dtd
lrwxrwxrwx 1 root root 4 2008-02-29 11:28 xorg -> base
lrwxrwxrwx 1 root root 8 2008-02-29 11:28 xorg.lst -> base.lst
lrwxrwxrwx 1 root root 8 2008-02-29 11:28 xorg.xml -> base.xml

Note the missing symlinks for xorg.xml in particular.

Tags: dapper2hardy
Revision history for this message
Michael Vogt (mvo) wrote :

The upgrade logs contains the following lines:

Selecting previously deselected package xkb-data.

Unpacking xkb-data (from .../xkb-data_1.1~cvs.20080104.1-1ubuntu3_all.deb) ...

WARNING: /etc/X11/xkb/compat had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/compat.dpkg-old.

WARNING: /etc/X11/xkb/compat.dir had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/compat.dir.dpkg-old.

WARNING: /etc/X11/xkb/geometry had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/geometry.dpkg-old.

WARNING: /etc/X11/xkb/geometry.dir had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/geometry.dir.dpkg-old.

WARNING: /etc/X11/xkb/keycodes had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/keycodes.dpkg-old.

WARNING: /etc/X11/xkb/keycodes.dir had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/keycodes.dir.dpkg-old.

WARNING: /etc/X11/xkb/keymap had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/keymap.dpkg-old.

WARNING: /etc/X11/xkb/keymap.dir had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/keymap.dir.dpkg-old.

WARNING: /etc/X11/xkb/rules had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/rules.dpkg-old.

WARNING: /etc/X11/xkb/semantics had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/semantics.dpkg-old.

WARNING: /etc/X11/xkb/semantics.dir had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/semantics.dir.dpkg-old.

WARNING: /etc/X11/xkb/symbols had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/symbols.dpkg-old.

WARNING: /etc/X11/xkb/symbols.dir had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/symbols.dir.dpkg-old.

WARNING: /etc/X11/xkb/types had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/types.dpkg-old.

WARNING: /etc/X11/xkb/types.dir had local changes! XKB configuration has

moved to /usr/share/X11/xkb. Preserving as /etc/X11/xkb/types.dir.dpkg-old.

Replacing files in old package xkeyboard-config ...

Changed in xkeyboard-config:
importance: Undecided → High
milestone: none → ubuntu-8.04
Revision history for this message
Bryce Harrington (bryce) wrote :

There is an interesting bit in xkeyboard-config/debian/preinst fiddling with the symlinks:

            for link in xfree86 xfree86.lst xfree86.xml xorg xorg.lst xorg.xml; do
                rm -f "/etc/X11/xkb/rules/$link"
            done

Perhaps the above is getting run on upgrade, but the corresponding code to generate the links is being skipped? There is a comment there "TODO: we should really have rollback code for all of this".

Or... also in debian/rules is this line for the configure step:

        ./configure $(confflags) \
          --prefix=/usr \
          --disable-xkbcomp-symlink --with-xkb-rules-symlink=xfree86,xorg \
          --with-xkb-base=$(xkb_base) \
          XKBCOMP=/no/thanks

Which makes me wonder if that --with-xkb-rules-symlink is not coming into effect during the upgrade.

Revision history for this message
Jouni Mettala (jouni-mettala) wrote :

Is https://bugs.launchpad.net/ubuntu/+bug/213973 duplicate of this bug or related?

ls -l /usr/share/X11/xkb/rules gives me same short list.

Changed in xkeyboard-config:
status: New → Confirmed
Revision history for this message
Michael Vogt (mvo) wrote :

There are a number of bugs in this transition it seems.
1. xkb-data querry for conffiles in xkb-data on dapper upgrades, but back then the package that had the conffile was xkeyboard-config
2. the transitional package xkeyboard-config is in universe, that is not helpful, it needs to be in main

But that is not relevant to this bug (it just makes finding it harder). I think what happens is the following:
1. dapper has xkeyboard-config installed, that has a bunch of conffiles in /etc/X11/xkb/rules:
  /etc/X11/xkb/rules/base 874ae2bf48b3d7e62101940d1e8ba800
  /etc/X11/xkb/rules/sgi 0d2f45bc82748a52d61ac7c34d77ec9c
  /etc/X11/xkb/rules/sun d1b83f824548dc15abc6c0623129516b
  /etc/X11/xkb/rules/xfree98 75d47545d3e3c7da7f978b915aeb82aa
  /etc/X11/xkb/rules/base.lst 323f897dd09197bd17dae4744d59d954
  /etc/X11/xkb/rules/xkb.dtd 021c8a02eddde3e9662f4bc35deff624
  /etc/X11/xkb/rules/README 1cb4b3e6d56889944af101ba0122f103
  /etc/X11/xkb/rules/base.xml 03d8adbed7713e6dc756929beed3e0fa
 (note that /etc/X11/xkb/rules/xorg.xml is absent amongst other)
2. xkb-data gets installed, that replaces the /etc/X11/xkb/rules directory with a symlink to /usr/share/X11/xkb/rules
3. xkeyboard-config from hardy is installed, it does not have any packages anymore (its just a transitional package), that means
    that will remove the files that belong to this package and that are not conffile, notably /etc/X11/xkb/rules/xorg.xml that now
    points to /usr/share/xkb/rules/xorg.xml
-> desaster

Changed in xkeyboard-config:
assignee: nobody → mvo
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xkeyboard-config - 1.1~cvs.20080104.1-1ubuntu5

---------------
xkeyboard-config (1.1~cvs.20080104.1-1ubuntu5) hardy; urgency=low

  * preinst:
    - when upgrading from hardy, check the conffiles against
      xkeyboard-config not xkb-data (was not available back then)
  * debian/control:
    - add conflicts against old xkeyboard-config to ensure the
      upgrade happens in the right order (LP: #213566)

 -- Michael Vogt <email address hidden> Wed, 09 Apr 2008 13:11:52 +0200

Changed in xkeyboard-config:
status: In Progress → Fix Released
Revision history for this message
Salenko (r7salek) wrote :

Hi,

I still get get error code 1 message ....
....
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_GB:en",
        LC_ALL = (unset),
        LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
Extracting templates from packages: 100%
Preconfiguring packages ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_GB:en",
        LC_ALL = (unset),
        LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_GB:en",
        LC_ALL = (unset),
        LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
(Reading database ... 59630 files and directories currently installed.)
Unpacking xkb-data (from .../xkb-data_1.1~cvs.20080104.1-1ubuntu5_all.deb) ...
dpkg: error processing /var/cache/apt/archives/xkb-data_1.1~cvs.20080104.1-1ubuntu5_all.deb (--unpack):
 trying to overwrite `/etc/X11/xkb/types.dir', which is also in package xkeyboard-config
Selecting previously deselected package xserver-xorg-video-geode.
Unpacking xserver-xorg-video-geode (from .../xserver-xorg-video-geode_2.8.0-7_i386.deb) ...
Replacing files in old package xserver-xorg-video-amd ...
Errors were encountered while processing:
 /var/cache/apt/archives/xkb-data_1.1~cvs.20080104.1-1ubuntu5_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Is there any solution to this?

Revision history for this message
Salenko (r7salek) wrote :

 Follow up ----------->sudo aptitude -f reinstall locales
fixed it ;--- to an extent.... followed by usual sudo aptitude updata and upgrade

Revision history for this message
Shengyao Wang (shengyaowang) wrote :

Dear Michael Vogt,

I got the same error when upgrading from 6.06 LTS to 8.04 LTS. Can you explain in detail on how to get the upgrade through? I don't understand how to:

  * preinst:
    - when upgrading from hardy, check the conffiles against
      xkeyboard-config not xkb-data (was not available back then)
  * debian/control:
    - add conflicts against old xkeyboard-config to ensure the
      upgrade happens in the right order (LP: #213566)

Revision history for this message
Valentin Lab (vaab) wrote :

this is what I did to get through to install xkb-data:

download of the 386 build of xkb-data_1.1 latest version here:
https://launchpad.net/ubuntu/+source/xkeyboard-config/1.1~cvs.20080104.1-1ubuntu8/+build/746196

Then did a simple "dpkg -i" on it. This did the trick.

Please note that the breaking of xkb-data has broken the full upgrade from dapper->hardy much more severly than that. Several more package are said to be in conflict. And I have to fight as I can to get through the huge dependency mess.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.