People with Debian background are used with running a stable system, but with several needed packages installed from testing or unstable. Package management tools support this quite well. Just add stable, testing and unstable to /etc/apt/sources.list, and set up /etc/apt/preferences such that stable has highest priority, testing has something lower, and unstable has even lower. Then, to install individual package (and it’s dependences) from, say, unstable, just use

apt-get -t unstable install packagename

Maemo is not Debian. But still many packages are available from maemo.org repositories, that have Extra, Extra-testing, and Extra-devel parts. These have much in common with Debian’s stable, testing and unstable.

In particular, /etc/apt/preferences could be set up to prefer packages from Extras over packages from Extras-testing, and packages from Extras-testing over packages from Extra-devel:

Package: *
Pin: release l=Extras
Pin-Priority: 640

Package: *
Pin: release l=Extras-testing
Pin-Priority: 620

Package: *
Pin: release l=Extras-devel
Pin-Priority: 600

After adding new pins to /etc/apt/preferences, it is a good idea to remove /var/cache/apt/*.bin and then run apt-get update. Without that, sometimes new settings do not apply.

Installing individual packages from lower-priority source is still possible with apt-get -t, although syntax is a bit uncommon:

apt-get -t l=Extras-devel install packagename

Unfortunately repositories on downloads.maemo.nokia.com that provide official maemo platform and applications, don’t currently provide proper Release files, so can’t be integrated in /etc/apt/preferences setup. Just filed bug 7893 about that.

  7 Responses to “/etc/apt/preferences on n900”

  1. Will this integrate into the application manager, or will it only work for apt-get?

  2. Application manager will show applications from all repositories, and install highest priority alternative.

    There is theoretical possibility that application manager will unable to install something from lower-priority source, because of dependency on recent version of another package, while older version of that ‘another package’ is in higher-priority source. However in practice I did not see that yet. And if it will ever happen, installation from command line will still be possible.

  3. Hrm… so I tested with with Extra protocol plugins for Conversations and Contacts.

    Currently version 0.8 is in devel, and 0.7 in test.

    I added what you had above, with the modification of testing and extras being the same priority (620).
    When I went to see what version would install, it said 0.7, but said it was from extras-devel. So it looks like it’s taking the extras-testing version, but taking it from the repository with the higher number.

  4. Q: What’s l= mean exactly? Because my extras is called maemo.org in the repositories list, and the GUI doesn’t allow me to change that name.

  5. String after “l=” should be the same as string in Label: field of Release file in the repository. It has nothing to do with repository name in application manager GUI.

    I forgot to write that after adding new pins to /etc/apt/preferences, package cache should be renewed by rm /var/cache/apt/*.bin; apt-get update. Without that, new settings are sometimes not applied. At least I’ve seen that on Debian. Did not investigated the details although.

  6. I think the problem might be in the app manager gui. I am seeing the version in test, but it is saying it is coming from devel. I tried doing the cache thing and it didn’t change anything. Have you been using the command line for everything? Maybe that’s why you didn’t notice the bug I am seeing.

  7. I use both command line and GUI.

    Could you try apt-cache policy on the package in question? Maybe that version exists both in -testing and -devel?

Sorry, the comment form is closed at this time.

© 2011 yoush.homelinux.org Suffusion theme by Sayontan Sinha