[maemo-developers] Autobuilder/SDK dpkg too old to support triggers

From: Andrew Flegg andrew at bleb.org
Date: Sat Jan 16 11:05:28 EET 2010
Hi,

My new package, Catorise[1], attempts to use triggers to keep
up-to-date with application install/uninstalls. This requires a
DEBIAN/triggers file within the control archive of the package.

Since the package is trivial and doesn't require any code, I've been
testing it by using dpkg-buildpackage natively on my Ubuntu boxes. The
resulting deb includes DEBIAN/triggers:

    $ dpkg -e catorise_0.0.3_all.deb
    $ cat DEBIAN/triggers
    interest /usr/share/applications/hildon
    $ _

When installed on an N900 running 2.2009.51-1, the trigger is picked
up by dpkg and used when installing/uninstalling packages. Wonderful
stuff.

However, when the tarball[2] is built in Scratchbox (so, including the
auto-builder) dpkg-buildpackage DOESN'T include the triggers file.

The versions of dpkg in play, according to `dpkg --version':

     Native Ubuntu (Jaunty)             1.14.24ubuntu1
     N900 (2.2009.51-1)                 1.14.25
     Scratchbox (Fremantle rootstrap)   1.13.25

The downlevel version in the SDK means you can't build packages which
use the features of dpkg on the device.

So, two questions:

   1) Is there a reason for the older dpkg in the SDK?
   2) Can anyone think of a workaround?

In terms of solutions/workarounds, I can think of a few:

     i. Upload my package to non-free, built with a version of dpkg
        closer to that on-device.

    ii. Get the SDK fixed so it actually corresponds to the version
        on the device.

   iii. Is there something I can do during package build time to
        get a file inserted into the control archive?


    iv. Put the triggers file into /var/lib/dpkg/info/catorise.triggers
        during install somehow. Will this work? Any dpkg experts
        fancy hazarding a guess?

Any thoughts welcome.

Cheers,

Andrew

[1] http://www.maemopeople.org/index.php/jaffa/2010/01/12/catorise_auto_organise_n900_applications
[2] http://repository.maemo.org/extras-devel/pool/fremantle/free/source/c/catorise/catorise_0.0.3.tar.gz

-- 
Andrew Flegg -- mailto:andrew at bleb.org  |  http://www.bleb.org/
More information about the maemo-developers mailing list