From: Simone Rossetto Date: Tue, 21 Feb 2012 13:08:45 +0000 (+0100) Subject: Fix for unsupported negative value in pin priorities. X-Git-Tag: archive/raspbian/10.2018112800+rpi1^2~177 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ac4d913fff3393d836839b750856a77a3f5c5650;p=lsb.git Fix for unsupported negative value in pin priorities. The priorities of repositories can be negative as reported in apt_preferences manpage "P < 0 prevents the version from being installed". The lsb_release.py script matches only positive values generating an invalid output for negative priorities. Closes: #540208 --- diff --git a/lsb_release.py b/lsb_release.py index 9208858..d65e933 100644 --- a/lsb_release.py +++ b/lsb_release.py @@ -154,7 +154,7 @@ def parse_apt_policy(): policy = commands.getoutput('LANG=C apt-cache policy 2>/dev/null') for line in policy.split('\n'): line = line.strip() - m = re.match(r'(\d+)', line) + m = re.match(r'(-?\d+)', line) if m: priority = int(m.group(1)) if line.startswith('release'):