diff --git a/CHANGES b/CHANGES
index e926da1759c069c5337df4ad019f9994f3969f0f..66323ff9f1325bb0a3fcf438fcfc5d7cf2f0ece9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -23,6 +23,9 @@ This release contains contributions from (alphabetically by first name):
 
 ## Modules ##
 
+- The *packagechooser* module can load data from the config-file,
+  from AppData XML files referred by the config-file, and (new) also
+  from AppStream caches by referring to an application's AppStream id. #1212
 - The *partition* module now understands the units *KB*, *MB*, *GB* which
   are powers-of-ten sizes, alongside the powers-of-two sizes that it already
   used. (thanks to Arnaud)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5461aa3c84b9dc1b6b6c0569c79f8965e70fb499..321989ac0358a71814a4c1e783af6db845377adb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,9 @@
 #   SKIP_MODULES    : a space or semicolon-separated list of directory names
 #                     under src/modules that should not be built.
 #   USE_<foo>       : fills in SKIP_MODULES for modules called <foo>-<something>
+#   WITH_<foo>      : try to enable <foo> (these usually default to ON). For
+#                     a list of WITH_<foo> grep CMakeCache.txt after running
+#                     CMake once.
 #   BUILD_<foo>     : choose additional things to build
 #   DEBUG_<foo>     : special developer flags for debugging
 #
diff --git a/src/libcalamares/locale/LabelModel.cpp b/src/libcalamares/locale/LabelModel.cpp
index 87fca9d85ab79c8b44603dec615493fe29635016..bcb8af05766d6572cfb87e225a4d0be145316157 100644
--- a/src/libcalamares/locale/LabelModel.cpp
+++ b/src/libcalamares/locale/LabelModel.cpp
@@ -29,6 +29,7 @@ namespace Locale
 
 LabelModel::LabelModel( const QStringList& locales, QObject* parent )
     : QAbstractListModel( parent )
