registrating clients doesn't work when installing the package

Bug #268838 reported by Mathias Gug
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
landscape-client (Ubuntu)
Fix Released
High
Mathias Gug

Bug Description

Binary package hint: landscape-client

If apt is run with a debconf priority of medium landscape account information is asked during the package installation. However landscape-config fails:

Setting up landscape-client (1.0.18-0ubuntu1) ...
 * Running update-motd failed.
 * Reloading system message bus config... [ OK ]
Traceback (most recent call last):
  File "/usr/bin/landscape-config", line 6, in <module>
    from landscape.configuration import main
  File "/usr/lib/python2.5/site-packages/landscape/configuration.py", line 18, in <module>
    from landscape.broker.deployment import BrokerConfiguration
  File "/usr/lib/python2.5/site-packages/landscape/broker/deployment.py", line 5, in <module>
    from landscape.deployment import (LandscapeService, Configuration,
  File "/usr/lib/python2.5/site-packages/landscape/deployment.py", line 21, in <module>
    from landscape.reactor import TwistedReactor
  File "/usr/lib/python2.5/site-packages/landscape/reactor.py", line 8, in <module>
    import gobject
ImportError: No module named gobject

The reason is that the package python-gobject uses python-support which uses dpkg triggers to install python modules. Since dpkg triggers are run after all postinst scripts, the gobject module is not available when landscape-client.postinst calls landscape-config.

At a first glance it seems most of the work done by landscape-config could be done in the postinst script. The only issue is sending the registration request to the landscape server.

NB: in order to use debconf at medium priority when installing packages, modify the apt configuration:

mathiaz@t-landscape:~$ cat /etc/apt/apt.conf.d/70debconf
// Pre-configure all packages with debconf before they are installed.
// If you don't like it, comment it out.
DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt --priority=medium || true";};

Mathias Gug (mathiaz)
Changed in landscape-client:
importance: Undecided → High
Changed in landscape-client:
assignee: nobody → mathiaz
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 1.0.18-0ubuntu2

---------------
landscape-client (1.0.18-0ubuntu2) intrepid; urgency=low

  [ Mathias Gug ]
  * Split the package into two packages:
    - landscape-common: has the python libraries and the landscape-sysinfo
      command. A landscape account is not required to use this package.
    - landscape-client: has all the binaries required to run the
      landscape-client. Requires a landscape account.
    - debian/control:
      + move some dependencies to landscape-client so that
        landscape-common doesn't install unecessary packages in the
        default -server install.
      + move python-gobject to a Pre-Depends so that landscape-config can
        register the system during the postinst (LP: #268838).
  * debian/control:
    - depend on python-smartpm instead of smartpm-core.
  * debian/landscape-client.postrm: delete /etc/landscape/client.conf when
    the package is purged.
  * debian/landscape-client.postinst: remove sysinfo_in_motd debconf question
    as it wasn't used.

  [ Christopher Armstrong ]
  * Fixes for (LP: #268352).
    - scripts/landscape-sysinfo.wrapper: New script to run landscape-sysinfo
      with leading whitespace.
    - debian/rules: Install wrapper into /usr/share/landscape.
    - debian/landscape-client.postinst: Link wrapper into place.

 -- Mathias Gug <email address hidden> Mon, 15 Sep 2008 17:21:53 -0400

Changed in landscape-client:
status: New → Fix Released
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.