Snappy install fails cryptically if meta/readme.md doesn't have two lines

Bug #1400308 reported by Robin Winslow
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Medium
Barry Warsaw

Bug Description

The "meta/readme.md" file must have at least 2 lines of text.

If the file is empty, I get this error:

https://pastebin.canonical.com/121892/

If the file only has one line, I get this error:

https://pastebin.canonical.com/121893/

I also get that error if the readme has a blank line, or an "=" in it (perfectly valid markdown).

Related branches

summary: - Snappy install cryptically if meta/readme.md doesn't have two lines
+ Snappy install fails cryptically if meta/readme.md doesn't have two
+ lines
description: updated
Barry Warsaw (barry)
Changed in snappy-ubuntu:
assignee: nobody → Barry Warsaw (barry)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Barry Warsaw (barry) wrote :

The 'empty readme.md' problem is because the resulting DEBIAN/control file has an empty Description: header, and this breaks dpkg (which does the underlying install). My thought is that `snappy build` should recognize this case and add a dummy header like "No description available".

Let's see what the second one is...

Revision history for this message
Barry Warsaw (barry) wrote :

snappy build just does blind fp.readline()'s of the readme.md file and doesn't check that the lines are empty (signaling EOF). I think in those cases, since downstream consumers of the manifest require non-empty strings for the title and description, it makes sense to just check for EOF/empty-line in those cases and use dummy titles and descriptions.

Revision history for this message
Barry Warsaw (barry) wrote :

Or... snappy build should complain loudly and fail.

Revision history for this message
Michael Vogt (mvo) wrote :

This is fixed in ppa:snappy-dev/tools-proposed

Changed in snappy-ubuntu:
status: Triaged → Fix Committed
Martin Pitt (pitti)
information type: Embargoed → Public
Michael Vogt (mvo)
Changed in snappy-ubuntu:
status: Fix Committed → Fix Released
Michael Terry (mterry)
affects: snappy-ubuntu → snappy
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.