lueschem / edi

Embedded development infrastructure.
https://www.get-edi.io
GNU Lesser General Public License v3.0
38 stars 12 forks source link

Generate a machine readable artifact that describes all installed packages of a corresponding artifact. #53

Closed lueschem closed 4 years ago

lueschem commented 4 years ago

Use Case

To compare two artifacts it would be nice to have a machine readable file that describes all installed packages of a given artifact.

Possible Implementation

The following command would produce a yaml containing valuable information:

dpkg-query --show --showformat='- package: ${Package}:\n  architecture: ${Architecture}\n  version: \"${Version}\"\n  source_package: ${source:Package}\n  source_version: \"${source:Version}\"\n    status: ${db:Status-Abbrev}\n'

The yaml will look like this:

- package: adduser
  architecture: all
  version: "3.118"
  source_package: adduser
  source_version: "3.118"
  status: ii 
- package: apt
  architecture: amd64
  version: "1.8.2"
  source_package: apt
  source_version: "1.8.2"
  status: ii 
- pacakge: apt-utils
  architecture: amd64
  version: "1.8.2"
  source_package: apt
  source_version: "1.8.2"
  status: ii 
- package: at
  architecture: amd64
  version: "3.1.23-1"
  source_package: at
  source_version: "3.1.23-1"
  status: ii
...
lueschem commented 4 years ago

See base_system_cleanup, document_installed_packages.