Merge lp:~stefanor/ibid/apt-virtual-533932 into lp:~ibid-core/ibid/old-release-0.1-1.6

Proposed by Stefano Rivera
Status: Merged
Approved by: Jonathan Hitchcock
Approved revision: 913
Merged at revision: 913
Proposed branch: lp:~stefanor/ibid/apt-virtual-533932
Merge into: lp:~ibid-core/ibid/old-release-0.1-1.6
Diff against target: 28 lines (+5/-0)
1 file modified
ibid/plugins/sysadmin.py (+5/-0)
To merge this branch: bzr merge lp:~stefanor/ibid/apt-virtual-533932
Reviewer Review Type Date Requested Status
Jonathan Hitchcock Approve
Michael Gorven Approve
Max Rabkin Approve
Review via email: mp+20870@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Max Rabkin (max-rabkin) :
review: Approve
Revision history for this message
Michael Gorven (mgorven) wrote :

 review approve

review: Approve
Revision history for this message
Jonathan Hitchcock (vhata) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ibid/plugins/sysadmin.py'
2--- ibid/plugins/sysadmin.py 2010-02-20 21:58:38 +0000
3+++ ibid/plugins/sysadmin.py 2010-03-07 18:38:16 +0000
4@@ -86,12 +86,15 @@
5 description = None
6 provided = None
7 output = unicode_output(output)
8+ real = True
9 for line in output.splitlines():
10 if not description:
11 if line.startswith(u'Description:'):
12 description = u'%s:' % line.split(None, 1)[1]
13 elif line.startswith(u'Provided by:'):
14 provided = line.split(None, 2)[2]
15+ elif line == u'State: not a real package':
16+ real = False
17 elif line != "":
18 description += u' ' + line.strip()
19 else:
20@@ -101,6 +104,8 @@
21 event.addresponse(u'Virtual package provided by %s', provided)
22 elif description:
23 event.addresponse(description)
24+ elif not real:
25+ event.addresponse(u'Virtual package, not provided by anything')
26 else:
27 raise Exception("We couldn't successfully parse aptitude's output")
28 else:

Subscribers

People subscribed via source and target branches