diff --git a/README.md b/README.md index 0e21b25..f2bf3d2 100644 --- a/README.md +++ b/README.md @@ -310,25 +310,16 @@ The CSV files consist of an optional header and the following fields: * (optional) Version - the version of the package used. * (optional) License - the license of the package used -Blank lines and those starting with **#** are ignored. - -One example: +The following example shows the accepted syntax for expressing extra packages: ```sh $ cat yocto-extra.csv -# Optional Header: product,version,license - -# Comments start with '#' and are ignored. - -avahi, 0.6 - -# Blank lines are also ignored - -bash, 4.0 -bash, 4.1, "GPL 3.0" - -busybox +avahi,0.6 +bash,4.0 +bash,4.1,GPL 3.0 +busybox, +udev,,"GPLv2.0+, LGPL-2.1+" ``` diff --git a/classes/vigiles.bbclass b/classes/vigiles.bbclass index a4832c0..c30eb0e 100644 --- a/classes/vigiles.bbclass +++ b/classes/vigiles.bbclass @@ -248,12 +248,12 @@ def _get_extra_packages(d): # Check for a CSV header of e.g. "package,version,license" and skip it header = extra_rows[0] - if header[0].lower() == "package": + if header[0].lower() == "product": extra_rows = extra_rows[1:] for row in extra_rows: - pkg = row[0] - ver = row[1] + pkg = row[0].replace(' ', '-') + ver = row[1].replace(' ', '.') license = row[2] license_key = pkg + ver @@ -261,8 +261,7 @@ def _get_extra_packages(d): (pkg, ver, license_key, license)) pkg_vers = set(additional['additional_packages'].get(pkg, [])) - if ver: - pkg_vers.add(ver) + pkg_vers.add(ver) additional['additional_packages'][pkg] = sorted(list(pkg_vers)) additional['additional_licenses'][license_key] = license