Comment 0 for bug 2014974

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote : edubuntu-installer and ubuntu-installer incorrectly report package as installed when using languages other than English

Both edubuntu-installer and ubuntustudio-installer are using the following code to determine if a package is installed:

apt-cache policy "${pkg}" | grep Installed | cut -d ':' -f 2 | cut -c 2-

This relies on the string "Installed" being returned by apt-cache which is translated depending on the system language. Since neither edubuntu-installer nor ubuntustudio-installer are localized as of now, another route for determining package installation needs to be used.

This will likely be doable by using the error code return from

dpkg -s "${pkg}" &> /dev/null