+    , m_localeIds( locales )
 {
     Q_ASSERT( locales.count() > 0 );
     m_locales.reserve( locales.count() );
@@ -132,7 +133,7 @@ LabelModel::find( const QString& countryCode ) const
 LabelModel*
 availableTranslations()
 {
-    static LabelModel* model = new LabelModel( QString( CALAMARES_TRANSLATION_LANGUAGES ).split( ';' ) );
+    static LabelModel* model = new LabelModel( QStringLiteral( CALAMARES_TRANSLATION_LANGUAGES ).split( ';' ) );
     return model;
 }
 
diff --git a/src/libcalamares/locale/LabelModel.h b/src/libcalamares/locale/LabelModel.h
index 5082440d3e7766bbb53977dd653545fa6801b872..03daddbf3817d6f4b4301a6bb5c22e408468e8ce 100644
--- a/src/libcalamares/locale/LabelModel.h
+++ b/src/libcalamares/locale/LabelModel.h
@@ -54,6 +54,9 @@ public:
      */
     const Label& locale( int row ) const;
 
+    /// @brief Returns all of the locale Ids (e.g. en_US) put into this model.
+    const QStringList& localeIds() const { return m_localeIds; }
+
     /** @brief Searches for an item that matches @p predicate
      *
      * Returns the row number of the first match, or -1 if there isn't one.
@@ -67,6 +70,7 @@ public:
 
 private:
     QVector< Label > m_locales;
+    QStringList m_localeIds;
 };
 
 /** @brief Returns a model with all available translations.
diff --git a/src/libcalamares/utils/PluginFactory.h b/src/libcalamares/utils/PluginFactory.h
index 84694a83a68660c827584c25d238759691bad752..e8236a888d17fc7536e4ee4d0c35348e3c3c8b3b 100644
--- a/src/libcalamares/utils/PluginFactory.h
+++ b/src/libcalamares/utils/PluginFactory.h
@@ -58,8 +58,8 @@ public:
     template < class impl, class ParentType >
     static QObject* createInstance( QWidget* parentWidget, QObject* parent, const QVariantList& args )
     {
-        Q_UNUSED( parentWidget );
-        Q_UNUSED( args );
+        Q_UNUSED( parentWidget )
+        Q_UNUSED( args )
         ParentType* p = nullptr;
         if ( parent )
         {
diff --git a/src/modules/mount/main.py b/src/modules/mount/main.py
index ed649aead315af04a4c53cf497006b7cff204052..b10c5c0bfe799a6df5ce5a462f1290666e0effe2 100644
--- a/src/modules/mount/main.py
+++ b/src/modules/mount/main.py
@@ -37,111 +37,106 @@ _ = gettext.translation("calamares-python",
 def pretty_name():
     return _("Mounting partitions.")
 
-
-def mount_partitions(root_mount_point, partitions):
+def mount_partition(root_mount_point, partition, partitions):
     """
-    Pass back mount point and filesystem for each partition.
+    Do a single mount of @p partition inside @p root_mount_point.
 
-    :param root_mount_point:
-    :param partitions:
+    The @p partitions are used to handle btrfs special-cases:
+    then subvolumes are created for root and home.
     """
-    for partition in partitions:
-        if "mountPoint" not in partition or not partition["mountPoint"]:
-            continue
-        # Create mount point with `+` rather than `os.path.join()` because
-        # `partition["mountPoint"]` starts with a '/'.
-        raw_mount_point = partition["mountPoint"]
-        mount_point = root_mount_point + raw_mount_point
-
-        # Ensure that the created directory has the correct SELinux context on
-        # SELinux-enabled systems.
-        os.makedirs(mount_point, exist_ok=True)
-        subprocess.call(['chcon', '--reference=' + raw_mount_point,
-                         mount_point])
-
-        fstype = partition.get("fs", "").lower()
+    # Create mount point with `+` rather than `os.path.join()` because
+    # `partition["mountPoint"]` starts with a '/'.
+    raw_mount_point = partition["mountPoint"]
+    mount_point = root_mount_point + raw_mount_point
+
+    # Ensure that the created directory has the correct SELinux context on
+    # SELinux-enabled systems.
+    os.makedirs(mount_point, exist_ok=True)
+    subprocess.call(['chcon', '--reference=' + raw_mount_point,
+                     mount_point])
+
+    fstype = partition.get("fs", "").lower()
+
+    if fstype == "fat16" or fstype == "fat32":
+        fstype = "vfat"
+
+    if "luksMapperName" in partition:
+        libcalamares.utils.debug(
+            "about to mount {!s}".format(partition["luksMapperName"]))
+        libcalamares.utils.mount(
+            "/dev/mapper/{!s}".format(partition["luksMapperName"]),
+            mount_point,
+            fstype,
+            partition.get("options", ""),
+            )
+
+    else:
+        libcalamares.utils.mount(partition["device"],
+                                 mount_point,
+                                 fstype,
+                                 partition.get("options", ""),
+                                 )
+
+    # If the root partition is btrfs, we create a subvolume "@"
+    # for the root mount point.
+    # If a separate /home partition isn't defined, we also create
+    # a subvolume "@home".
+    # Finally we remount all of the above on the correct paths.
+    if fstype == "btrfs" and partition["mountPoint"] == '/':
+        has_home_mount_point = False
+        for p in partitions:
+            if "mountPoint" not in p or not p["mountPoint"]:
+                continue
+            if p["mountPoint"] == "/home":
+                has_home_mount_point = True
+                break
+
+        subprocess.check_call(['btrfs', 'subvolume', 'create',
+                               root_mount_point + '/@'])
+
+        if not has_home_mount_point:
+            subprocess.check_call(['btrfs', 'subvolume', 'create',
+                                   root_mount_point + '/@home'])
 
-        if fstype == "fat16" or fstype == "fat32":
-            fstype = "vfat"
+        subprocess.check_call(["umount", "-v", root_mount_point])
 
         if "luksMapperName" in partition:
-            libcalamares.utils.debug(
-                "about to mount {!s}".format(partition["luksMapperName"]))
             libcalamares.utils.mount(
                 "/dev/mapper/{!s}".format(partition["luksMapperName"]),
                 mount_point,
                 fstype,
-                partition.get("options", ""),
+                ",".join(
+                    ["subvol=@", partition.get("options", "")]),
                 )
-
-        else:
-            libcalamares.utils.mount(partition["device"],
-                                     mount_point,
-                                     fstype,
-                                     partition.get("options", ""),
-                                     )
-
-        # If the root partition is btrfs, we create a subvolume "@"
-        # for the root mount point.
-        # If a separate /home partition isn't defined, we also create
-        # a subvolume "@home".
-        # Finally we remount all of the above on the correct paths.
-        if fstype == "btrfs" and partition["mountPoint"] == '/':
-            has_home_mount_point = False
-            for p in partitions:
-                if "mountPoint" not in p or not p["mountPoint"]:
-                    continue
-                if p["mountPoint"] == "/home":
-                    has_home_mount_point = True
-                    break
-
-            subprocess.check_call(['btrfs', 'subvolume', 'create',
-                                   root_mount_point + '/@'])
-
             if not has_home_mount_point:
-                subprocess.check_call(['btrfs', 'subvolume', 'create',
-                                       root_mount_point + '/@home'])
-
-            subprocess.check_call(["umount", "-v", root_mount_point])
-
-            if "luksMapperName" in partition:
                 libcalamares.utils.mount(
                     "/dev/mapper/{!s}".format(partition["luksMapperName"]),
-                    mount_point,
+                    root_mount_point + "/home",
                     fstype,
                     ",".join(
-                        ["subvol=@", partition.get("options", "")]),
+                        ["subvol=@home", partition.get("options", "")]),
                     )
-                if not has_home_mount_point:
-                    libcalamares.utils.mount(
-                        "/dev/mapper/{!s}".format(partition["luksMapperName"]),
-                        root_mount_point + "/home",
-                        fstype,
-                        ",".join(
-                            ["subvol=@home", partition.get("options", "")]),
-                        )
-            else:
+        else:
+            libcalamares.utils.mount(
+                partition["device"],
+                mount_point,
+                fstype,
+                ",".join(["subvol=@", partition.get("options", "")]),
+                )
+            if not has_home_mount_point:
                 libcalamares.utils.mount(
                     partition["device"],
-                    mount_point,
+                    root_mount_point + "/home",
                     fstype,
-                    ",".join(["subvol=@", partition.get("options", "")]),
+                    ",".join(
+                        ["subvol=@home", partition.get("options", "")]),
                     )
-                if not has_home_mount_point:
-                    libcalamares.utils.mount(
-                        partition["device"],
-                        root_mount_point + "/home",
-                        fstype,
-                        ",".join(
-                            ["subvol=@home", partition.get("options", "")]),
-                        )
 
 
 def run():
     """
-    Define mountpoints.
-
-    :return:
+    Mount all the partitions from GlobalStorage and from the job configuration.
+    Partitions are mounted in-lexical-order of their mountPoint.
     """
     partitions = libcalamares.globalstorage.value("partitions")
 
@@ -158,17 +153,19 @@ def run():
     if not extra_mounts and not extra_mounts_efi:
         libcalamares.utils.warning("No extra mounts defined. Does mount.conf exist?")
 
-    # Sort by mount points to ensure / is mounted before the rest
-    partitions.sort(key=lambda x: x["mountPoint"])
-    mount_partitions(root_mount_point, partitions)
-    mount_partitions(root_mount_point, extra_mounts)
-
-    all_extra_mounts = extra_mounts
     if libcalamares.globalstorage.value("firmwareType") == "efi":
-        mount_partitions(root_mount_point, extra_mounts_efi)
-        all_extra_mounts.extend(extra_mounts_efi)
+        extra_mounts.extend(extra_mounts_efi)
+
+    # Add extra mounts to the partitions list and sort by mount points.
+    # This way, we ensure / is mounted before the rest, and every mount point
+    # is created on the right partition (e.g. if a partition is to be mounted
+    # under /tmp, we make sure /tmp is mounted before the partition)
+    mountable_partitions = [ p for p in partitions + extra_mounts if "mountPoint" in p and p["mountPoint"] ]
+    mountable_partitions.sort(key=lambda x: x["mountPoint"])
+    for partition in mountable_partitions:
+        mount_partition(root_mount_point, partition, partitions)
 
     libcalamares.globalstorage.insert("rootMountPoint", root_mount_point)
 
     # Remember the extra mounts for the unpackfs module
-    libcalamares.globalstorage.insert("extraMounts", all_extra_mounts)
+    libcalamares.globalstorage.insert("extraMounts", extra_mounts)
diff --git a/src/modules/packagechooser/CMakeLists.txt b/src/modules/packagechooser/CMakeLists.txt
index 70a86a3bb7011dbce4048b372835aaa5a5a2cd41..eeae655c94f5e7f5c4391d6c5fc35f5d7a14524a 100644
--- a/src/modules/packagechooser/CMakeLists.txt
+++ b/src/modules/packagechooser/CMakeLists.txt
@@ -1,15 +1,39 @@
 find_package( Qt5 COMPONENTS Core Gui Widgets REQUIRED )
 set( _extra_libraries "" )
+set( _extra_src "" )
 
 ### OPTIONAL AppData XML support in PackageModel
 #
 #
-find_package(Qt5 COMPONENTS Xml)
-if ( Qt5Xml_FOUND )
-    add_definitions( -DHAVE_XML )
-    list( APPEND _extra_libraries Qt5::Xml )
+option( WITH_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON )
+if ( WITH_APPDATA )
+    find_package(Qt5 COMPONENTS Xml)
+    if ( Qt5Xml_FOUND )
+        add_definitions( -DHAVE_XML )
+        list( APPEND _extra_libraries Qt5::Xml )
+        list( APPEND _extra_src ItemAppData.cpp )
+    endif()
+endif()
+
+### OPTIONAL AppStream support in PackageModel
+#
+#
+option( WITH_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON )
+if ( WITH_APPSTREAM )
+    find_package(AppStreamQt)
+    set_package_properties(
+        AppStreamQt PROPERTIES
+        DESCRIPTION "Support for AppStream (cache) data"
+        URL "https://github.com/ximion/appstream"
+        PURPOSE "AppStream provides package data"
+        TYPE OPTIONAL
+    )
+    if ( AppStreamQt_FOUND )
+        add_definitions( -DHAVE_APPSTREAM )
+        list( APPEND _extra_libraries AppStreamQt )
+        list( APPEND _extra_src ItemAppStream.cpp )
+    endif()
 endif()
-    
 
 calamares_add_plugin( packagechooser
     TYPE viewmodule
@@ -18,6 +42,7 @@ calamares_add_plugin( packagechooser
         PackageChooserPage.cpp
         PackageChooserViewStep.cpp
         PackageModel.cpp
+        ${_extra_src}
     RESOURCES
         packagechooser.qrc
     UI
diff --git a/src/modules/packagechooser/ItemAppData.cpp b/src/modules/packagechooser/ItemAppData.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ed0ba922340a090fd4611a370fb4d64bca3291ed
--- /dev/null
+++ b/src/modules/packagechooser/ItemAppData.cpp
@@ -0,0 +1,234 @@
+/* === This file is part of Calamares - <https://github.com/calamares> ===
+ *
+ *   Copyright 2019, Adriaan de Groot <groot@kde.org>
+ *
+ *   Calamares is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Calamares is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/** @brief Loading items from AppData XML files.
+ *
+ * Only used if QtXML is found, implements PackageItem::fromAppData().
+ */
+#include "PackageModel.h"
+
+#include "utils/Logger.h"
+#include "utils/Variant.h"
+
+#include <QDomDocument>
+#include <QDomNodeList>
+#include <QFile>
+
+/** @brief try to load the given @p fileName XML document
+ *
+ * Returns a QDomDocument, which will be valid iff the file can
+ * be read and contains valid XML data.
+ */
+static inline QDomDocument
+loadAppData( const QString& fileName )
+{
+    QFile file( fileName );
+    if ( !file.open( QIODevice::ReadOnly ) )
+    {
+        return QDomDocument();
+    }
+    QDomDocument doc( "AppData" );
+    if ( !doc.setContent( &file ) )
+    {
+        file.close();
+        return QDomDocument();
+    }
+    file.close();
+    return doc;
+}
+
+/** @brief gets the text of child element @p tagName
+ */
+static inline QString
+getChildText( const QDomNode& n, const QString& tagName )
+{
+    QDomElement e = n.firstChildElement( tagName );
+    return e.isNull() ? QString() : e.text();
+}
+
+/** @brief Gets a suitable screenshot path
+ *
+ * The <screenshots> element contains zero or more <screenshot>
+ * elements, which can have a *type* associated with them.
+ * Scan the screenshot elements, return the <image> path
+ * for the one labeled with type=default or, if there is no
+ * default, the first element.
+ */
+static inline QString
+getScreenshotPath( const QDomNode& n )
+{
+    QDomElement shotsNode = n.firstChildElement( "screenshots" );
+    if ( shotsNode.isNull() )
+    {
+        return QString();
+    }
+
+    const QDomNodeList shotList = shotsNode.childNodes();
+    int firstScreenshot = -1;  // Use which screenshot node?
+    for ( int i = 0; i < shotList.count(); ++i )
+    {
+        if ( !shotList.at( i ).isElement() )
+        {
+            continue;
+        }
+        QDomElement e = shotList.at( i ).toElement();
+        if ( e.tagName() != "screenshot" )
+        {
+            continue;
+        }
+        // If none has the "type=default" attribute, use the first one
+        if ( firstScreenshot < 0 )
+        {
+            firstScreenshot = i;
+        }
+        // But type=default takes precedence.
+        if ( e.hasAttribute( "type" ) && e.attribute( "type" ) == "default" )
+        {
+            firstScreenshot = i;
+            break;
+        }
+    }
+
+    if ( firstScreenshot >= 0 )
+    {
+        return shotList.at( firstScreenshot ).firstChildElement( "image" ).text();
+    }
+
+    return QString();
+}
+
+/** @brief Returns language of the given element @p e
+ *
+ * Transforms the attribute value for xml:lang to something
+ * suitable for TranslatedString (e.g. [lang]).
+ */
+static inline QString
+getLanguage( const QDomElement& e )
+{
+    QString language = e.attribute( "xml:lang" );
+    if ( !language.isEmpty() )
+    {
+        language.replace( '-', '_' );
+        language.prepend( '[' );
+        language.append( ']' );
+    }
+    return language;
+}
+
+/** @brief Scan the list of @p children for @p tagname elements and add them to the map
+ *
+ * Uses @p mapname instead of @p tagname for the entries in map @p m
+ * to allow renaming from XML to map keys (in particular for
+ * TranslatedString). Also transforms xml:lang attributes to suitable
+ * key-decorations on @p mapname.
+ */
+static inline void
+fillMap( QVariantMap& m, const QDomNodeList& children, const QString& tagname, const QString& mapname )
+{
+    for ( int i = 0; i < children.count(); ++i )
+    {
+        if ( !children.at( i ).isElement() )
+        {
+            continue;
+        }
+
+        QDomElement e = children.at( i ).toElement();
+        if ( e.tagName() != tagname )
+        {
+            continue;
+        }
+
+        m[ mapname + getLanguage( e ) ] = e.text();
+    }
+}
+
+/** @brief gets the <name> and <description> elements
+*
+* Builds up a map of the <name> elements (which may have a *lang*
+* attribute to indicate translations and paragraphs of the
+* <description> element (also with lang). Uses the <summary>
+* elements to supplement the description if no description
+* is available for a given language.
+*
+* Returns a map with keys suitable for use by TranslatedString.
+*/
+static inline QVariantMap
+getNameAndSummary( const QDomNode& n )
+{
+    QVariantMap m;
+
+    const QDomNodeList children = n.childNodes();
+    fillMap( m, children, "name", "name" );
+    fillMap( m, children, "summary", "description" );
+
+    const QDomElement description = n.firstChildElement( "description" );
+    if ( !description.isNull() )
+    {
+        fillMap( m, description.childNodes(), "p", "description" );
+    }
+
+    return m;
+}
+
+PackageItem
+fromAppData( const QVariantMap& item_map )
+{
+    QString fileName = CalamaresUtils::getString( item_map, "appdata" );
+    if ( fileName.isEmpty() )
+    {
+        cWarning() << "Can't load AppData without a suitable key.";
+        return PackageItem();
+    }
+    cDebug() << "Loading AppData XML from" << fileName;
+
+    QDomDocument doc = loadAppData( fileName );
+    if ( doc.isNull() )
+    {
+        return PackageItem();
+    }
+
+    QDomElement componentNode = doc.documentElement();
+    if ( !componentNode.isNull() && componentNode.tagName() == "component" )
+    {
+        // An "id" entry in the Calamares config overrides ID in the AppData
+        QString id = CalamaresUtils::getString( item_map, "id" );
+        if ( id.isEmpty() )
+        {
+            id = getChildText( componentNode, "id" );
+        }
+        if ( id.isEmpty() )
+        {
+            return PackageItem();
+        }
+
+        // A "screenshot" entry in the Calamares config overrides AppData
+        QString screenshotPath = CalamaresUtils::getString( item_map, "screenshot" );
+        if ( screenshotPath.isEmpty() )
+        {
+            screenshotPath = getScreenshotPath( componentNode );
+        }
+
+        QVariantMap map = getNameAndSummary( componentNode );
+        map.insert( "id", id );
+        map.insert( "screenshot", screenshotPath );
+
+        return PackageItem( map );
+    }
+
+    return PackageItem();
+}
diff --git a/src/modules/packagechooser/ItemAppData.h b/src/modules/packagechooser/ItemAppData.h
new file mode 100644
index 0000000000000000000000000000000000000000..72617ff0c7519c9fb51d39e107893956c291a03e
--- /dev/null
+++ b/src/modules/packagechooser/ItemAppData.h
@@ -0,0 +1,37 @@
+/* === This file is part of Calamares - <https://github.com/calamares> ===
+ *
+ *   Copyright 2019, Adriaan de Groot <groot@kde.org>
+ *
+ *   Calamares is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Calamares is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef ITEMAPPDATA_H
+#define ITEMAPPDATA_H
+
+#include "PackageModel.h"
+
+/** @brief Loads an AppData XML file and returns a PackageItem
+ *
+ * The @p map must have a key *appdata*. That is used as the
+ * primary source of information, but keys *id* and *screenshotPath*
+ * may be used to override parts of the AppData -- so that the
+ * ID is under the control of Calamares, and the screenshot can be
+ * forced to a local path available on the installation medium.
+ *
+ * Requires XML support in libcalamares, if not present will
+ * return invalid PackageItems.
+ */
+PackageItem fromAppData( const QVariantMap& map );
+
+#endif
diff --git a/src/modules/packagechooser/ItemAppStream.cpp b/src/modules/packagechooser/ItemAppStream.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..83837a9ca225bf33fe085af1a38e6a81217930cb
--- /dev/null
+++ b/src/modules/packagechooser/ItemAppStream.cpp
@@ -0,0 +1,159 @@
+/* === This file is part of Calamares - <https://github.com/calamares> ===
+ *
+ *   Copyright 2019, Adriaan de Groot <groot@kde.org>
+ *
+ *   Calamares is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Calamares is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/** @brief Loading items from AppData XML files.
+ *
+ * Only used if QtXML is found, implements PackageItem::fromAppData().
+ */
+#include "PackageModel.h"
+
+#include "locale/LabelModel.h"
+#include "utils/Logger.h"
+#include "utils/Variant.h"
+
+#include <AppStreamQt/image.h>
+#include <AppStreamQt/pool.h>
+#include <AppStreamQt/screenshot.h>
+
+/// @brief Return number of pixels in a size, for < ordering purposes
+static inline quint64
+sizeOrder( const QSize& size )
+{
+    return size.width() * size.height();
+}
+
+/// @brief Sets a screenshot in @p map from @p screenshot, if a usable one is found
+static void
+setScreenshot( QVariantMap& map, const AppStream::Screenshot& screenshot )
+{
+    if ( screenshot.images().count() < 1 )
+    {
+        return;
+    }
+
+    // Pick the smallest
+    QUrl url;
+    quint64 size = sizeOrder( screenshot.images().first().size() );
+    for ( const auto& img : screenshot.images() )
+    {
+        if ( sizeOrder( img.size() ) <= size )
+        {
+            url = img.url();
+        }
+    }
+
+    if ( url.isValid() )
+    {
+        map.insert( "screenshot", url.toString() );
+    }
+}
+
+/// @brief Interpret an AppStream Component
+static PackageItem
+fromComponent( AppStream::Component& component )
+{
+    QVariantMap map;
+    map.insert( "id", component.id() );
+    map.insert( "package", component.packageNames().join( "," ) );
+
+    // Assume that the pool has loaded "ALL" locales, but it might be set
+    // to any of them; get the en_US locale as "untranslated" and then
+    // loop over Calamares locales (since there is no way to query for
+    // available locales in the Component) to see if there's anything else.
+    component.setActiveLocale( QStringLiteral( "en_US" ) );
+    QString en_name = component.name();
+    QString en_description = component.description();
+    map.insert( "name", en_name );
+    map.insert( "description", en_description );
+
+    for ( const QString& locale : CalamaresUtils::Locale::availableTranslations()->localeIds() )
+    {
+        component.setActiveLocale( locale );
+        QString name = component.name();
+        if ( name != en_name )
+        {
+            map.insert( QStringLiteral( "name[%1]" ).arg( locale ), name );
+        }
+        QString description = component.description();
+        if ( description != en_description )
+        {
+            map.insert( QStringLiteral( "description[%1]" ).arg( locale ), description );
+        }
+    }
+
+
+    auto screenshots = component.screenshots();
+    if ( screenshots.count() > 0 )
+    {
+        bool done = false;
+        for ( const auto& s : screenshots )
+        {
+            if ( s.isDefault() )
+            {
+                setScreenshot( map, s );
+                done = true;
+                break;
+            }
+        }
+        if ( !done )
+        {
+            setScreenshot( map, screenshots.first() );
+        }
+    }
+
+    return PackageItem( map );
+}
+
+PackageItem
+fromAppStream( AppStream::Pool& pool, const QVariantMap& item_map )
+{
+    QString appstreamId = CalamaresUtils::getString( item_map, "appstream" );
+    if ( appstreamId.isEmpty() )
+    {
+        cWarning() << "Can't load AppStream without a suitable appstreamId.";
+        return PackageItem();
+    }
+    cDebug() << "Loading AppStream data for" << appstreamId;
+
+    auto itemList = pool.componentsById( appstreamId );
+    if ( itemList.count() < 1 )
+    {
+        cWarning() << "No AppStream data for" << appstreamId;
+        return PackageItem();
+    }
+    if ( itemList.count() > 1 )
+    {
+        cDebug() << "Multiple AppStream data for" << appstreamId << "using first.";
+    }
+
+    auto r = fromComponent( itemList.first() );
+    if ( r.isValid() )
+    {
+        QString id = CalamaresUtils::getString( item_map, "id" );
+        QString screenshotPath = CalamaresUtils::getString( item_map, "screenshot" );
+        if ( !id.isEmpty() )
+        {
+            r.id = id;
+        }
+        if ( !screenshotPath.isEmpty() )
+        {
+            r.screenshot = screenshotPath;
+        }
+    }
+    return r;
+}
diff --git a/src/modules/packagechooser/ItemAppStream.h b/src/modules/packagechooser/ItemAppStream.h
new file mode 100644
index 0000000000000000000000000000000000000000..c44b84b06dfb7aea43ca8d56bede8a143dff8545
--- /dev/null
+++ b/src/modules/packagechooser/ItemAppStream.h
@@ -0,0 +1,43 @@
+/* === This file is part of Calamares - <https://github.com/calamares> ===
+ *
+ *   Copyright 2019, Adriaan de Groot <groot@kde.org>
+ *
+ *   Calamares is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Calamares is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef ITEMAPPSTREAM_H
+#define ITEMAPPSTREAM_H
+
+#include "PackageModel.h"
+
+namespace AppStream
+{
+class Pool;
+}
+
+/** @brief Loads an item from AppStream data.
+ *
+ * The @p map must have a key *appstream*. That is used as the
+ * primary source of information from the AppStream cache, but
+ * keys *id* and *screenshotPath* may be used to override parts
+ * of the AppStream data -- so that the ID is under the control
+ * of Calamares, and the screenshot can be forced to a local path
+ * available on the installation medium.
+ *
+ * Requires AppStreamQt, if not present will return invalid
+ * PackageItems.
+ */
+PackageItem fromAppStream( AppStream::Pool& pool, const QVariantMap& map );
+
+#endif
diff --git a/src/modules/packagechooser/PackageChooserViewStep.cpp b/src/modules/packagechooser/PackageChooserViewStep.cpp
index c2e849d5fee894548b62903f29d029ddef211704..7758986ba781128570c5699eafdccf3afbb76be6 100644
--- a/src/modules/packagechooser/PackageChooserViewStep.cpp
+++ b/src/modules/packagechooser/PackageChooserViewStep.cpp
@@ -18,6 +18,14 @@
 
 #include "PackageChooserViewStep.h"
 
+#ifdef HAVE_XML
+#include "ItemAppData.h"
+#endif
+#ifdef HAVE_APPSTREAM
+#include "ItemAppStream.h"
+#include <AppStreamQt/pool.h>
+#include <memory>
+#endif
 #include "PackageChooserPage.h"
 #include "PackageModel.h"
 
@@ -203,6 +211,11 @@ PackageChooserViewStep::fillModel( const QVariantList& items )
         return;
     }
 
