snapcraft requires optional VERSION_ID in os-release
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
Medium
|
Carlo Lobrano |
Bug Description
Trying to build a snap on my Debian system fails with:
File "/usr/lib/
dependencies += libraries.
File "/usr/lib/
system_libs = _get_system_libs()
File "/usr/lib/
release = common.
KeyError: 'VERSION_ID'
miki@slab:
Linux slab 4.12.0-2-amd64 #1 SMP Debian 4.12.13-1 (2017-09-19) x86_64 GNU/Linux
miki@slab:
/etc/os-release does not contain a VERSION_ID. Adding one allows snapcraft to run successfully, however os-release(5) states that VERSION_ID is optional. Is there something else that this value could be defaulted to?
Changed in snapcraft: | |
assignee: | nobody → Carlo Lobrano (c-lobrano) |
status: | Confirmed → In Progress |
Changed in snapcraft: | |
status: | In Progress → Fix Committed |
milestone: | none → 2.35 |
importance: | Undecided → Medium |
Changed in snapcraft: | |
status: | Fix Committed → Fix Released |
The function _get_system_libs in snapcraft/ internal/ libraries. py uses VERSION_ID for the filename listing the .so files to exclude. I think the fix would be to treat no VERSION_ID the same as no file.