Merge lp://staging/~wgrant/launchpad/bug-750640 into lp://staging/launchpad

Proposed by William Grant
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 12746
Proposed branch: lp://staging/~wgrant/launchpad/bug-750640
Merge into: lp://staging/launchpad
Diff against target: 152 lines (+49/-8)
4 files modified
lib/lp/soyuz/doc/publishing.txt (+0/-1)
lib/lp/soyuz/model/publishing.py (+7/-1)
lib/lp/soyuz/tests/test_publish_archive_indexes.py (+31/-0)
lib/lp/soyuz/tests/test_publishing.py (+11/-6)
To merge this branch: bzr merge lp://staging/~wgrant/launchpad/bug-750640
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+56276@code.staging.launchpad.net

Commit message

[r=lifeless][bug=750640] Fix Source field generation rules in NMAF Packages files.

Description of the change

Stanzas in apt Packages files only need to include the Source field if the details differ from the binary's. If the name differs, it should be "Source: sourcename". If the version differs, it should be "Source: sourcename (sourceversion)". NMAF always acts as if the name differs, never omitting the field nor including the version.

This branch fixes that behaviour, and adds tests.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

+def get_field(stanza_fields, name):
30 + for key, value in stanza_fields.fields:
31 + if key == name:
32 + return value

isn't that just
dict(stanza_fields.fields).get(name)
?

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.