+#ifdef HAVE_APPSTREAM
+    std::unique_ptr< AppStream::Pool > pool;
+    bool poolOk = false;
+#endif
+
     cDebug() << "Loading PackageChooser model items from config";
     int item_index = 0;
     for ( const auto& item_it : items )
@@ -217,7 +230,28 @@ PackageChooserViewStep::fillModel( const QVariantList& items )
 
         if ( item_map.contains( "appdata" ) )
         {
-            m_model->addPackage( PackageItem::fromAppData( item_map ) );
+#ifdef HAVE_XML
+            m_model->addPackage( fromAppData( item_map ) );
+#else
+            cWarning() << "Loading AppData XML is not supported.";
+#endif
+        }
+        else if ( item_map.contains( "appstream" ) )
+        {
+#ifdef HAVE_APPSTREAM
+            if ( !pool )
+            {
+                pool = std::make_unique< AppStream::Pool >();
+                pool->setLocale( QStringLiteral( "ALL" ) );
+                poolOk = pool->load();
+            }
+            if ( pool && poolOk )
+            {
+                m_model->addPackage( fromAppStream( *pool, item_map ) );
+            }
+#else
+            cWarning() << "Loading AppStream data is not supported.";
+#endif
         }
         else
         {
diff --git a/src/modules/packagechooser/PackageModel.cpp b/src/modules/packagechooser/PackageModel.cpp
index 59c6973ba313ab8118926339ca2e20d63aba73ee..12995fad5424ab3f3c446193652cc20ad67b20b0 100644
--- a/src/modules/packagechooser/PackageModel.cpp
+++ b/src/modules/packagechooser/PackageModel.cpp
@@ -21,12 +21,6 @@
 #include "utils/Logger.h"
 #include "utils/Variant.h"
 
-#ifdef HAVE_XML
-#include <QDomDocument>
-#include <QDomNodeList>
-#include <QFile>
-#endif
-
 const NamedEnumTable< PackageChooserMode >&
 roleNames()
 {
@@ -94,219 +88,6 @@ PackageItem::PackageItem::PackageItem( const QVariantMap& item_map )
     }
 }
 
