Image Creator doesn't install some packages

Bug #211359 reported by Steve Magoun
4
Affects Status Importance Assigned to Milestone
Moblin Image Creator
Fix Released
Medium
Praj

Bug Description

We ran into a case where Image Creator suddenly started leaving the xserver-xorg-input-* package out of one of our builds. The result is that there are no X drivers for keyboard + mouse in the build, which is a problem. We didn't do anything to change our build except add a single, completely unrelated package to our fset.

It turns out the problem was caused by a bad interaction between Image Creator and apt. Image Creator creates a set of packages to be installed by apt. The set is unordered, so there is no guarantee of the order in which packages are installed. This is bad in the following case:

The xorg package has a dependency on input drivers that can be fulfilled by either the xserver-xorg-input-all metapckage package or the xserver-xorg-input-2 virtual package. The GNOME Mobile fset explicitly installs xorg and xserver-xorg-input-evtouch. If 'xorg' is passed to the apt-get install command before 'xserver-xorg-input-evtouch', apt will satisfy the dependency by installing the xserver-xorg-input-all package. If xserver-xorg-input-evtouch is passed to the apt-get install command before xorg, apt will install the evtouch package first. When apt-get then tries to install xorg, it sees that the xserver-xorg-input-2 dependency has already been satsfied (by the evtouch package), and apt decides not to install the xserver-xorg-input-all package.

So, this does the right thing:
apt-get install xorg xserver-xorg-input-evtouch

This doesn't do the right thing:
apt-get install xserver-xorg-input-evtouch xorg

Because Image Creator uses a set to hold the list of packages - rather than an ordered data structure like a list - the list of packages passed to apt-get install can be in any order. If python happens to place xserver-xorg-input-evtouch before xorg, the generated image won't be correct.

--

I think there are a couple solutions:
1) Explicitly include the xserver-xorg-input-* packages in the base fset.
2) Fix Image Creator to use an ordered data structure for the list of packages. This would force Image Creator to install packages in the order specified in the fset, which would result in the correct behavior for the above example.

Revision history for this message
Steve Magoun (smagoun) wrote :

I found another case in which the Image Creator behavior is a problem. Sometimes our builds include epiphany-browser and its required packages, even though we don't want it there. We have 2 packages - postr and totem-mozilla - that depend on the <www-browser> virtual package. midbrowser provides www-browser, and since midbrowser is installed by the ubuntu-mobile package we should never need epiphany-browser. However, it totem-mozilla or postr come before ubuntu-mobile in the list of packages passed to apt-get install, we'll wind up with both midbrowser and epiphany-browser.

Revision history for this message
Loïc Minier (lool) wrote :

I think MIC should have a reproducible behavior and hence should order packages on apt-get command lines.

Perhaps other APT tools such as aptitude or the python-apt bindings will result in something closer to the intent?

Anyway, if we need input-all, then let's list it explicitely.

Praj (prajwal-linux)
Changed in moblin-image-creator:
assignee: nobody → prajwal-linux
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Praj (prajwal-linux) wrote :

Using a list instead of a set to list all packages in fset. The packages are ordered in the same way as listed in *.fset.

Changed in moblin-image-creator:
status: In Progress → Fix Committed
Revision history for this message
dandan.hong&#64;intel.com (dandan-hong) wrote :

Verify this issue in MIC v 0.45,checked out on 2008-04-16,3:30 PM PRC time.

Changed in moblin-image-creator:
status: Fix Committed → 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.