Cache.dpkg_list fails if system locale is not english

Bug #2019161 reported by Samuel Walladge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
Fix Committed
Undecided
Samuel Walladge

Bug Description

For example:

```
# if locale is fr_FR.UTF-8, and git is installed
cache.dpkg_list(['git']) -> {}
```

This is because:

```
# charmhelpers/fetch/ubuntu_apt_pkg.py:158
                pkg.update({k.lower(): v for k, v in zip(headings, data)})
                # pkg = {'nom': 'git', ...
                if 'name' in pkg:
                    pkgs.update({pkg['name']: pkg})
```

Probably need to use a different method to get info from dpkg-query, or force the locale to en_US for consistency.

description: updated
Revision history for this message
Samuel Walladge (swalladge) wrote :
Changed in charm-helpers:
status: New → In Progress
assignee: nobody → Samuel Walladge (swalladge)
Changed in charm-helpers:
status: In Progress → Fix Committed
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.