-#ifdef HAVE_XML
-/** @brief try to load the given @p fileName XML document
- *
- * Returns a QDomDocument, which will be valid iff the file can
- * be read and contains valid XML data.
- */
-static inline QDomDocument
-loadAppData( const QString& fileName )
-{
-    QFile file( fileName );
-    if ( !file.open( QIODevice::ReadOnly ) )
-    {
-        return QDomDocument();
-    }
-    QDomDocument doc( "AppData" );
-    if ( !doc.setContent( &file ) )
-    {
-        file.close();
-        return QDomDocument();
-    }
-    file.close();
-    return doc;
-}
-
-/** @brief gets the text of child element @p tagName
- */
-static inline QString
-getChildText( const QDomNode& n, const QString& tagName )
-{
-    QDomElement e = n.firstChildElement( tagName );
-    return e.isNull() ? QString() : e.text();
-}
-
-/** @brief Gets a suitable screenshot path
- *
- * The <screenshots> element contains zero or more <screenshot>
- * elements, which can have a *type* associated with them.
- * Scan the screenshot elements, return the <image> path
- * for the one labeled with type=default or, if there is no
- * default, the first element.
- */
-static inline QString
-getScreenshotPath( const QDomNode& n )
-{
-    QDomElement shotsNode = n.firstChildElement( "screenshots" );
-    if ( shotsNode.isNull() )
-    {
-        return QString();
-    }
-
-    const QDomNodeList shotList = shotsNode.childNodes();
-    int firstScreenshot = -1;  // Use which screenshot node?
-    for ( int i = 0; i < shotList.count(); ++i )
-    {
-        if ( !shotList.at( i ).isElement() )
-        {
-            continue;
-        }
-        QDomElement e = shotList.at( i ).toElement();
-        if ( e.tagName() != "screenshot" )
-        {
-            continue;
-        }
-        // If none has the "type=default" attribute, use the first one
-        if ( firstScreenshot < 0 )
-        {
-            firstScreenshot = i;
-        }
-        // But type=default takes precedence.
-        if ( e.hasAttribute( "type" ) && e.attribute( "type" ) == "default" )
-        {
-            firstScreenshot = i;
-            break;
-        }
-    }
-
-    if ( firstScreenshot >= 0 )
-    {
-        return shotList.at( firstScreenshot ).firstChildElement( "image" ).text();
-    }
-
-    return QString();
-}
-
-/** @brief Returns language of the given element @p e
- *
- * Transforms the attribute value for xml:lang to something
- * suitable for TranslatedString (e.g. [lang]).
- */
-static inline QString
-getLanguage( const QDomElement& e )
-{
-    QString language = e.attribute( "xml:lang" );
-    if ( !language.isEmpty() )
-    {
-        language.replace( '-', '_' );
-        language.prepend( '[' );
-        language.append( ']' );
-    }
-    return language;
-}
-
-/** @brief Scan the list of @p children for @p tagname elements and add them to the map
- *
- * Uses @p mapname instead of @p tagname for the entries in map @p m
- * to allow renaming from XML to map keys (in particular for
- * TranslatedString). Also transforms xml:lang attributes to suitable
- * key-decorations on @p mapname.
- */
-static inline void
-fillMap( QVariantMap& m, const QDomNodeList& children, const QString& tagname, const QString& mapname )
-{
-    for ( int i = 0; i < children.count(); ++i )
-    {
-        if ( !children.at( i ).isElement() )
-        {
-            continue;
-        }
-
-        QDomElement e = children.at( i ).toElement();
-        if ( e.tagName() != tagname )
-        {
-            continue;
-        }
-
-        m[ mapname + getLanguage( e ) ] = e.text();
-    }
-}
-
-/** @brief gets the <name> and <description> elements
-*
-* Builds up a map of the <name> elements (which may have a *lang*
-* attribute to indicate translations and paragraphs of the
-* <description> element (also with lang). Uses the <summary>
-* elements to supplement the description if no description
-* is available for a given language.
-*
-* Returns a map with keys suitable for use by TranslatedString.
-*/
-static inline QVariantMap
-getNameAndSummary( const QDomNode& n )
-{
-    QVariantMap m;
-
-    const QDomNodeList children = n.childNodes();
-    fillMap( m, children, "name", "name" );
-    fillMap( m, children, "summary", "description" );
-
-    const QDomElement description = n.firstChildElement( "description" );
-    if ( !description.isNull() )
-    {
-        fillMap( m, description.childNodes(), "p", "description" );
-    }
-
-    return m;
-}
-#endif
-
-PackageItem
-PackageItem::fromAppData( const QVariantMap& item_map )
-{
-#ifdef HAVE_XML
-    QString fileName = CalamaresUtils::getString( item_map, "appdata" );
-    if ( fileName.isEmpty() )
-    {
-        cWarning() << "Can't load AppData without a suitable key.";
-        return PackageItem();
-    }
-    cDebug() << "Loading AppData XML from" << fileName;
-
-    QDomDocument doc = loadAppData( fileName );
-    if ( doc.isNull() )
-    {
-        return PackageItem();
-    }
-
-    QDomElement componentNode = doc.documentElement();
-    if ( !componentNode.isNull() && componentNode.tagName() == "component" )
-    {
-        // An "id" entry in the Calamares config overrides ID in the AppData
-        QString id = CalamaresUtils::getString( item_map, "id" );
-        if ( id.isEmpty() )
-        {
-            id = getChildText( componentNode, "id" );
-        }
-        if ( id.isEmpty() )
-        {
-            return PackageItem();
-        }
-
-        // A "screenshot" entry in the Calamares config overrides AppData
-        QString screenshotPath = CalamaresUtils::getString( item_map, "screenshot" );
-        if ( screenshotPath.isEmpty() )
-        {
-            screenshotPath = getScreenshotPath( componentNode );
-        }
-
-        QVariantMap map = getNameAndSummary( componentNode );
-        map.insert( "id", id );
-        map.insert( "screenshot", screenshotPath );
-
-        return PackageItem( map );
-    }
-
-    return PackageItem();
-#else
-    cWarning() << "Loading AppData XML is not supported.";
-
-    return PackageItem();
-#endif
-}
-
-
 PackageListModel::PackageListModel( QObject* parent )
     : QAbstractListModel( parent )
 {
diff --git a/src/modules/packagechooser/PackageModel.h b/src/modules/packagechooser/PackageModel.h
index 869e124f0a4ac523423e11ca3ec25e0c70eeface..8362bee33d7e956036d312764fa59ae38085418c 100644
--- a/src/modules/packagechooser/PackageModel.h
+++ b/src/modules/packagechooser/PackageModel.h
@@ -80,19 +80,6 @@ struct PackageItem
      * A valid item has an untranslated name available.
      */
     bool isValid() const { return !name.isEmpty(); }
-
-    /** @brief Loads an AppData XML file and returns a PackageItem
-     *
-     * The @p map must have a key *appdata*. That is used as the
-     * primary source of information, but keys *id* and *screenshotPath*
-     * may be used to override parts of the AppData -- so that the
-     * ID is under the control of Calamares, and the screenshot can be
-     * forced to a local path available on the installation medium.
-     *
-     * Requires XML support in libcalamares, if not present will
-     * return invalid PackageItems.
-     */
-    static PackageItem fromAppData( const QVariantMap& map );
 };
 
 using PackageList = QVector< PackageItem >;
