[Reproducible-commits] [misc] 01/01: unreproducible-installed: fix parsing of dpkg output with German locale.

Holger Levsen holger at moszumanska.debian.org
Tue Jul 28 07:08:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository misc.

commit 9326f787bddfa35baeddb5b3721c5c28b07294a4
Author: Valentin Lorentz <progval at progval.net>
Date:   Tue Jul 28 08:52:26 2015 +0200

    unreproducible-installed: fix parsing of dpkg output with German locale.
---
 unreproducible-installed | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/unreproducible-installed b/unreproducible-installed
index 9ff9b17..be2fcef 100755
--- a/unreproducible-installed
+++ b/unreproducible-installed
@@ -45,8 +45,10 @@ else: # If no recent file has been found, download the data
 unreproducible = {x['package'] for x in data if x['status'] != 'reproducible'}
 
 dpkg_output = subprocess.check_output(['dpkg', '-l'], universal_newlines=True)
-dpkg_list = dpkg_output.split('\n')[5:] # Split lines and remove headers
-installed = {x.split('  ')[1].split(':')[0] for x in dpkg_list if x}
+dpkg_list = dpkg_output.split('\n')
+installed = {x.split('  ')[1].split(':')[0] # keep the second field, strip arch
+             for x in dpkg_list
+             if x.startswith('i')} # ignore headers
 
 for package in sorted(installed & unreproducible):
     print(package)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git



More information about the Reproducible-commits mailing list