diff --git a/src/modules/packagechooser/Tests.cpp b/src/modules/packagechooser/Tests.cpp
index 537ecbd3ccf3e24d99dba8ae06c5681d442de679..639d06d654318bdb69a0f0c6f0f3726f618782e2 100644
--- a/src/modules/packagechooser/Tests.cpp
+++ b/src/modules/packagechooser/Tests.cpp
@@ -18,6 +18,12 @@
 
 #include "Tests.h"
 
+#ifdef HAVE_XML
+#include "ItemAppData.h"
+#endif
+#ifdef HAVE_APPSTREAM
+#include "ItemAppStream.h"
+#endif
 #include "PackageModel.h"
 
 #include "utils/Logger.h"
@@ -62,8 +68,8 @@ PackageChooserTests::testAppData()
     QVariantMap m;
     m.insert( "appdata", appdataName );
 
-    PackageItem p1 = PackageItem::fromAppData( m );
 #ifdef HAVE_XML
+    PackageItem p1 = fromAppData( m );
     QVERIFY( p1.isValid() );
     QCOMPARE( p1.id, "io.calamares.calamares.desktop" );
     QCOMPARE( p1.name.get(), "Calamares" );
@@ -76,12 +82,10 @@ PackageChooserTests::testAppData()
 
     m.insert( "id", "calamares" );
     m.insert( "screenshot", ":/images/calamares.png" );
-    PackageItem p2 = PackageItem::fromAppData( m );
+    PackageItem p2 = fromAppData( m );
     QVERIFY( p2.isValid() );
     QCOMPARE( p2.id, "calamares" );
     QCOMPARE( p2.description.get( QLocale( "nl" ) ), "Calamares is een installatieprogramma voor Linux distributies." );
     QVERIFY( !p2.screenshot.isNull() );
-#else
-    QVERIFY( !p1.isValid() );
 #endif
 }
diff --git a/src/modules/packagechooser/packagechooser.conf b/src/modules/packagechooser/packagechooser.conf
index e9b2d93291a9745e9aee092731fc858c4add7fbe..eebe4dfb4d008b6be8bed22c90cf64a7ebf98cf0 100644
--- a/src/modules/packagechooser/packagechooser.conf
+++ b/src/modules/packagechooser/packagechooser.conf
@@ -20,14 +20,15 @@
 # or one-or-more).
 mode: required
 
-# Items to display in the chooser. In general, this should be a 
+# Items to display in the chooser. In general, this should be a
 # pretty short list to avoid overwhelming the UI. This is a list
 # of objects, and the items are displayed in list order.
 #
 # Either provide the data for an item in the list (using the keys
-# below), or use existing AppData XML files as a source for the data.
+# below), or use existing AppData XML files, or use AppStream cache
+# as a source for the data.
 #
-# For data provided by the list: the item has an id, which is used in 
+# For data provided by the list: the item has an id, which is used in
 # setting the value of *packagechooser_<module-id>*). The following fields
 # are mandatory:
 #
@@ -60,6 +61,14 @@ mode: required
 # be loaded and the screenshot will be missing. An item with *appdata*
 # **may** specify an ID or screenshot path, as above. This will override
 # the settings from AppData.
+#
+# For data provided by AppStream cache: the item has an *appstream*
+# key which matches the AppStream identifier in the cache (e.g.
+# *org.kde.kwrite.desktop*). Data is retrieved from the AppStream
+# cache for that ID. The package name is set from the AppStream data.
+#
+# An item for AppStream may also contain an *id* and a *screenshot*
+# key which will override the data from AppStream.
 items:
     - id: ""
       package: ""
@@ -81,4 +90,5 @@ items:
     - id: calamares
       appdata: ../io.calamares.calamares.appdata.xml
       screenshot: ":/images/calamares.png"
-
+    - id: kate
+      appstream: org.kde.kwrite.desktop